/*!
 * AMJA — écran de connexion membre (plein écran + variante carte pour le shortcode).
 * Design & UI/UX : Fred Jérémie — https://fred.lt · Propulsé par DOSOBE — https://dosobe.com
 */
.amjal, .amjal-screen{
  --l-forest: #024035; --l-deep: #01241E; --l-ink: #0D2620; --l-text: #41554E; --l-lime: #C8F169; --l-amber: #F2A93B;
  --l-cream: #F8F5F0; --l-sand: #EFE8DC; --l-mint: #E3EEE1; --l-line: rgba(2,64,53,.16); --l-err: #9B2C1F;
  --l-display: "Unbounded", system-ui, sans-serif; --l-sans: "Jost", system-ui, sans-serif;
  font-family: var(--l-sans); color: var(--l-ink); -webkit-font-smoothing: antialiased;
}

/* ---------- Plein écran ---------- */
html:has(.amjal-body), .amjal-body{ margin: 0 !important; padding: 0 !important; background: var(--l-cream, #F8F5F0) !important; }
.amjal-body{ min-height: 100vh; min-height: 100dvh; }
.amjal-screen, .amjal-screen *, .amjal-screen *::before, .amjal-screen *::after{ box-sizing: border-box; }
.amjal-screen{ display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); min-height: 100vh; min-height: 100dvh; background: var(--l-cream); }

/* Panneau de marque */
.amjal-brand{ position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  padding: clamp(36px, 5vw, 72px); color: var(--l-cream);
  background: radial-gradient(120% 90% at 100% 0%, rgba(200,241,105,.13) 0%, transparent 55%), radial-gradient(90% 70% at 0% 100%, rgba(242,169,59,.10) 0%, transparent 60%), linear-gradient(160deg, var(--l-forest) 0%, var(--l-deep) 78%); }
.amjal-brand::after{ content: ""; position: absolute; right: -1px; bottom: -1px; width: 120px; height: 120px; background: var(--l-cream); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.amjal-logo{ position: relative; z-index: 2; display: inline-block; line-height: 0; }
.amjal-logo img{ width: 170px; height: auto; display: block; }
.amjal-brand-copy{ position: relative; z-index: 2; max-width: 540px; }
.amjal-kicker{ display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 600 12px/1 var(--l-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--l-forest); }
.amjal-kicker::before{ content: ""; width: 10px; height: 10px; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 55%, 55% 100%, 0 100%); }
.amjal-kicker.is-lime{ color: var(--l-lime); }
.amjal-display{ font-family: var(--l-display); font-weight: 500; font-size: clamp(34px, 3.6vw, 56px); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 20px; color: var(--l-cream); }
.amjal-brand-lead{ font-size: 18px; line-height: 1.6; color: rgba(248,245,240,.78); margin: 0 0 34px; max-width: 460px; }
.amjal-features{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.amjal-features li{ display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: rgba(248,245,240,.05); border: 1px solid rgba(248,245,240,.09);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%); font-size: 14px; line-height: 1.45; color: rgba(248,245,240,.72); }
.amjal-features svg{ flex: 0 0 22px; width: 22px; height: 22px; color: var(--l-lime); margin-top: 1px; }
.amjal-features strong{ display: block; color: var(--l-cream); font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.amjal-dots{ position: absolute; z-index: 1; right: clamp(24px, 4vw, 64px); top: clamp(28px, 4vw, 60px); display: grid; grid-template-columns: repeat(20, 6px); gap: 7px; opacity: .55; pointer-events: none; }
.amjal-dots i{ width: 6px; height: 6px; border-radius: 50%; background: rgba(248,245,240,.14); }
.amjal-dots i:nth-child(7n+3){ background: rgba(200,241,105,.55); animation: amjal-glow 5s ease-in-out infinite; }
.amjal-dots i:nth-child(11n+5){ background: rgba(242,169,59,.45); animation: amjal-glow 7s ease-in-out infinite 1.2s; }
@keyframes amjal-glow{ 0%, 100%{ opacity: .35; } 50%{ opacity: 1; } }

/* Panneau formulaire */
.amjal-panel{ position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: 28px clamp(28px, 5vw, 72px); background: var(--l-cream); }
.amjal-top{ display: flex; justify-content: flex-end; }
.amjal-screen .amjal-back{ display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; font: 600 14px/1 var(--l-sans) !important; color: var(--l-forest) !important; text-decoration: none !important;
  background: #fff; border: 1px solid var(--l-line); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); transition: background-color .2s, border-color .2s; }
.amjal-screen .amjal-back svg{ width: 18px; height: 18px; }
.amjal-screen .amjal-back:hover{ background: var(--l-mint); border-color: rgba(2,64,53,.3); }
.amjal-form-wrap{ flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 440px; margin: 0 auto; padding: 40px 0; }
.amjal-foot{ margin: 0; font-size: 13px; color: var(--l-text); text-align: center; }
.amjal-foot a{ color: var(--l-forest); }

/* Contenu commun (écran + carte) */
.amjal-title{ font-family: var(--l-display); font-weight: 500; font-size: clamp(28px, 3vw, 40px); line-height: 1.08; letter-spacing: -.03em; color: var(--l-ink); margin: 0 0 14px; }
.amjal-lead{ font-size: 16px; line-height: 1.6; color: var(--l-text); margin: 0 0 26px; }
.amjal-lead strong{ color: var(--l-ink); }
.amjal-form{ margin: 0; }
.amjal-form label{ display: block; font: 600 14px/1.3 var(--l-sans); color: var(--l-ink); margin: 0 0 8px; }
.amjal .amjal-form input[type="email"], .amjal .amjal-form input[type="text"],
.amjal-screen .amjal-form input[type="email"], .amjal-screen .amjal-form input[type="text"]{
  display: block; width: 100%; height: 56px; margin: 0 0 16px; padding: 0 18px; font: 400 17px/1 var(--l-sans); color: var(--l-ink);
  background: #fff !important; border: 1.5px solid var(--l-line) !important; border-radius: 0 !important; box-shadow: none; transition: border-color .2s, box-shadow .2s; }
.amjal-form input::placeholder{ color: rgba(65,85,78,.5); }
.amjal .amjal-form input:focus, .amjal-screen .amjal-form input:focus{ outline: none; border-color: var(--l-forest) !important; box-shadow: 0 0 0 4px rgba(200,241,105,.55); }
.amjal .amjal-form input[name="code"], .amjal-screen .amjal-form input[name="code"]{ height: 68px; font: 500 30px/1 var(--l-display); letter-spacing: .42em; text-align: center; padding-left: .42em; }

/* Boutons — spécificité forte : jamais de blanc sur blanc, quel que soit le thème. */
.amjal .amjal-btn, .amjal-screen .amjal-btn,
.amjal .amjal-form button.amjal-btn[type="submit"], .amjal-screen .amjal-form button.amjal-btn[type="submit"]{
  display: flex !important; width: 100%; min-height: 56px; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 0 22px !important;
  font: 600 16px/1 var(--l-sans) !important; letter-spacing: 0 !important; text-transform: none !important; text-decoration: none !important; text-align: left;
  background: var(--l-forest) !important; background-image: none !important; color: var(--l-cream) !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  cursor: pointer; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%); transition: background-color .2s, transform .2s; }
.amjal .amjal-btn span, .amjal-screen .amjal-btn span{ display: grid; place-items: center; width: 30px; height: 30px; background: var(--l-lime); color: var(--l-forest); font-size: 16px;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%); transition: transform .2s; }
.amjal .amjal-btn:hover, .amjal-screen .amjal-btn:hover, .amjal .amjal-btn:focus-visible, .amjal-screen .amjal-btn:focus-visible{ background: var(--l-deep) !important; color: var(--l-cream) !important; }
.amjal .amjal-btn:hover span, .amjal-screen .amjal-btn:hover span{ transform: translateX(3px); }
.amjal .amjal-btn:disabled, .amjal-screen .amjal-btn:disabled{ opacity: .6; cursor: wait; }
.amjal .amjal-btn.is-ghost, .amjal-screen .amjal-btn.is-ghost{ background: var(--l-sand) !important; color: var(--l-forest) !important; }
.amjal .amjal-btn.is-ghost:hover, .amjal-screen .amjal-btn.is-ghost:hover{ background: var(--l-mint) !important; color: var(--l-forest) !important; }
.amjal .amjal-link, .amjal-screen .amjal-link{ display: inline-block; margin: 16px 0 0; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important;
  font: 500 14px/1.4 var(--l-sans) !important; color: var(--l-forest) !important; text-decoration: underline !important; text-underline-offset: 3px; text-transform: none !important; cursor: pointer; }
.amjal-actions{ display: grid; gap: 10px; }
.amjal-actions .amjal-link{ justify-self: start; }
.amjal-msg{ min-height: 1.4em; margin: 14px 0 0; font-size: 14px; color: var(--l-forest); }
.amjal-msg.is-error{ color: var(--l-err); }
.amjal-note{ margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--l-line); font-size: 14px; line-height: 1.5; color: var(--l-text); }
.amjal-note a{ color: var(--l-forest); font-weight: 600; }
.amjal-hp{ position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.amjal :focus-visible, .amjal-screen :focus-visible{ outline: 3px solid var(--l-amber); outline-offset: 3px; }

/* ---------- Variante carte (shortcode dans une page) ---------- */
.amjal{ min-height: min(78vh, 760px); display: grid; place-items: center; padding: clamp(40px, 8vw, 110px) 20px;
  background: radial-gradient(rgba(2,64,53,.10) 1px, transparent 1.3px) 0 0/22px 22px, var(--l-cream); }
.amjal-card{ width: 100%; max-width: 460px; background: #fff; padding: clamp(28px, 5vw, 48px); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%); box-shadow: 0 30px 60px -40px rgba(1,36,30,.35); }

/* ---------- Tablette / mobile ---------- */
@media (max-width: 1100px){
  .amjal-screen{ grid-template-columns: minmax(0, 1fr) minmax(400px, 1fr); }
  .amjal-features{ grid-template-columns: 1fr; }
}
@media (max-width: 900px){
  .amjal-screen{ display: flex; flex-direction: column; }
  .amjal-brand{ gap: 22px; padding: calc(18px + env(safe-area-inset-top)) 20px 30px; }
  .amjal-brand::after{ width: 44px; height: 44px; }
  .amjal-logo img{ width: 128px; }
  .amjal-kicker{ margin-bottom: 10px; }
  .amjal-display{ font-size: 28px; margin: 0; }
  .amjal-display br{ display: none; }
  .amjal-brand-lead, .amjal-features{ display: none; }
  .amjal-dots{ display: none; }
  .amjal-form-wrap .amjal-kicker{ display: none; }
  .amjal-panel{ position: static; min-height: 0; flex: 1; padding: 0 20px calc(22px + env(safe-area-inset-bottom)); }
  .amjal-form-wrap{ max-width: 520px; padding: 30px 0 34px; justify-content: flex-start; }
  .amjal-title{ font-size: 26px; }
}
/* Le bouton retour reste en haut à droite, sur la bande de marque. */
@media (max-width: 900px){
  .amjal-screen{ position: relative; }
  .amjal-top{ position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; z-index: 5; }
  .amjal-screen .amjal-back{ padding: 10px 12px; background: rgba(248,245,240,.1); border-color: rgba(248,245,240,.22); color: var(--l-cream) !important; }
  .amjal-screen .amjal-back:hover{ background: rgba(248,245,240,.18); }
}
@media (max-width: 380px){ .amjal-screen .amjal-back span{ display: none; } }
@media (prefers-reduced-motion: reduce){ .amjal-dots i{ animation: none !important; } .amjal-btn, .amjal-btn span{ transition: none !important; } }
