/* assets/css/styles.css */

/* === THEME (extrait du logo) ===
   rouge : #B1361E
   vert  : #5D996D
   jaune : #f1b944
*/
:root{
  --c-red: #ec6057;
  --c-red-2: #A74F31;
  --c-green: #5D996D;
  --c-yellow: #f1bb59;

  --c-ink: #1b1b1b;
  --c-ink-2: #2b2b2b;
  --c-paper: #fff7ef;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;

  --shadow-1: 0 12px 30px rgba(0,0,0,.18);
  --shadow-2: 0 8px 18px rgba(0,0,0,.16);

  --maxw: 980px;

  /* background remplaçable */
    --bg-image: url("../img/bg.jpg"); /* remplacez bg.jpg */

  }

/* Reset */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  color: var(--c-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height: 1.35;
  background: var(--c-red);
}

/* Background image + overlay */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  
  filter: saturate() contrast();
  transform: scale(1.02);
  z-index: -2;
}
body::after{
  content:"";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1000px 650px at 20% 10%, rgba(239,183,87,.40), transparent 90%),
    radial-gradient(900px 600px at 85% 30%, rgba(93,153,109,.35), transparent 85%),
    linear-gradient(180deg, rgba(255,255,255,.0), rgba(255,255,255,.05));
  z-index: -1;
}

a{ color: inherit; }
small{ color: rgba(0,0,0,.65); }

.shell{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 16px 60px;
}

.topbar{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 14px;
  padding: 10px 0 18px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
}
.brand__logo{
  width: 50%;
  height: 50%;
  /*border-radius: 12px;
  background: rgba(255,255,255,.15);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);*/
  display:grid;
  place-items:center;
  overflow:hidden;
}
.brand__logo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand__meta{
  display:flex;
  flex-direction:column;
}
.brand__meta b{
  color: var(--c-paper);
  letter-spacing: .2px;
}
.brand__meta span{
  color: rgba(255,247,239,.78);
  font-size: 12px;
}
.percent img{
	margin-top: 10px;
  width: 30%;
  height: 30%;
  object-fit: cover;
}
.nav{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.chip{
  text-decoration:none;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(255,247,239,.92);
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
}
.chip:hover{ background: rgba(255,255,255,.18); }

.panel{
  background: rgba(255,247,239,.92);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-1);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.35);
}

.hero{
  padding: 26px 18px 18px;
  display:grid;
  gap: 16px;
}
.hero__grid{
  display:grid;
  grid-template-columns: 1.1fr .6fr;
  gap: 10px;
  align-items: center;
}
@media (max-width: 860px){
  .hero__grid{ grid-template-columns: 1fr; }
}

.h-title{
  margin: 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.6px;
}
.h-title .accent{
  color: var(--c-red);
}
.h-sub1{
font-size: clamp(22px, 10vw, 22px);
  margin: 10px 0 0;
  color: rgba(0,0,0,.70);
  max-width: 90ch;
}
.h-subintro{
	text-align: center;
  margin: 0px 0px 40px 0px;
  color: rgba(0,0,0,.70);
  max-width: 100ch;
	font-size: clamp(28px, 10vw, 28px);
}

.h-subaccueil{
	text-align: center;
  margin: 0px 0px 40px 0px;
  color: rgba(0,0,0,.70);
  max-width: 100ch;
	font-size: clamp(28px, 10vw, 28px);
}
.h-sub{
  margin: 0px 0px 0px 0px;
  color: rgba(0,0,0,.70);
  max-width: 100ch;
	font-size: clamp(20px, 10vw, 20px);
}

.kpis{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.kpi{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.20);
  box-shadow: inset 0 0 0 1px rgba(239,183,87,.35);
}
.kpi i{
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(239,183,87,.55);
  display:grid;
  place-items:center;
  font-style: normal;
}
.kpi span{
  font-size: 13px;
  color: rgba(0,0,0,.75);
}

