/* RestoMaq - design du parc (L''N EXPERTISE / ComptaBIA). Police unique, aucun chargement
   externe : rendu identique sur toutes les machines. Fond nuit + accent sarcelle. */
:root {
  --nuit: #0b2545;
  --nuit-2: #12305a;
  --sarcelle: #1f8a8a;
  --sarcelle-clair: #2ba39a;
  --sarcelle-fonce: #14666a;
  --ambre: #d98a1f;
  --rouge: #c0392b;
  --vert: #1f8a52;
  --texte: #16232f;
  --texte-clair: #e8f0fa;
  --gris: #5b6b78;
  --gris-clair: #eef2f5;
  --bord: #dbe3e8;
  --fond: #f3f7f7;
  --carte: #ffffff;
  --ombre: 0 1px 3px rgba(11, 37, 69, .08), 0 6px 20px rgba(11, 37, 69, .06);
  --rayon: 12px;
  --police: 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--police); color: var(--texte); background: var(--fond);
  line-height: 1.55; font-size: 15px;
}
a { color: var(--sarcelle-fonce); }
h1, h2, h3 { line-height: 1.2; }
img { max-width: 100%; }
.ico { width: 1.15em; height: 1.15em; vertical-align: -0.18em; flex: none; }
.ico.grand { width: 1.6em; height: 1.6em; }
.cache { display: none !important; }

