/* SALON JOHNNY : noir et blanc comme le logo. Téléphone d'abord ; au-delà de 900 px (PC), le menu passe sur le côté.
   Arabe : la page passe de droite à gauche (dir="rtl") ; les marges utilisent inline-start / inline-end pour suivre. */
:root {
  --fond: #0B0B0B; --surface: #161616; --surface-2: #101010; --trait: #3A3A3A; --trait-doux: #222222;
  --texte: #F5F5F2; --doux: #A1A1A1; --tres-doux: #8F8F8F; --clair: #F5F5F2; --sur-clair: #0B0B0B; --sur-clair-doux: #3A3A3A;
  --rayon: 14px; --police: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --titre: 'Playfair Display', Georgia, serif; --arabe: 'IBM Plex Sans Arabic', Inter, system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police); -webkit-text-size-adjust: 100%; }
html[dir="rtl"] body { font-family: var(--arabe); }
body { min-height: 100vh; min-height: 100dvh; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .45; }
h1, h2 { margin: 0; }
p { margin: 0; line-height: 1.5; }
:focus-visible { outline: 2px solid var(--clair); outline-offset: 2px; }
.nb { font-family: var(--police); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ar { font-family: var(--arabe); }
.fleche { flex: none; }
html[dir="rtl"] .fleche { transform: scaleX(-1); }

/* Logo en filigrane derrière tout */
.filigrane { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  opacity: .06; pointer-events: none; z-index: 0; color: var(--texte); }
.filigrane span { font-family: var(--titre); font-weight: 700; font-size: 88px; line-height: 1; }
#app { position: relative; z-index: 1; }

/* Pages */
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px 20px 32px; display: flex; flex-direction: column; gap: 18px; min-height: 100dvh; }
.page.etroite { max-width: 560px; }
.pile { display: flex; flex-direction: column; gap: 12px; }
.pile-serree { display: flex; flex-direction: column; gap: 6px; }
.pile-0 { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.entre { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bas { margin-top: auto; }
.centre { text-align: center; }
.doux { color: var(--doux); font-size: 14px; }
.doux-fonce { color: var(--sur-clair-doux); font-size: 14px; }
.petit-texte { font-size: 13px; }
.etiquette { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--doux); font-weight: 500; }
html[dir="rtl"] .etiquette, html[dir="rtl"] .sur-titre { letter-spacing: 0; text-transform: none; font-size: 14px; }
.etiquette-douce { font-size: 15px; color: var(--doux); }
.sur-titre { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--doux); }
.lien { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--doux); }
.lien:hover { color: var(--texte); }

/* En-tête */
.entete { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 48px; }
.entete-titre { display: flex; flex-direction: column; min-width: 0; }
.entete h1 { font-family: var(--titre); font-size: 24px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
html[dir="rtl"] .entete h1 { font-family: var(--arabe); }
.bouton-carre { width: 44px; height: 44px; border: 1px solid var(--trait); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.bouton-carre:hover { border-color: var(--doux); }
.langues { display: flex; border: 1px solid var(--trait); border-radius: 999px; padding: 3px; gap: 2px; font-family: var(--police); }
.langues button { border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 700; color: var(--doux); min-height: 32px; }
.langues button.on { background: var(--clair); color: var(--sur-clair); }
.haut-droite { display: flex; justify-content: flex-end; }

/* Connexion */
.logo { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 8px; color: var(--texte); }
.logo-nom { font-family: var(--titre); font-size: 48px; font-weight: 700; line-height: 1; }
.logo-sous { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--doux); }
.tuile-patron { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--clair); color: var(--sur-clair);
  border-radius: var(--rayon); padding: 18px 20px; text-align: start; width: 100%; }