.hero__right{
  padding: 14px;
  box-shadow: inset 0 0 0 0px rgba(0,0,0,.06);
}
.poster{
  border-radius: 0px;
  overflow:hidden;
 
}
.poster img{
  width: 100%;
  height: auto;
  display:block;
}
.poster__note{
  padding: 10px 12px;
  font-size: 12px;
  color: rgba(0,0,0,.70);
}

.actions{
	justify-content: center; 
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn{
  appearance:none;
  border:0;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 700;
  letter-spacing: .1px;
}
.btn-primary{
  color: #1b1b1b;
  background: var(--c-yellow);
  box-shadow: 0 10px 20px rgba(239,183,87,.35);
}
.btn-primary:hover{ filter: brightness(.98); }
.btn-secondary{
  color: rgba(255,247,239,.95);
  background: var(--c-green);
  box-shadow: 0 10px 20px rgba(93,153,109,.25);
}
.btn-ghost{
  color: rgba(0,0,0,.80);
  background: rgba(255,255,255,.65);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.btn:active{ transform: translateY(1px); }

.section{
  padding: 18px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 860px){
  .grid-2{ grid-template-columns: 1fr; }
}

.card{
  background: rgba(255,255,255,.70);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

.form{
  display:grid;
  gap: 12px;
}
.field{
  display:grid;
  gap: 6px;
}
label{
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,.80);
}
input, textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.92);
  font-size: 15px;
  outline:none;
}
input:focus, textarea:focus{
  border-color: rgba(93,153,109,.65);
  box-shadow: 0 0 0 4px rgba(93,153,109,.18);
}

.inline{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
}
.checkbox{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.06);
}
.checkbox input{
  width: 18px;
  height: 18px;
  margin-top: 2px;
}
.checkbox span{
  font-size: 13px;
  color: rgba(0,0,0,.75);
}

.notice{
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(239,183,87,.18);
  border: 1px solid rgba(239,183,87,.35);
  color: rgba(0,0,0,.75);
  font-size: 13px;
}

.error{
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(177,54,30,.12);
  border: 1px solid rgba(177,54,30,.25);
  color: rgba(0,0,0,.78);
  font-size: 13px;
}
.success{
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(93,153,109,.16);
  border: 1px solid rgba(93,153,109,.30);
  color: rgba(0,0,0,.78);
  font-size: 13px;
}

.footer{
  margin-top: 16px;
  color: #FFFFFF;
  font-size: 12px;
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* === Digital Loyalty Card (screen) === */
.pass{
  border-radius: 26px;
  overflow:hidden;
  box-shadow: var(--shadow-2);
  background:var(--c-red);
  color: var(--c-paper);
  border: 1px solid rgba(255,255,255,.22);
}
.pass__top{
  display:flex;
  justify-content: space-between;
  align-items:flex-start;
  gap: 12px;
  padding: 16px 16px 10px;
}
.pass__brand{
  display:flex;
  gap: 10px;
  align-items:center;
}
.pass__brand img{
  width: 50%;
  height: 50%;
  border-radius: 1px;
  object-fit: cover;
  box-shadow: inset 0 0 0 0px rgba(255,255,255,.25);
}
.pass__brand b{
  display:block;
  font-size: 16px;
  line-height: 1.1;
}
.pass__brand small{
  display:block;
  color: rgba(255,247,239,.85);
}
.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(239,183,87,.22);
  border: 1px solid rgba(239,183,87,.34);
  font-size: 12px;
  font-weight: 800;
}
.badge i{
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-yellow);
  display:inline-block;
}

.pass__mid{
  padding: 8px 16px 14px;
  display:grid;
  gap: 10px;
}
.pass__name{
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .2px;
}
.pass__meta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
}
.pass__meta .pill{
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  font-size: 12px;
  color: rgba(255,247,239,.92);
}
.pass__bottom{
  display:flex;
  justify-content: space-between;
  align-items:flex-start;
  gap: 12px;
  padding: 5px 5px 5px;
  background: rgba(0,0,0,.14);
  border-top: 1px solid rgba(255,255,255,.14);
}
.qr{
  width: 90px;
  height: 90px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  display:grid;
  place-items:center;
  overflow:hidden;
}
.qr img{
  width: 86%;
  height: 86%;
  object-fit: contain;
}
.pass__claim{
  display:grid;
  gap: 6px;
}
.pass__claim b{
  font-size: 14px;
}
.pass__claim small{
  color: rgba(255,247,239,.80);
}

