/* BarberPay — styles communs. Valeurs reprises de docs/DESIGN-caisse-barber.md (§2 et §3). */

/* Polices hébergées sur le serveur (pas d'appel à Google : aucune adresse IP de visiteur transmise). */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/oswald-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/oswald-latin-600-normal.woff2") format("woff2"); }

:root {
  /* Fonds */
  --bg-app:        #121212;
  --bg-sidebar:    #0A0A0A;
  --bg-card:       #1B1B1B;
  --bg-card-hover: #242424;
  --border-dark:   #2E2E2E;
  --border-side:   #232323;

  /* Panneau ticket (clair) */
  --bg-ticket:     #FFFFFF;
  --bg-ticket-btn: #F6F6F6;
  --border-light:  #DCDCDC;
  --divider-light: #ECECEC;
  --row-divider:   #F0F0F0;
  --bg-total:      #0E0E0E;

  /* Texte */
  --text-on-dark:       #FFFFFF;
  --text-on-dark-2:     #F5F5F5;
  --text-muted-dark:    #9A9A9A;
  --text-side:          #A8A8A8;
  --text-side-inactive: #D8D8D8;
  --text-on-light:      #111111;
  --text-muted-light:   #666666;
  --text-on-gold:       #0A0A0A;

  /* Accent */
  --gold:       #C9A44C;
  --gold-hover: #E2C57A;
  --danger:     #FF8A80;

  /* Poteau de barbier */
  --pole-red:   #C8102E;
  --pole-white: #FFFFFF;
  --pole-blue:  #1D4E9E;

  /* Rayons */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;

  /* Polices */
  --font-display: "Oswald", sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* L'attribut hidden doit toujours masquer, même un élément en display:flex. */
[hidden] { display: none !important; }

html, body { margin: 0; height: 100%; }

body {
  background: var(--bg-app);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── Mise en page centrée (connexion, messages) ─────────────────────── */
.page-centre {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.carte-connexion, .carte-message {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  text-align: center;
}

.carte-connexion h1, .carte-message h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 4px 0 24px;
}

.carte-message p { color: var(--text-side); margin: 0; }

.marque {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--gold);
  margin: 12px 0 0;
}

.texte-clair { color: var(--text-on-dark-2); margin: 0 0 8px; }
.texte-discret { color: var(--text-side); font-size: 13px; margin: 0 0 24px; }

/* ── Formulaires ────────────────────────────────────────────────────── */
form { text-align: left; }

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-side-inactive);
  margin: 16px 0 6px;
}

input[type="email"], input[type="password"], input[type="text"], input[type="search"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--bg-app);
  color: var(--text-on-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--r-sm);
  font: inherit;
}
input:focus { border-color: var(--gold); outline: none; }

.alerte {
  background: rgba(200, 16, 46, .15);
  border: 1px solid rgba(255, 138, 128, .5);
  color: var(--danger);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 14px;
  margin: 0 0 4px;
}

/* ── Boutons ────────────────────────────────────────────────────────── */
.bouton-or, .bouton-secondaire {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 24px;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
}
.bouton-or { background: var(--gold); color: var(--text-on-gold); border: 0; }
.bouton-or:hover { background: var(--gold-hover); }
.bouton-secondaire { background: transparent; color: var(--text-on-dark); border: 1.5px solid var(--border-dark); font-size: 16px; min-height: 48px; }
.bouton-secondaire:hover { background: var(--bg-card-hover); }

/* ── Logo BarberPay (DESIGN.md §5.1 et §9) ───────────────────────────── */
/* Emblème : public/img/emblem.svg. --t = diamètre ; le poteau animé recouvre exactement
   celui de l'image (cylindre x 49→71, y 33→87 dans un carré de 120). */
.embleme { --t: 60px; position: relative; display: block; width: var(--t); height: var(--t); flex: 0 0 auto; }
.embleme-grand { --t: 96px; }
.embleme img { display: block; width: 100%; height: 100%; }
.embleme-poteau {
  position: absolute;
  left: calc(var(--t) * 49 / 120);
  top: calc(var(--t) * 33 / 120);
  width: calc(var(--t) * 22 / 120);
  height: calc(var(--t) * 54 / 120);
  background:
    linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.28) 38%, rgba(255,255,255,0) 60%, rgba(0,0,0,.4)),
    repeating-linear-gradient(-45deg,
      var(--pole-red) 0 calc(var(--t) * 7 / 120),
      var(--pole-white) calc(var(--t) * 7 / 120) calc(var(--t) * 12 / 120),
      var(--pole-blue) calc(var(--t) * 12 / 120) calc(var(--t) * 19 / 120),
      var(--pole-white) calc(var(--t) * 19 / 120) calc(var(--t) * 24 / 120));
  background-position: 0 0, 0 0;
}
/* Période verticale des rayures : 24/120 du diamètre × √2. */
@keyframes poleturn {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 0, 0 calc(var(--t) * 0.282843); }
}
@media (prefers-reduced-motion: no-preference) {
  .poteau-anime { animation: poleturn 2.6s linear infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .embleme-poteau { display: none; }
}

/* Logotype : « BARBER » blanc, « PAY » or (Oswald 600). */
.logotype {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1.5px;
  line-height: 1;
  color: var(--text-on-dark);
  white-space: nowrap;
}
.logotype span { color: var(--gold); }

.logo-connexion { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 8px; }
.logo-connexion .logotype { font-size: 20px; letter-spacing: 2px; }
}