.tuile-patron b { font-size: 18px; display: block; }
.tuile-patron small { font-size: 13px; color: var(--sur-clair-doux); }
.tuile { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; min-height: 88px; text-align: start; width: 100%; }
.tuile b { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.tuile small { font-size: 12px; color: var(--doux); }
.tuile small.fort { color: var(--texte); font-weight: 600; }
a.tuile:hover, button.tuile:hover { border-color: var(--doux); }
.tuile.vide { border-style: dashed; color: var(--tres-doux); }
.tuile.vide b { font-weight: 500; color: var(--tres-doux); }
.code-qui { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 10px; text-align: center; }
.code-qui h1 { font-family: var(--titre); font-size: 30px; }
html[dir="rtl"] .code-qui h1 { font-family: var(--arabe); }
.points { display: flex; justify-content: center; gap: 18px; padding-top: 8px; }
.points span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--texte); transition: background-color .2s; }
.points span.plein { background: var(--texte); }
.message-code { min-height: 22px; text-align: center; font-size: 14px; color: var(--texte); font-weight: 600; }
.clavier { display: grid; grid-template-columns: repeat(3, 72px); justify-content: center; gap: 14px 22px; margin: 0 auto; direction: ltr; }
.touche { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--trait); font-size: 26px; font-weight: 500; font-family: var(--police); }
.touche:hover { border-color: var(--doux); background: #141414; }
.touche.texte { border: 0; font-size: 14px; color: var(--doux); background: none; }
.suspendu { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 24px 8px; }
.suspendu h1 { font-family: var(--titre); font-size: 28px; }
html[dir="rtl"] .suspendu h1 { font-family: var(--arabe); }
.suspendu p { color: #C9C9C5; max-width: 320px; }
.bandeau-suspendu { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--clair); color: var(--sur-clair); font-size: 14px; font-weight: 600; padding: 10px 16px; text-align: center; }
.lien-assistance { align-self: center; font-size: 13px; color: var(--doux); text-decoration: underline; text-underline-offset: 3px; padding: 8px; }
.lien-assistance:hover { color: var(--texte); }
/* PC avec souris : pas de pavé de chiffres, un vrai champ de code et le bouton « Entrer » */
.code-pc { display: none; }
@media (hover: hover) and (pointer: fine) {
  .code .points, .code .clavier { display: none; }
  .code-pc { display: flex; gap: 10px; width: 100%; max-width: 360px; margin: 0 auto; }
  .code-pc input { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 14px 16px;
    font-size: 22px; letter-spacing: 8px; text-align: center; color: var(--texte); font-family: var(--police); direction: ltr;
    -webkit-text-security: disc; text-security: disc; }
  .code-pc input:focus { border-color: var(--doux); outline: none; }
  .code-pc input::placeholder { color: #4A4A4A; }
  .code-pc .bouton { padding: 0 24px; }
}

/* Entrée sur PC : logo à gauche, choix et code à droite */
.marque { display: none; }
body.entree .filigrane { display: none; }
@media (min-width: 900px) {
  .ecran-entree { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100dvh; }
  .marque { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; position: relative; padding: 48px;
    background: radial-gradient(circle at 50% 40%, #1A1A1A 0%, #0E0E0E 60%); border-inline-end: 1px solid #222; color: var(--texte); }
  .marque .logo-nom { font-family: var(--titre); font-size: 96px; font-weight: 700; line-height: 1; margin-top: 8px; }
  .marque .logo-sous { font-size: 14px; letter-spacing: 6px; text-transform: uppercase; color: var(--doux); }
  .marque .signature { position: absolute; bottom: 28px; left: 0; right: 0; }
  .ecran-entree .page { max-width: 440px; min-height: 100dvh; justify-content: center; gap: 22px; padding: 40px 32px; }
  .ecran-entree .logo, .ecran-entree .page > .bas > .signature { display: none; }
  .ecran-entree .bas { margin-top: 8px; }
  .ecran-entree .haut-droite, .ecran-entree .code > .entete { position: absolute; top: 28px; inset-inline-end: 32px; }
  .ecran-entree .code > .entete { inset-inline-start: calc(50% + 32px); display: flex; justify-content: space-between; }
  .ecran-entree .connexion .etiquette-douce { font-family: var(--titre); font-size: 30px; color: var(--texte); }
  html[dir="rtl"] .ecran-entree .connexion .etiquette-douce { font-family: var(--arabe); }
}
.case { display: flex; align-items: center; gap: 12px; font-size: 15px; min-height: 44px; text-align: start; }
.case-boite { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--texte); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.case.on .case-boite { background: var(--texte); color: var(--sur-clair); }

/* Cartes, montants */
.carte-claire { background: var(--clair); color: var(--sur-clair); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.carte-claire .entre span { color: var(--sur-clair-doux); }
.carte-claire b { color: var(--sur-clair); }
.carte-claire small { color: var(--sur-clair-doux); }
.carte-claire .separe { border-top: 1px solid #D4D4D0; padding-top: 10px; }
.carte-claire .pile-0 { color: var(--sur-clair-doux); }
.gros-montant { font-size: 34px; font-weight: 700; letter-spacing: -.5px; font-family: var(--police); }
.moyen-montant { font-size: 18px; font-weight: 700; }
.barre-paiements { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: #E4E4E0; }
.barre-paiements span:nth-child(1), .pastille.p-ESPECES { background: #0B0B0B; }
.barre-paiements span:nth-child(2), .pastille.p-WAVE { background: #6B6B6B; }
.barre-paiements span:nth-child(3), .pastille.p-OM { background: #B5B5B5; }
.pastille { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-inline-end: 6px; }
.pied-total { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--trait); padding-top: 14px; margin-top: auto; font-size: 14px; color: var(--doux); }
.pied-total b { color: var(--texte); font-size: 16px; }
.alerte { display: flex; align-items: center; gap: 12px; border: 1px solid var(--clair); border-radius: var(--rayon); padding: 12px 14px; }
.alerte span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.alerte small { color: var(--doux); font-size: 13px; }
.navigation-periode { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: center; }
.navigation-periode b { font-size: 15px; }
.note { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px 14px; font-size: 14px; white-space: pre-line; }
.carte-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px 14px; font-size: 15px; }

/* Listes */
.ligne { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--trait-doux); width: 100%; text-align: start; min-height: 56px; }
.ligne-heure { font-size: 13px; color: var(--doux); width: 46px; flex: none; line-height: 1.3; }
.ligne-corps { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; text-align: start; }
.ligne-corps b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.ligne-corps small { font-size: 13px; color: var(--doux); overflow-wrap: anywhere; }
.ligne-montant { font-size: 15px; font-weight: 600; font-family: var(--police); white-space: nowrap; }
.ligne.annulee { opacity: .5; }
.ligne.annulee .ligne-corps b, .ligne.annulee .ligne-montant { text-decoration: line-through; }
.sans-bord { border: 0; padding: 0; background: none; }
.petit-bouton { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--trait); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--doux); }
.petit-bouton:hover { color: var(--texte); border-color: var(--doux); }
.confirmer { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 8px 0; font-size: 14px; flex-wrap: wrap; }
.confirmer span { margin-inline-end: auto; }
.badge { font-size: 12px; font-weight: 600; border-radius: 8px; padding: 5px 9px; border: 1px solid var(--trait); color: var(--doux); white-space: nowrap; }
.badge.plein { background: var(--clair); color: var(--sur-clair); border-color: var(--clair); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--clair); color: var(--sur-clair); display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--titre); font-weight: 700; flex: none; font-size: 15px; }
.avatar.grand { width: 64px; height: 64px; font-size: 24px; }
.fiche-tete { display: flex; align-items: center; gap: 16px; }
.fiche-tete h1 { font-family: var(--titre); font-size: 26px; }
.fiche-tete .bouton-carre { margin-inline-start: auto; }
.liste-liens { display: flex; flex-direction: column; }
.liste-liens a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 0; border-bottom: 1px solid var(--trait-doux); font-size: 16px; min-height: 52px; }
.liste-liens a .doux { display: inline-flex; align-items: center; gap: 6px; }
.info-ok { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.compte { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.compte.eteint { opacity: .6; border-color: var(--trait-doux); }

/* Boutons et choix */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: 13px 16px; font-size: 16px; font-weight: 600; min-height: 48px; }
.bouton:hover { border-color: var(--doux); }
.bouton.plein { background: var(--clair); color: var(--sur-clair); border-color: var(--clair); font-weight: 700; }
.bouton.contour { border: 1.5px solid var(--clair); font-weight: 700; }
.bouton.grand { padding: 16px; font-size: 17px; }
.bouton.petit { padding: 9px 12px; font-size: 14px; min-height: 42px; border-radius: 10px; }
.bouton.pointille { border-style: dashed; }
.carte-claire .bouton { color: var(--sur-clair); border-color: #BDBDB8; }
.onglets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--surface); border-radius: 12px; padding: 4px; gap: 4px; }
.onglets button { border-radius: 9px; padding: 10px 6px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--doux); }
.onglets button.on { background: var(--clair); color: var(--sur-clair); font-weight: 700; }
.puces { display: flex; gap: 8px; flex-wrap: wrap; }
.puce { border: 1px solid var(--trait); border-radius: 999px; padding: 8px 14px; min-height: 38px; font-size: 14px; }
.puce.on { background: var(--clair); color: var(--sur-clair); border-color: var(--clair); font-weight: 700; }
.grille-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.choix { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 12px; border-radius: 12px; min-height: 58px; text-align: start; border: 1px solid var(--trait); }
.choix.centre { align-items: center; justify-content: center; text-align: center; font-weight: 600; font-size: 14px; }
.choix b { font-size: 14px; font-weight: 600; }
.choix small { font-size: 13px; opacity: .8; }
.choix.on { background: var(--clair); color: var(--sur-clair); border-color: var(--clair); }
.pas { display: inline-flex; align-items: center; gap: 10px; }
.pas button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--trait); display: inline-flex; align-items: center; justify-content: center; }
.pas b { min-width: 58px; text-align: center; font-size: 18px; }
.barre-enregistrer { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 0 4px; background: linear-gradient(to top, var(--fond) 75%, transparent); }
.barre-enregistrer .pile-0 { flex: 1; }
.barre-enregistrer .bouton { padding: 16px 26px; font-size: 17px; }