/* small helper */
.muted{ color: rgba(0,0,0,.65); }

/* === Modal === */
.modal{ position: fixed; inset: 0; z-index: 50; }
.modal[hidden]{ display:none; }
.modal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
}
.modal__panel{
  position:absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 24px));
  background: rgba(255,247,239,.96);
  border-radius: 22px;
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(255,255,255,.4);
  overflow:hidden;
}
.modal__head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.modal__close{
  border:0;
  background: rgba(0,0,0,.06);
  border-radius: 12px;
  width: 38px; height: 38px;
  cursor:pointer;
}
.modal__body{
  padding: 14px;
  color: rgba(0,0,0,.78);
}
.modal__body ol{
  margin: 8px 0 0;
  padding-left: 18px;
}
.modal__foot{
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(0,0,0,.06);
  display:flex;
  justify-content:flex-end;
}
/* === MODE CAISSE (affichage ultra clean) === */
body.cashier-mode{
  background: #0b0b0b;
}

body.cashier-mode::before{ opacity: .12; }
body.cashier-mode::after{
  background: linear-gradient(180deg, rgba(0,0,0,.84), rgba(0,0,0,.84));
}

/* On masque tout ce qui n'est pas nécessaire en caisse */
body.cashier-mode .topbar,
body.cashier-mode .footer,
body.cashier-mode .section,
body.cashier-mode .h-title,
body.cashier-mode .h-sub,
body.cashier-mode .actions{
  display: none !important;
}

/* On épure le conteneur */
body.cashier-mode .shell{ padding: 10px 12px 92px; }
body.cashier-mode .panel{
  background: transparent;
  box-shadow: none;
  border: 0;
}
body.cashier-mode .hero{ padding: 0; }

/* Carte plus lisible */
body.cashier-mode .pass{
  width: min(560px, 100%);
  margin: 0 auto;
  border-radius: 28px;
}
body.cashier-mode .pass__name{ font-size: 30px; }
body.cashier-mode .pass__meta .pill{ font-size: 13px; padding: 10px 12px; }
body.cashier-mode .qr{
  width: 124px;
  height: 124px;
  border-radius: 22px;
}

/* Barre de contrôle (fixée en bas) */
/* Barre de contrôle (par défaut cachée) */
.cashier-controls{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  gap: 10px;
  z-index: 60;

  display: none; /* 👈 IMPORTANT */
}

/* Visible uniquement en mode caisse */
body.cashier-mode .cashier-controls{
  display: flex; /* 👈 seulement en mode caisse */
}

.cashier-controls .btn{
  flex: 1;
}

/* En mode normal : cachée via [hidden] */
/* === Toast update === */
.toast{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 70;
  max-width: 980px;
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 18px;
  background: rgba(255,247,239,.96);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: var(--shadow-1);
}
.toast[hidden]{ display:none; }
.toast b{ font-size: 13px; }
.toast small{ color: rgba(0,0,0,.65); }




/* Mobile */
@media (max-width: 768px) {
	.hero__right{
  padding: 4px;
  box-shadow: inset 0 0 0 0px rgba(0,0,0,.06);
}
	.poster__note{
  padding: 0px 10px;
  font-size: 12px;
  color: rgba(0,0,0,.70);
}
	
	.topbar{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 14px;
  padding: 0px 0 5px;
}
	
	.h-subaccueil{
	font-size: clamp(20px, 10vw, 18px);
}
	.h-sub1{
font-size:14px;
  margin: 0px 0 0;
  color: rgba(0,0,0,.70);
  max-width: 90ch;
}
		.h-title{
font-size:16px;
  margin: 0px 0 0;
  color: rgba(0,0,0,.70);
  max-width: 100ch;
}
	
.h-title {
	text-align: center;
  font-size: 20px;
 
}
.h-title .accent{
  color: var(--c-red);
}
.poster img{
  
  display:none;
}	
	}