/* ---------- Vitrine ---------- */
nav.vitrine {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; background: var(--nuit); position: sticky; top: 0; z-index: 20; flex-wrap: wrap;
}
nav.vitrine .marque { display: flex; align-items: center; }
nav.vitrine .liens { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
nav.vitrine .liens a { color: var(--texte-clair); text-decoration: none; font-size: 14px; }
nav.vitrine .liens a:hover { color: #fff; text-decoration: underline; }
nav.vitrine .liens a.bouton, .bouton {
  background: var(--sarcelle); color: #fff; padding: 8px 16px; border-radius: 8px; font-weight: 600;
}
nav.vitrine .liens a.contour {
  border: 1px solid rgba(255, 255, 255, .35); padding: 7px 14px; border-radius: 8px;
}
.appartenance { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--texte-clair); opacity: .85; }
.appartenance img { height: 22px; }

main { display: block; }
.hero { background: linear-gradient(160deg, var(--nuit) 0%, var(--nuit-2) 70%); color: var(--texte-clair); padding: 56px 20px; }
.hero .contenu { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.surtitre { display: inline-flex; align-items: center; gap: 8px; color: var(--sarcelle-clair); font-weight: 600; font-size: 14px; }
.hero h1 { font-size: 2.3rem; margin: 12px 0 14px; color: #fff; }
.hero h1 em { color: var(--sarcelle-clair); font-style: normal; }
.hero .lead { font-size: 1.08rem; color: #cdd9e8; max-width: 560px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.bouton-hero { background: var(--sarcelle); color: #fff; padding: 12px 22px; border-radius: 10px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.bouton-hero-secondaire { border: 1px solid rgba(255, 255, 255, .4); color: #fff; padding: 12px 22px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.reassurance { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 26px; font-size: 13px; color: #bccadd; }
.reassurance span { display: inline-flex; align-items: center; gap: 7px; }
.apercu { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 18px; }
.apercu .ligne { display: flex; gap: 12px; align-items: center; padding: 12px 8px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.apercu .ligne:last-child { border-bottom: 0; }
.apercu .ligne .ico { color: var(--sarcelle-clair); }
.apercu .ligne strong { display: block; color: #fff; font-size: 14px; }
.apercu .ligne span { color: #bccadd; font-size: 12.5px; }

.section-publique { max-width: 1120px; margin: 0 auto; padding: 52px 20px; }
.section-publique h2 { font-size: 1.7rem; color: var(--nuit); margin: 0 0 8px; }
.section-publique .intro { color: var(--gris); max-width: 720px; margin: 0 0 26px; }
.bande { background: #eaf1f1; }
.bande-nuit { background: var(--nuit); color: var(--texte-clair); }
.bande-nuit h2 { color: #fff; }
.bande-nuit .intro { color: #bccadd; }
.grille-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grille-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.bloc { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 20px; box-shadow: var(--ombre); }
.bande-nuit .bloc { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); box-shadow: none; }
.bloc h3 { font-size: 1.08rem; margin: 12px 0 6px; color: var(--nuit); }
.bande-nuit .bloc h3 { color: #fff; }
.bloc p { margin: 0; color: var(--gris); font-size: 14px; }
.bande-nuit .bloc p { color: #bccadd; }
.bloc ul { margin: 8px 0 0; padding-left: 18px; color: var(--gris); font-size: 14px; }
.pastille { display: inline-flex; width: 44px; height: 44px; border-radius: 12px; background: #e7f2f1; color: var(--sarcelle-fonce); align-items: center; justify-content: center; }
.bande-nuit .pastille { background: rgba(43, 163, 154, .18); color: var(--sarcelle-clair); }

.formulaire-contact label { display: block; margin-bottom: 4px; }
.formulaire-contact label span { display: block; font-size: 13px; color: var(--gris); margin-bottom: 4px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 8px; font: inherit; background: #fff; color: var(--texte); }
textarea { min-height: 96px; resize: vertical; }
button { cursor: pointer; font: inherit; }
button[type=submit], .formulaire-contact button { background: var(--sarcelle); color: #fff; border: 0; padding: 11px 20px; border-radius: 9px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.bande-cta { background: linear-gradient(120deg, var(--sarcelle-fonce), var(--sarcelle)); color: #fff; text-align: center; padding: 48px 20px; }
.bande-cta h2 { color: #fff; margin: 0 0 8px; }
.actions-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

.pied-public { background: var(--nuit); color: #bccadd; padding: 32px 20px; }
.pied-public .contenu { max-width: 1120px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pied-public a { color: #cdd9e8; display: block; text-decoration: none; margin-bottom: 6px; font-size: 14px; }
.pied-logo { margin-bottom: 8px; }
.lnx .l { color: #fff; font-style: normal; font-weight: 700; }
.lnx .x { color: var(--sarcelle-clair); font-style: normal; font-weight: 700; }

/* ---------- Offres (grille alignee, regle 29/09) ---------- */
/* Desktop : autant de colonnes que d'offres (--offres-cols pose par le JS) ; tablette 2 ; phone 1. */
.offres { display: grid; gap: 18px; align-items: stretch; grid-template-columns: repeat(var(--offres-cols, 1), minmax(0, 1fr)); }
@media (max-width: 900px) { .offres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .offres { grid-template-columns: 1fr; } }
.offre-carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 22px; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 10px; box-shadow: var(--ombre); }
.offre-carte.mise-en-avant { border-color: var(--sarcelle); box-shadow: 0 0 0 2px rgba(31, 138, 138, .25), var(--ombre); }
.offre-carte h3 { margin: 0; color: var(--nuit); font-size: 1.2rem; }
.offre-carte .desc { color: var(--gris); font-size: 13.5px; margin: 0; min-height: 40px; }
.offre-prix { font-size: 1.5rem; font-weight: 700; color: var(--sarcelle-fonce); }
.offre-prix .periode { display: block; font-size: 12px; color: var(--gris); font-weight: 400; }
.offre-carte ul { list-style: none; padding: 0; margin: 4px 0; }
.offre-carte ul li { padding: 5px 0 5px 22px; position: relative; font-size: 13.5px; color: var(--texte); }
.offre-carte ul li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 10px; height: 5px; border-left: 2px solid var(--sarcelle); border-bottom: 2px solid var(--sarcelle); transform: rotate(-45deg); }
.offre-carte .bouton { text-align: center; text-decoration: none; }

/* ---------- Application ---------- */
.entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--nuit); color: var(--texte-clair); position: sticky; top: 0; z-index: 30; flex-wrap: wrap; }
.entete .marque { display: flex; align-items: center; }
.entete .droite { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.entete select.choix-etab { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: 6px 10px; }
.entete select.choix-etab option { color: #16232f; }
#entete-utilisateur { font-size: 13px; color: #cdd9e8; }
.badge-file { background: var(--ambre); color: #16232f; border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.bandeau-hors-ligne { background: var(--ambre); color: #3a2a06; padding: 8px 16px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.secondaire { background: #fff; color: var(--nuit); border: 1px solid var(--bord); border-radius: 8px; padding: 8px 14px; font-weight: 600; display: inline-flex; gap: 7px; align-items: center; }
.secondaire.petit { padding: 5px 10px; font-size: 13px; }
.danger { background: var(--rouge); color: #fff; border: 0; }
.choix-langue { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: 5px 8px; }
.choix-langue option { color: #16232f; }

.disposition { display: grid; grid-template-columns: 210px 1fr; min-height: calc(100vh - 56px); }
.onglets { background: #fff; border-right: 1px solid var(--bord); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.onglets button { background: transparent; border: 0; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--texte); display: flex; align-items: center; gap: 10px; font-weight: 500; width: 100%; }
.onglets button .ico { color: var(--gris); }
.onglets button:hover { background: var(--gris-clair); }
.onglets button.actif { background: #e7f2f1; color: var(--sarcelle-fonce); }
.onglets button.actif .ico { color: var(--sarcelle-fonce); }
main.app { padding: 20px; max-width: 1200px; margin: 0 auto; width: 100%; }
.ecran-auth { max-width: 460px; margin: 40px auto; }
.ecran-auth.large { max-width: 720px; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 24px; box-shadow: var(--ombre); }
.carte + .carte { margin-top: 16px; }
.grille { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grille .large { grid-column: 1 / -1; }
.sep { height: 1px; background: var(--bord); margin: 16px 0; }
.lien-bouton { background: none; border: 0; color: var(--sarcelle-fonce); text-decoration: underline; padding: 0; }
.attenue { color: var(--gris); font-size: 14px; }

.titre-vue { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.titre-vue h1 { font-size: 1.4rem; margin: 0; color: var(--nuit); display: flex; align-items: center; gap: 10px; }
.titre-vue h1 .ico { color: var(--sarcelle-fonce); }
.titre-vue .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.cartes-stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre); }
.stat .valeur { font-size: 1.6rem; font-weight: 700; color: var(--nuit); }
.stat .libelle { color: var(--gris); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.stat.accent .valeur { color: var(--sarcelle-fonce); }
.stat.alerte .valeur { color: var(--ambre); }

.table-defile { overflow-x: auto; border: 1px solid var(--bord); border-radius: var(--rayon); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--bord); }
th { background: var(--gris-clair); color: var(--nuit); font-weight: 600; white-space: nowrap; }
td.droite, th.droite { text-align: right; }
tr.cliquable { cursor: pointer; }
tr.cliquable:hover { background: #f4faf9; }
.vide { color: var(--gris); padding: 18px; text-align: center; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--gris-clair); color: var(--nuit); }
.badge.vert { background: #e0f2e9; color: var(--vert); }
.badge.ambre { background: #fbeed5; color: #8a5a0c; }
.badge.rouge { background: #fbe3e0; color: var(--rouge); }
.badge.sarcelle { background: #e7f2f1; color: var(--sarcelle-fonce); }
.badge.gris { background: var(--gris-clair); color: var(--gris); }

.message { padding: 10px 14px; border-radius: 9px; font-size: 14px; margin: 8px 0; }
.message.erreur { background: #fbe3e0; color: #922; }
.message.ok { background: #e0f2e9; color: #1a6b3f; }
.message.info { background: #e7eefb; color: #234; }
.message.alerte { background: #fbeed5; color: #8a5a0c; }

#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
#toasts .message { box-shadow: var(--ombre); }

/* Grilles metier */
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tuile { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre); cursor: pointer; }
.tuile:hover { border-color: var(--sarcelle); }
.tuile.libre { border-left: 4px solid var(--vert); }
.tuile.occupee { border-left: 4px solid var(--ambre); }
.tuile .nom { font-weight: 700; color: var(--nuit); font-size: 1.05rem; }
.tuile .info { color: var(--gris); font-size: 13px; }

.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.kds .commande { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px; box-shadow: var(--ombre); }
.kds .commande h3 { margin: 0 0 8px; color: var(--nuit); font-size: 1.05rem; display: flex; justify-content: space-between; }
.kds .ligne-plat { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--bord); }
.kds .ligne-plat:last-child { border-bottom: 0; }
.kds .ligne-plat .qte { font-weight: 700; color: var(--sarcelle-fonce); }

.panier { position: sticky; top: 70px; }
.ligne-panier { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--bord); }
.recap { margin-top: 10px; }
.recap .l { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.recap .total { font-weight: 700; font-size: 1.2rem; color: var(--nuit); border-top: 2px solid var(--nuit); padding-top: 8px; margin-top: 6px; }

.deux-colonnes { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }

.modale-fond { position: fixed; inset: 0; background: rgba(11, 37, 69, .5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modale { background: #fff; border-radius: var(--rayon); padding: 22px; max-width: 520px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: var(--ombre); }
.modale h2 { margin: 0 0 12px; color: var(--nuit); font-size: 1.2rem; }
.petit-bouton { background: none; border: 1px solid var(--bord); border-radius: 7px; padding: 4px 9px; color: var(--nuit); }

/* Responsive */
@media (max-width: 900px) {
  .hero .contenu, .deux-colonnes { grid-template-columns: 1fr; }
  .grille-4, .grille-3, .cartes-stat { grid-template-columns: repeat(2, 1fr); }
  .apercu { order: -1; }
  .disposition { grid-template-columns: 1fr; }
  .onglets { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--bord); position: sticky; top: 56px; z-index: 10; }
  .onglets button { flex: none; white-space: nowrap; }
  .onglets button span { display: none; }
  .onglets button .ico { width: 1.4em; height: 1.4em; }
}
@media (max-width: 620px) {
  .hero h1 { font-size: 1.8rem; }
  .grille-4, .grille-3, .grille-2, .cartes-stat, .grille { grid-template-columns: 1fr; }
  nav.vitrine { padding: 10px 14px; }
  nav.vitrine .liens { gap: 12px; }
  main.app { padding: 14px; }
}