/* Champs */
.champ { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--doux); }
.champ input, .champ textarea, .recherche { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 13px 14px; font-size: 16px; color: var(--texte); width: 100%; }
.champ input:focus, .champ textarea:focus, .recherche:focus { border-color: var(--doux); outline: none; }
.recherche { flex: 1; min-width: 0; }

/* Formulaire qui monte du bas */
.voile { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; z-index: 50; animation: fondu .25s ease both; }
.feuille { background: var(--surface); border-top: 1px solid var(--trait); border-radius: 22px 22px 0 0; padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; animation: montee .35s cubic-bezier(.2, .8, .2, 1) both; }
.feuille h2 { font-family: var(--titre); font-size: 22px; }
html[dir="rtl"] .feuille h2 { font-family: var(--arabe); }
.feuille .champ input, .feuille .champ textarea { background: var(--fond); }
@media (min-width: 900px) { .voile { justify-content: center; } .feuille { border-radius: 22px; border: 1px solid var(--trait); } }

/* Page réservée */
.reserve-centre { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.reserve-centre h1 { font-family: var(--titre); font-size: 28px; }
.reserve-centre p { color: #C9C9C5; max-width: 300px; }
.rond { width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--texte); display: flex; align-items: center; justify-content: center; }

/* Signature YATOU PRO */
.signature { display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 12px; font-size: 12px; color: var(--doux); text-align: center; }
.signature b { color: var(--texte); letter-spacing: 1px; font-family: var(--police); }
.signature .droits { font-size: 11px; color: var(--tres-doux); }

/* Message en bas de l'écran */
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--clair); color: var(--sur-clair);
  padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 100; max-width: calc(100% - 32px); text-align: center; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.erreur { background: #2A2A2A; color: var(--texte); border: 1px solid var(--clair); }

/* Menu du patron : en bas sur téléphone, sur le côté sur PC */
.coquille { min-height: 100dvh; }
.menu-cote { display: none; }
.menu-bas { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: rgba(11, 11, 11, .96);
  border-top: 1px solid #2A2A2A; padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 40; backdrop-filter: blur(8px); }
.menu-bas a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--doux); padding: 6px 0; min-height: 52px; }
.menu-bas a.on { color: var(--texte); font-weight: 700; }
.coquille .contenu .page { padding-bottom: 100px; }
.coquille .barre-enregistrer { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
.colonnes { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 900px) {
  .coquille { display: flex; }
  .menu-bas { display: none; }
  .coquille .contenu .page { padding-bottom: 36px; }
  .coquille .barre-enregistrer { bottom: 0; }
  .menu-cote { display: flex; flex-direction: column; gap: 28px; width: 240px; flex: none; position: sticky; top: 0; height: 100dvh; padding: 28px 16px; border-inline-end: 1px solid #2A2A2A; background: var(--surface-2); }
  .menu-cote nav { display: flex; flex-direction: column; gap: 4px; }
  .menu-cote nav a { display: flex; align-items: center; gap: 12px; border-radius: 10px; padding: 11px 12px; font-size: 15px; color: #C9C9C5; }
  .menu-cote nav a:hover { background: #1A1A1A; }
  .menu-cote nav a.on { background: var(--clair); color: var(--sur-clair); font-weight: 700; }
  .menu-cote .signature { margin-top: auto; align-items: flex-start; text-align: start; border-top: 1px solid #2A2A2A; }
  .logo-petit { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-family: var(--titre); font-size: 28px; font-weight: 700; }
  .contenu { flex: 1; min-width: 0; }
  .tableau .colonnes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .page { padding: 28px 32px 36px; }
}

/* Animations (désactivées si le téléphone demande moins de mouvement) */
@keyframes entree { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes montee { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
@keyframes secoue { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.anim > * { animation: entree .5s cubic-bezier(.2, .7, .2, 1) both; }
.anim > *:nth-child(2) { animation-delay: .04s; } .anim > *:nth-child(3) { animation-delay: .08s; } .anim > *:nth-child(4) { animation-delay: .12s; }
.anim > *:nth-child(5) { animation-delay: .16s; } .anim > *:nth-child(6) { animation-delay: .2s; } .anim > *:nth-child(n+7) { animation-delay: .24s; }
#app.calme .anim > * { animation: none; }
#app.feuille-calme .voile, #app.feuille-calme .feuille { animation: none; }
.secoue { animation: secoue .45s ease both; }
.secoue-tard { animation: secoue .5s ease .4s both; }
a, button { transition: transform .15s ease, background-color .25s ease, color .25s ease, border-color .25s ease; -webkit-tap-highlight-color: transparent; }
a:active, button:active:not(:disabled) { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ================= Finition « pro » (2026-10-22) : couleurs, tailles plus fines, animations ================= */
:root {
  --or: #D4AF6A; --or-doux: rgba(212, 175, 106, .14); --carte: #121212; --carte-trait: #232323;
  --c-ESPECES: #34D399; --c-WAVE: #38BDF8; --c-OM: #FF8A3D; --c-bleu: #60A5FA;
}
.pastille.p-ESPECES, .barre-paiements span.p-ESPECES { background: var(--c-ESPECES); }
.pastille.p-WAVE, .barre-paiements span.p-WAVE { background: var(--c-WAVE); }
.pastille.p-OM, .barre-paiements span.p-OM { background: var(--c-OM); }
.pill { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 3px 9px; white-space: nowrap; border: 1px solid currentColor; flex: none; }
.pill.p-ESPECES { color: var(--c-ESPECES); background: rgba(52, 211, 153, .08); }
.pill.p-WAVE { color: var(--c-WAVE); background: rgba(56, 189, 248, .08); }
.pill.p-OM { color: var(--c-OM); background: rgba(255, 138, 61, .08); }
.ligne.annulee .pill { opacity: .6; }

/* Cartes */
.carte { background: var(--carte); border: 1px solid var(--carte-trait); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color .25s ease, transform .25s ease; }
.carte:hover { border-color: #303030; }
.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.carte-titre { font-size: 13px; font-weight: 600; letter-spacing: .3px; color: var(--doux); text-transform: uppercase; }
html[dir="rtl"] .carte-titre { text-transform: none; letter-spacing: 0; font-size: 14px; }
.carte .ligne:last-child { border-bottom: 0; }
.vide-message { display: flex; align-items: center; gap: 10px; color: var(--doux); font-size: 14px; padding: 14px 0; }

/* Période : onglets compacts + date */
.barre-periode { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.onglets.compacts { display: inline-grid; grid-auto-flow: column; grid-template-columns: none; background: var(--carte); border: 1px solid var(--carte-trait); padding: 3px; border-radius: 11px; }
.onglets.compacts button { min-height: 34px; padding: 6px 16px; font-size: 13px; border-radius: 8px; }
.onglets.compacts button.on { background: var(--or); color: #1A1407; }
.barre-periode .navigation-periode { gap: 8px; }
.barre-periode .navigation-periode b { font-size: 14px; font-weight: 600; min-width: 190px; }
.bouton-carre.petit { width: 34px; height: 34px; border-radius: 10px; }

/* Les 4 chiffres */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi { position: relative; overflow: hidden; background: var(--carte); border: 1px solid var(--carte-trait); border-radius: 16px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.kpi::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--kpi, var(--or)); }
.kpi::after { content: ''; position: absolute; width: 140px; height: 140px; inset-inline-end: -50px; top: -60px; border-radius: 50%; background: var(--kpi, var(--or)); opacity: .07; }
.kpi:hover { transform: translateY(-2px); border-color: #333; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.kpi-or { --kpi: var(--or); } .kpi-bleu { --kpi: var(--c-bleu); } .kpi-vert { --kpi: var(--c-ESPECES); } .kpi-orange { --kpi: var(--c-OM); }
.kpi-tete { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--doux); font-weight: 500; }
.kpi-icone { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--kpi); background: color-mix(in srgb, var(--kpi) 14%, transparent); }
.kpi-valeur { font-size: 24px; font-weight: 700; letter-spacing: -.3px; font-family: var(--police); white-space: nowrap; }
.kpi-valeur small { font-size: 12px; font-weight: 600; color: var(--doux); letter-spacing: 0; }
.kpi-or .kpi-valeur { color: var(--or); }
.kpi-sous { font-size: 12px; color: var(--tres-doux); }

/* Fauteuils */
.ligne-fauteuil { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 12px; transition: background-color .2s ease; }
a.ligne-fauteuil:hover { background: #1A1A1A; }
.ligne-fauteuil .numero { width: 30px; height: 30px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--or); background: var(--or-doux); font-family: var(--police); }
.ligne-fauteuil.libre { opacity: .5; }
.ligne-fauteuil.libre .numero { color: var(--doux); background: #1E1E1E; }
.lf-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lf-corps b { font-size: 14px; font-weight: 600; }
.lf-corps small { font-size: 12px; color: var(--doux); }
.lf-montant { font-size: 15px; font-weight: 700; font-family: var(--police); }
.jauge { height: 5px; border-radius: 3px; background: #1F1F1F; overflow: hidden; margin-top: 3px; }
.jauge span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #B8924E, var(--or)); transform-origin: left; animation: pousse .9s cubic-bezier(.2, .8, .2, 1) both; }
html[dir="rtl"] .jauge span { transform-origin: right; background: linear-gradient(-90deg, #B8924E, var(--or)); }

/* Paiements */
.barre-paiements { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 3px; background: #1F1F1F; margin: 8px 0 4px; }
.barre-paiements span { transform-origin: left; animation: pousse .9s cubic-bezier(.2, .8, .2, 1) both; }
html[dir="rtl"] .barre-paiements span { transform-origin: right; }
.barre-paiements .vide { flex: 1; background: #1F1F1F; }
.legende { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.legende li { display: grid; grid-template-columns: auto 1fr auto 46px; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; border-bottom: 1px solid #1C1C1C; }
.legende li:last-child { border-bottom: 0; }
.legende .pastille { width: 10px; height: 10px; border-radius: 3px; margin: 0; }
.legende b { font-family: var(--police); font-weight: 600; }
.legende small { color: var(--tres-doux); text-align: end; font-size: 12px; }
.alerte { border-color: rgba(255, 138, 61, .5); background: rgba(255, 138, 61, .06); color: var(--texte); }
.alerte .ic { color: var(--c-OM); }

@keyframes pousse { from { transform: scaleX(0); } to { transform: scaleX(1); } }
#app.calme .jauge span, #app.calme .barre-paiements span { animation: none; }
.kpis > * { animation: entree .5s cubic-bezier(.2, .7, .2, 1) both; }
.kpis > *:nth-child(2) { animation-delay: .06s; } .kpis > *:nth-child(3) { animation-delay: .12s; } .kpis > *:nth-child(4) { animation-delay: .18s; }
#app.calme .kpis > * { animation: none; }

/* PC : tout plus fin et plus aéré */
@media (min-width: 900px) {
  .tableau .colonnes { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page { padding: 22px 32px 32px; gap: 16px; max-width: 1240px; }
  .entete { min-height: 40px; }
  .entete h1 { font-size: 21px; }
  .entete .bouton-carre { width: 38px; height: 38px; border-radius: 11px; }
  .sur-titre { font-size: 11px; }
  .langues button { padding: 5px 10px; font-size: 11px; min-height: 28px; }
  .menu-cote { width: 216px; padding: 22px 14px; gap: 22px; }
  .logo-petit { font-size: 24px; }
  .logo-petit svg { width: 24px; height: 24px; }
  .menu-cote nav a { font-size: 14px; padding: 9px 12px; gap: 10px; position: relative; }
  .menu-cote nav a .ic { width: 18px; height: 18px; }
  .menu-cote nav a.on { background: var(--or-doux); color: var(--or); font-weight: 600; }
  .menu-cote nav a.on::before { content: ''; position: absolute; inset-inline-start: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--or); }
  .menu-cote .signature { font-size: 11px; }
  .menu-cote .signature .droits { font-size: 10px; }
  .ligne { min-height: 50px; padding: 9px 0; }
  .ligne-corps b { font-size: 14px; }
  .ligne-corps small, .ligne-heure { font-size: 12px; }
  .ligne-montant { font-size: 14px; }
  .bouton { font-size: 14px; min-height: 42px; padding: 10px 16px; }
  .bouton.grand { font-size: 15px; padding: 12px 16px; }
  .tuile { min-height: 76px; padding: 12px 14px; }
  .carte-claire { padding: 16px 18px; }
  .gros-montant { font-size: 28px; }
}
