/* ============================================================================
   OptimaGate — verrou d'accès par code, gardé en cache (localStorage).
   ----------------------------------------------------------------------------
   Soft-security (côté client) pour maquettes de démo. Autonome : palette sable
   Expace en dur (doit s'afficher AVANT le boot de l'app). Scopé #optimaGate.
   Config par page : window.__OPTIMA_GATE__ = { code, key, eyebrow, title, sub }.
   ========================================================================== */

/* Tant que verrouillé : on masque l'app ET le panneau recette. */
.gate-locked .app-root,
.gate-locked .orx-wrap { display: none !important; }
.gate-locked, .gate-locked body { overflow: hidden; }

#optimaGate{
  position: fixed; inset: 0; z-index: 100000;
  display: grid; place-items: center; padding: 24px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1c1813;
  background:
    radial-gradient(120% 90% at 50% -10%, #f5ece2 0%, #faf7f3 46%, #f3ece2 100%);
  -webkit-font-smoothing: antialiased;
  animation: og-in .35s ease both;
}
#optimaGate.out{ animation: og-out .3s ease forwards; }

.og-card{
  width: min(400px, 100%);
  background: #ffffff;
  border: 1px solid #ece5db;
  border-radius: 18px;
  padding: 34px 30px 28px;
  box-shadow: 0 18px 44px -16px rgba(60,44,28,.34), 0 4px 12px -6px rgba(60,44,28,.14);
  text-align: left;
}
.og-mark{
  display: flex; align-items: center; gap: 9px;
  color: #9c6f3e; margin-bottom: 22px;
}
.og-mark svg{ height: 16px; width: auto; display: block; color: #1c1813; }
.og-mark .og-dot{ width: 5px; height: 5px; border-radius: 999px; background: #d5ab84; }
.og-mark .og-wm{ font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #776c61; }

.og-eyebrow{ font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #b4742a; }
.og-title{ font-size: 23px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin-top: 7px; }
.og-sub{ font-size: 13.5px; color: #776c61; margin-top: 9px; line-height: 1.5; }

.og-field{ margin-top: 22px; }
.og-input{
  width: 100%; height: 46px; padding: 0 14px;
  font: inherit; font-size: 15px; color: #1c1813;
  background: #fdf9f4; border: 1px solid #e8d5c2; border-radius: 11px;
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.og-input::placeholder{ color: #b6a797; }
.og-input:focus{ border-color: #d5ab84; box-shadow: 0 0 0 3px rgba(213,171,132,.28); }

.og-btn{
  width: 100%; height: 46px; margin-top: 12px;
  font: inherit; font-size: 14.5px; font-weight: 600; color: #241d15;
  background: #d5ab84; border: none; border-radius: 11px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 20px -6px rgba(170,125,80,.5);
  transition: background .15s ease, transform .06s ease;
}
.og-btn:hover{ background: #c69a6f; }
.og-btn:active{ transform: translateY(1px); }
.og-btn svg{ height: 17px; width: 17px; }

.og-err{
  min-height: 17px; margin-top: 11px;
  font-size: 12.5px; font-weight: 600; color: #b42318;
  opacity: 0; transition: opacity .15s ease;
}
.og-err.show{ opacity: 1; }

.og-foot{ margin-top: 20px; font-size: 11.5px; color: #b6a797; }

#optimaGate.shake .og-card{ animation: og-shake .4s ease; }

@keyframes og-in{ from{ opacity: 0 } to{ opacity: 1 } }
@keyframes og-out{ to{ opacity: 0; visibility: hidden } }
@keyframes og-shake{
  0%,100%{ transform: translateX(0) }
  20%{ transform: translateX(-7px) } 40%{ transform: translateX(6px) }
  60%{ transform: translateX(-4px) } 80%{ transform: translateX(3px) }
}
