/* ══════════════════════════════════════════════════════════════════════════
   EasySugu — Écrans d'authentification « premium »
   En-tête, héros, carte de connexion et pied de page, sensibles à
   l'environnement (Production / Formation) via body[data-env].
   Chargé après easysugu.css et instance.css.
   ══════════════════════════════════════════════════════════════════════════ */

body.ax {
  /* Production : émeraude & or */
  --ax-accent: #0f6b4c;
  --ax-accent-2: #1d885f;
  --ax-accent-3: #5fb38c;
  --ax-gold: #dba12d;
  --ax-gold-2: #f3cf82;
  --ax-deep: #03301f;
  --ax-deep-2: #022419;
  --ax-ink-on-deep: #e8f4ed;
  --ax-ring: rgba(15, 107, 76, .22);
  --ax-tint: #f1f8f3;
  --ax-tint-2: #e4f3ea;
  --ax-ease: cubic-bezier(.22, .8, .2, 1);
  --ax-spring: cubic-bezier(.34, 1.36, .5, 1);
  --ax-header-h: 70px;

  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(900px 520px at 100% -10%, rgba(219, 161, 45, .14), transparent 60%),
    radial-gradient(800px 600px at 60% 120%, rgba(15, 107, 76, .08), transparent 60%),
    var(--es-cream);
  transition: background-color .6s ease;
}
body.ax.is-training {
  /* Formation : ambre & cuivre */
  --ax-accent: #c2620a;
  --ax-accent-2: #e8890c;
  --ax-accent-3: #f6a83a;
  --ax-gold: #f6a83a;
  --ax-gold-2: #ffd38a;
  --ax-deep: #2e1604;
  --ax-deep-2: #1f0e02;
  --ax-ink-on-deep: #ffeedb;
  --ax-ring: rgba(232, 137, 12, .24);
  --ax-tint: #fffaf2;
  --ax-tint-2: #fff1db;
  background:
    radial-gradient(900px 520px at 100% -10%, rgba(246, 168, 58, .22), transparent 60%),
    radial-gradient(800px 600px at 60% 120%, rgba(194, 98, 10, .10), transparent 60%),
    #fbf6ee;
}

/* Affichage conditionnel selon l'environnement */
body.ax[data-env="production"] .when-training,
body.ax[data-env="training"] .when-prod { display: none !important; }

.ax-skip { position: absolute; left: 12px; top: -60px; z-index: 3000; padding: 10px 16px; border-radius: 10px; background: var(--ax-deep); color: #fff; font-weight: 600; }
.ax-skip:focus { top: 12px; color: #fff; }

/* ─── En-tête ──────────────────────────────────────────────────────────── */
.ax-header {
  position: sticky; top: 0; z-index: 1030; height: var(--ax-header-h);
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  box-shadow: 0 1px 0 rgba(11, 35, 30, .06), 0 10px 30px rgba(11, 35, 30, .04);
}
.ax-header-inner { height: 100%; max-width: 1600px; margin: 0 auto; padding: 0 clamp(16px, 2.4vw, 32px); display: flex; align-items: center; gap: 18px; }
.ax-header-line {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden;
  background: linear-gradient(90deg, transparent, var(--ax-accent-2) 20%, var(--ax-gold) 50%, var(--ax-accent-2) 80%, transparent);
  opacity: .75; transition: background .6s ease;
}
.ax-header-line::after {
  content: ""; position: absolute; inset: 0; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), transparent);
  animation: ax-sheen 5.5s var(--ax-ease) infinite;
}
@keyframes ax-sheen { 0% { transform: translateX(-120%); } 60%, 100% { transform: translateX(420%); } }

.ax-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--es-ink); min-width: 0; }
.ax-brand:hover { color: var(--es-ink); }
.ax-brand-mark {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(150deg, #fffdf6, #f3ead2);
  box-shadow: 0 8px 20px rgba(11, 35, 30, .12), inset 0 0 0 1px rgba(219, 161, 45, .45);
  transition: transform .5s var(--ax-spring);
}
.ax-brand:hover .ax-brand-mark { transform: rotate(-6deg) scale(1.05); }
.ax-brand-mark img { width: 32px; height: auto; }
.ax-brand-txt { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.ax-brand-txt strong { font-size: 1.32rem; font-weight: 800; letter-spacing: -.02em; color: var(--es-green-700); }
.ax-brand-txt strong span { color: var(--es-gold-600); }
.ax-brand-txt small { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--es-muted); font-weight: 600; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Capsule d'environnement (cliquable sur l'écran de connexion) */
.ax-env-capsule {
  margin: 0 auto; display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 10px; border-radius: 999px;
  background: linear-gradient(180deg, #fff, var(--ax-tint));
  box-shadow: 0 0 0 1px var(--ax-ring), 0 8px 22px var(--ax-ring);
  color: var(--es-ink); font-size: .84rem; user-select: none; cursor: default;
  transition: box-shadow .5s ease, background .5s ease, transform .3s var(--ax-spring);
}
.ax-env-capsule[role="button"] { cursor: pointer; }
.ax-env-capsule[role="button"]:hover { transform: translateY(-1px); }
.ax-env-capsule:focus-visible { outline: 3px solid var(--ax-ring); outline-offset: 3px; }
.ax-env-led { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--ax-accent-2); box-shadow: 0 0 0 4px var(--ax-ring); }
.ax-env-led::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ax-accent-2); animation: ax-ping 2.2s ease-out infinite; }
@keyframes ax-ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }
.ax-env-cap-txt > span { display: inline-flex; align-items: baseline; gap: 8px; }
.ax-env-cap-txt strong { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; color: var(--ax-accent); }
.ax-env-cap-txt em { font-style: normal; color: var(--es-muted); }

.ax-header-spacer { flex: 1 1 auto; }
.ax-nav { display: flex; align-items: center; gap: 6px; }
.ax-nav > a {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 12px; font-weight: 600; font-size: .88rem;
  color: var(--es-ink-2); text-decoration: none; transition: background .2s ease, color .2s ease;
}
.ax-nav > a:hover { background: var(--ax-tint-2); color: var(--ax-accent); }
.ax-nav > a i { font-size: 1rem; opacity: .8; }
.ax-clock { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 12px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--es-ink); background: rgba(11, 35, 30, .04); font-size: .88rem; }
.ax-clock i { color: var(--ax-accent); }
.ax-clock small { font-weight: 600; color: var(--es-muted); font-size: .72rem; }
.ax-net { margin: 0 2px; }
.ax-nav .es-lang { margin-inline-start: 4px; }

/* ─── Grille principale ────────────────────────────────────────────────── */
body.ax .auth-shell.ax-shell {
  flex: 1 0 auto; width: 100%; max-width: 1600px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0;
  min-height: calc(100dvh - var(--ax-header-h)); padding: 18px clamp(16px, 2.4vw, 32px) 26px;
}

/* ─── Héros ────────────────────────────────────────────────────────────── */
body.ax .auth-hero.ax-hero {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 30px;
  padding: clamp(28px, 5vh, 56px) clamp(28px, 3.6vw, 56px) 0; min-height: 600px;
  display: flex; flex-direction: column; color: #fff;
  background: var(--ax-deep-2);
  box-shadow: 0 40px 80px -30px rgba(2, 36, 25, .55), inset 0 0 0 1px rgba(255, 255, 255, .06);
  transition: box-shadow .6s ease;
}
body.ax.is-training .auth-hero.ax-hero { box-shadow: 0 40px 80px -30px rgba(46, 22, 4, .6), inset 0 0 0 1px rgba(255, 255, 255, .07); }
body.ax .auth-hero::after { display: none; } /* ancien voile « formation » remplacé */
body.ax .auth-hero > * { position: relative; z-index: 1; }

.ax-hero-bg { position: absolute !important; inset: 0; z-index: 0 !important; overflow: hidden; pointer-events: none;
  background: linear-gradient(160deg, var(--ax-deep), var(--ax-deep-2) 70%); transition: background .7s ease; }
.ax-hero-bg span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; transition: background-color .8s ease; will-change: transform; }
.ax-hero-bg .b1 { width: 460px; height: 460px; left: -120px; top: -140px; background-color: var(--ax-accent-2); animation: ax-float 18s ease-in-out infinite; }
.ax-hero-bg .b2 { width: 380px; height: 380px; right: -100px; top: 18%; background-color: var(--ax-gold); opacity: .32; animation: ax-float 22s ease-in-out infinite reverse; }
.ax-hero-bg .b3 { width: 320px; height: 320px; left: 30%; bottom: 10%; background-color: var(--ax-accent); opacity: .45; animation: ax-float 26s ease-in-out infinite; }
.ax-hero-bg .grid {
  inset: 0; width: auto; height: auto; border-radius: 0; filter: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 80% at 30% 20%, #000 20%, transparent 75%); mask-image: radial-gradient(120% 80% at 30% 20%, #000 20%, transparent 75%);
}
@keyframes ax-float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, 30px) scale(1.08); } 66% { transform: translate(-30px, 20px) scale(.95); } }

.ax-hero-copy { max-width: 620px; animation: ax-rise .7s var(--ax-ease) both; }
.ax-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: .76rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ax-gold-2);
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
body.ax .ax-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.3vw, 3.05rem); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; margin: 22px 0 0; }
.ax-grad { background: linear-gradient(90deg, var(--ax-gold-2), var(--ax-gold) 45%, var(--ax-accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.ax .ax-hero p.lead { color: var(--ax-ink-on-deep); opacity: .86; font-size: clamp(1rem, 1.25vw, 1.18rem); max-width: 520px; margin: 18px 0 0; line-height: 1.5; }

.ax-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 30px; max-width: 600px; }
.ax-kpi {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 12px 30px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .4s var(--ax-spring), box-shadow .3s ease;
}
.ax-kpi:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 18px 36px rgba(0, 0, 0, .25); }
.ax-kpi > i { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; color: var(--ax-deep-2);
  background: linear-gradient(135deg, var(--ax-gold-2), var(--ax-gold)); box-shadow: 0 8px 18px rgba(0, 0, 0, .2); }
.ax-kpi span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ax-kpi strong { color: #fff; font-size: .98rem; }
.ax-kpi small { color: var(--ax-ink-on-deep); opacity: .72; font-size: .76rem; }

.ax-steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; max-width: 520px; counter-reset: none; }
.ax-steps li {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border-radius: 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .02));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  animation: ax-rise .6s var(--ax-ease) both;
}
.ax-steps li:nth-child(2) { animation-delay: .08s; }
.ax-steps li:nth-child(3) { animation-delay: .16s; }
.ax-steps li > span { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--ax-deep-2);
  background: linear-gradient(135deg, var(--ax-gold-2), var(--ax-accent-3)); }
.ax-steps li div { display: flex; flex-direction: column; line-height: 1.25; }
.ax-steps li strong { color: #fff; }
.ax-steps li small { color: var(--ax-ink-on-deep); opacity: .75; }
@keyframes ax-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.ax-hero-art {
  position: relative; margin: auto calc(-1 * clamp(28px, 3.6vw, 56px)) 0; height: clamp(180px, 30vh, 300px); flex: 0 0 auto;
  background: url('../img/illustrations/market-login.jpg') center 78% / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 45%); mask-image: linear-gradient(180deg, transparent 0, #000 45%);
  transition: filter .8s ease;
}
.ax-hero-art.djenne { background-image: url('../img/illustrations/djenne-green.jpg'); background-size: contain; background-position: left bottom; height: clamp(220px, 40vh, 420px); }
body.ax.is-training .ax-hero-art { filter: sepia(.55) saturate(1.25) hue-rotate(-12deg) brightness(.92); }
.ax-hero-badge {
  position: absolute !important; top: 22px; right: 22px; z-index: 3 !important; padding: 8px 14px; border-radius: 999px;
  font-weight: 800; font-size: .74rem; letter-spacing: .16em; color: #2b1705;
  background: linear-gradient(90deg, var(--es-train-400), #ffd38a); box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
  animation: ax-drop .6s var(--ax-spring) both;
}
@keyframes ax-drop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
body.ax .auth-hero .es-hero-training { display: none; }

/* ─── Panneau & carte ──────────────────────────────────────────────────── */
body.ax .auth-panel.ax-panel { display: flex; align-items: center; justify-content: center; padding: 10px 0 10px clamp(18px, 3vw, 48px); }
body.ax .auth-card.ax-card {
  position: relative; width: 100%; max-width: 540px; padding: 36px 40px 30px; border-radius: 30px; overflow: hidden;
  background: rgba(255, 255, 255, .9); border: 1px solid rgba(11, 35, 30, .07);
  box-shadow: 0 40px 90px -30px rgba(11, 35, 30, .28), 0 2px 0 rgba(255, 255, 255, .9) inset;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  animation: ax-rise .7s var(--ax-ease) both .05s;
}
body.ax .auth-card.ax-card::before { /* liseré supérieur : accent (production) / hachures (formation) */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 0; opacity: 1;
  background: linear-gradient(90deg, var(--ax-accent), var(--ax-accent-2), var(--ax-gold));
}
body.ax .auth-card.ax-card[data-instance="training"]::before { background: repeating-linear-gradient(-45deg, var(--es-train-500) 0 12px, #2b2116 12px 24px); }
body.ax .auth-card.ax-card[data-instance="training"] { border-color: var(--es-train-200); box-shadow: 0 40px 90px -30px rgba(154, 74, 6, .35), 0 0 0 5px rgba(246, 168, 58, .12); }
.ax-card-glow { position: absolute; z-index: 0; width: 360px; height: 360px; right: -160px; top: -200px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--ax-ring), transparent 70%); transition: background .6s ease; }
.ax-card > *:not(.ax-card-glow) { position: relative; z-index: 1; }

.ax-card-head { text-align: left; margin-bottom: 22px; }
.ax-card-eyebrow > span { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ax-accent); }
body.ax .ax-card h2 { text-align: left; font-size: clamp(1.55rem, 2.3vw, 2rem); font-weight: 800; letter-spacing: -.025em; margin: 8px 0 0; color: var(--es-ink); }
body.ax .ax-card .sub { text-align: left; margin: 6px 0 0; color: var(--es-muted); font-size: 1rem; }

/* Sélecteur d'environnement */
.ax-switch { margin-bottom: 20px !important; }
.ax-switch-legend { float: none; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 0;
  font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--es-ink-2); }
.ax-kbd { font-family: inherit; font-size: .68rem; font-weight: 700; letter-spacing: .04em; padding: 3px 8px; border-radius: 7px; color: var(--es-muted); background: #f3f1ea; box-shadow: inset 0 -2px 0 rgba(11, 35, 30, .08), inset 0 0 0 1px rgba(11, 35, 30, .08); }
body.ax .ax-track { padding: 6px; border-radius: 20px; background: linear-gradient(180deg, #efece2, #f7f5ee); box-shadow: inset 0 2px 4px rgba(11, 35, 30, .08), inset 0 0 0 1px rgba(11, 35, 30, .05); }
body.ax .ax-glider { top: 6px; bottom: 6px; left: 6px; width: calc(50% - 6px); border-radius: 15px; }
body.ax .ax-opt { min-height: 72px; padding: 12px 14px; border-radius: 15px; gap: 12px; }
body.ax .ax-opt .opt-ico { width: 44px; height: 44px; flex-basis: 44px; border-radius: 13px; font-size: 1.3rem; }
body.ax .ax-opt .opt-txt strong { font-size: 1.04rem; font-weight: 800; }
.ax-opt .opt-check {
  position: absolute; top: 8px; right: 10px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; color: #fff;
  background: var(--ax-accent); transform: scale(0); opacity: 0; transition: transform .45s var(--ax-spring), opacity .25s ease;
}
[data-instance="production"] .ax-opt.is-prod .opt-check,
[data-instance="training"] .ax-opt.is-training .opt-check { transform: scale(1); opacity: 1; }
body.ax .ax-opt .opt-flag { top: auto; bottom: 6px; right: 10px; }

.ax-info { margin-top: 12px !important; min-height: 0 !important; }
.ax-info-box { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 16px; }
.ax-info-box p { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--es-ink-2); }
.ax-info-box p strong { color: var(--es-ink); }
.ax-info-box.is-prod { background: linear-gradient(90deg, var(--es-green-50), #fff); box-shadow: inset 0 0 0 1px var(--es-green-100); }
.ax-info-box.is-training { background: linear-gradient(90deg, var(--es-train-50), #fff); box-shadow: inset 0 0 0 1px var(--es-train-200); }
.ax-info-ico i, body.ax .es-instance-info .ax-info-ico i { color: #fff !important; }
.ax-info-ico { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: .9rem; }
.is-prod .ax-info-ico { background: linear-gradient(135deg, var(--es-green-400), var(--es-green-700)); }
.is-training .ax-info-ico { background: linear-gradient(135deg, var(--es-train-400), var(--es-train-600)); }
body.ax .es-instance-info .info-prod, body.ax .es-instance-info .info-training { animation: ax-rise .45s var(--ax-ease) both; }
body.ax [data-instance="production"] .info-training,
body.ax [data-instance="training"] .info-prod { display: none; position: static; }

/* Champs */
.ax-field { margin-bottom: 16px; }
.ax-field label, .ax-label-row label { display: block; margin-bottom: 7px; font-size: .86rem; font-weight: 700; color: var(--es-ink-2); }
.ax-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ax-label-row a { font-size: .84rem; font-weight: 700; color: var(--ax-accent); text-decoration: none; }
.ax-label-row a:hover { text-decoration: underline; }
body.ax .ax-card .form-control {
  min-height: 54px; border-radius: 15px; background: #fbfaf6; border: 1.5px solid #e6e1d3; font-size: 1rem;
  transition: border-color .2s ease, box-shadow .25s ease, background .2s ease;
}
body.ax .ax-card .form-control:hover { border-color: #d6cfbd; }
body.ax .ax-card .form-control:focus { background: #fff; border-color: var(--ax-accent-2); box-shadow: 0 0 0 4px var(--ax-ring); }
body.ax .ax-card .input-icon > .bi:first-child { color: var(--es-muted-2); transition: color .2s ease; font-size: 1.15rem; }
body.ax .ax-card .input-icon:focus-within > .bi:first-child { color: var(--ax-accent); }
.ax-caps { margin-top: 8px; font-size: .8rem; font-weight: 700; color: var(--es-train-700); display: flex; align-items: center; gap: 6px; }
.ax-remember { margin: 4px 0 20px; }
.ax-remember .form-check-input:checked { background-color: var(--ax-accent); border-color: var(--ax-accent); }
.ax-remember .form-check-input:focus { box-shadow: 0 0 0 .2rem var(--ax-ring); }
.ax-remember small { color: var(--es-muted); }

/* Bouton principal */
body.ax .ax-submit {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; border-radius: 16px; font-weight: 800; font-size: 1.06rem; letter-spacing: .01em; border: 0; color: #fff;
  background: linear-gradient(135deg, var(--ax-accent-2), var(--ax-accent) 55%, var(--ax-deep));
  box-shadow: 0 16px 30px -12px var(--ax-accent), inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: transform .25s var(--ax-spring), box-shadow .3s ease, filter .2s ease;
}
body.ax .ax-submit:hover { transform: translateY(-2px); box-shadow: 0 22px 38px -14px var(--ax-accent), inset 0 1px 0 rgba(255, 255, 255, .25); color: #fff; }
body.ax .ax-submit:active { transform: translateY(0) scale(.99); }
body.ax .ax-submit:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--ax-ring), 0 16px 30px -12px var(--ax-accent); }
body.ax .auth-card[data-instance="training"] .ax-submit { background: linear-gradient(135deg, var(--es-train-400), var(--es-train-600) 55%, #7a3a04); }
.ax-submit .lbl-prod, .ax-submit .lbl-training { align-items: center; gap: 8px; }
body.ax .auth-card[data-instance="production"] .ax-submit .lbl-prod,
body.ax .auth-card[data-instance="training"] .ax-submit .lbl-training { display: inline-flex; }
body.ax .auth-card[data-instance="production"] .ax-submit .lbl-training,
body.ax .auth-card[data-instance="training"] .ax-submit .lbl-prod { display: none; }
.ax-submit-arrow { transition: transform .3s var(--ax-spring); }
.ax-submit:hover .ax-submit-arrow { transform: translateX(5px); }
.ax-submit-shine { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-100%); pointer-events: none; }
.ax-submit:hover .ax-submit-shine { transform: translateX(100%); transition: transform .9s var(--ax-ease); }
.ax-spinner { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: ax-spin .7s linear infinite; }
.ax-submit.is-loading .ax-spinner { display: inline-block; }
.ax-submit.is-loading .ax-submit-arrow { display: none; }
.ax-submit.is-loading { opacity: .92; }
@keyframes ax-spin { to { transform: rotate(360deg); } }

body.ax .ax-card .divider-or { margin: 18px 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; color: var(--es-muted-2); }
body.ax .ax-wa { min-height: 54px; border-radius: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px solid #dcd6c6; background: #fff; color: var(--es-ink); transition: transform .25s var(--ax-spring), border-color .2s, box-shadow .25s; }
body.ax .ax-wa:hover { transform: translateY(-2px); border-color: #25a35a; color: var(--es-ink); box-shadow: 0 14px 28px -14px rgba(37, 163, 90, .55); background: #fff; }
.ax-trust { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin: 20px 0 0; font-size: .8rem; color: var(--es-muted); text-align: center; line-height: 1.4; }
.ax-trust i { color: var(--es-green-500); margin-top: 1px; }

/* Autres pages (mot de passe oublié, invitation…) : carte harmonisée */
body.ax .auth-card:not(.ax-card) { border-radius: 30px; box-shadow: 0 40px 90px -30px rgba(11, 35, 30, .28); border-color: rgba(11, 35, 30, .07); }
body.ax .auth-card:not(.ax-card)::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 30px 30px 0 0;
  background: linear-gradient(90deg, var(--es-green-500), var(--es-green-400), var(--es-gold-500)); }

/* Onde de bascule d'environnement */
body.ax.ax-switching::after {
  content: ""; position: fixed; z-index: 2500; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, transparent 55%, var(--ax-accent-3) 70%, transparent 72%);
  animation: ax-wave .9s var(--ax-ease) forwards;
}
@keyframes ax-wave { from { transform: scale(0); opacity: .7; } to { transform: scale(70); opacity: 0; } }

/* ─── Pied de page ─────────────────────────────────────────────────────── */
.ax-footer { position: relative; flex: 0 0 auto; color: rgba(232, 244, 237, .78); background: var(--ax-deep-2); transition: background .6s ease; overflow: hidden; font-size: .9rem; }
.ax-footer::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 260px at 10% 0%, rgba(255, 255, 255, .06), transparent 70%), radial-gradient(600px 300px at 95% 100%, var(--ax-ring), transparent 70%); }
.ax-footer-flag { display: flex; height: 4px; }
.ax-footer-flag i { flex: 1; }
.ax-footer-flag i:nth-child(1) { background: #14b53a; }
.ax-footer-flag i:nth-child(2) { background: #fcd116; }
.ax-footer-flag i:nth-child(3) { background: #ce1126; }
.ax-footer-inner { position: relative; max-width: 1600px; margin: 0 auto; padding: 40px clamp(16px, 2.4vw, 32px) 30px;
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.15fr); gap: 32px; }
.ax-f-brand p { margin: 16px 0 0; max-width: 380px; line-height: 1.55; color: rgba(232, 244, 237, .7); }
.ax-brand.is-light .ax-brand-txt strong { color: #fff; }
.ax-brand.is-light .ax-brand-txt strong span { color: var(--ax-gold-2); }
.ax-brand.is-light .ax-brand-txt small { color: rgba(232, 244, 237, .6); text-transform: none; letter-spacing: 0; font-size: .8rem; white-space: normal; }
.ax-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ax-badges span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: .76rem; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.ax-badges i { color: var(--ax-gold-2); }
.ax-f-col { display: flex; flex-direction: column; gap: 10px; }
.ax-f-col h3 { margin: 4px 0 6px; font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ax-gold-2); }
.ax-f-col a { display: inline-flex; align-items: center; gap: 9px; color: rgba(232, 244, 237, .82); text-decoration: none; width: fit-content; transition: color .2s ease, transform .25s var(--ax-spring); }
.ax-f-col a i { opacity: .7; }
.ax-f-col a:hover { color: #fff; transform: translateX(3px); }
.ax-f-note { display: flex; gap: 8px; font-size: .8rem; color: rgba(232, 244, 237, .6); line-height: 1.4; }
.ax-env-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.ax-env-row > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.ax-env-row strong { color: #fff; font-size: .9rem; }
.ax-env-row small { color: rgba(232, 244, 237, .6); font-size: .76rem; }
.ax-env-row .led { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.ax-env-row.is-prod .led { background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .18), 0 0 12px #3ddc84; }
.ax-env-row.is-training .led { background: var(--es-train-400); box-shadow: 0 0 0 4px rgba(246, 168, 58, .18), 0 0 12px var(--es-train-400); }
.ax-env-row.is-off .led { background: #8a959b; box-shadow: none; }
body.ax[data-env="production"] .ax-env-row.is-prod,
body.ax[data-env="training"] .ax-env-row.is-training { box-shadow: inset 0 0 0 1.5px var(--ax-accent-3); background: rgba(255, 255, 255, .09); }
.ax-footer-bottom { position: relative; max-width: 1600px; margin: 0 auto; padding: 16px clamp(16px, 2.4vw, 32px) calc(18px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: .8rem; color: rgba(232, 244, 237, .55); border-top: 1px solid rgba(255, 255, 255, .08); }
.ax-footer-bottom strong { color: #fff; }
.ax-dot-sep::before { content: "•"; margin-right: 18px; opacity: .5; }
.ax-made { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: #fff; font-weight: 600; }

/* ─── Adaptatif ───────────────────────────────────────────────────────── */
@media (max-width: 1199.98px) {
  .ax-clock { display: none; }
  .ax-kpis { grid-template-columns: 1fr; max-width: 360px; }
  .ax-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  body.ax { --ax-header-h: 62px; }
  body.ax .auth-shell.ax-shell { grid-template-columns: 1fr; min-height: 0; padding: 14px 14px 22px; }
  body.ax .auth-hero.ax-hero { display: none; }
  body.ax .auth-panel.ax-panel { padding: 6px 0; align-items: flex-start; }
  body.ax .auth-card.ax-card { margin: 0 auto; }
  .ax-nav > a span, .ax-net .txt { display: none; }
  .ax-env-cap-txt em { display: none; }
}
@media (max-width: 575.98px) {
  .ax-header-inner { gap: 10px; padding: 0 12px; }
  .ax-header .ax-brand-txt { display: none; }
  .ax-header .es-lang-label { display: none; }
  .ax-brand-mark { width: 40px; height: 40px; flex-basis: 40px; }
  .ax-brand-txt strong { font-size: 1.12rem; }
  .ax-nav > a, .ax-net { display: none; }
  .ax-env-capsule { padding: 6px 12px 6px 8px; margin: 0 0 0 auto; }
  body.ax .auth-card.ax-card { padding: 28px 20px 24px; border-radius: 24px; }
  body.ax .ax-opt { min-height: 64px; padding: 10px; gap: 8px; }
  body.ax .ax-opt .opt-ico { width: 36px; height: 36px; flex-basis: 36px; font-size: 1.1rem; }
  .ax-kbd { display: none; }
  .ax-footer-inner { grid-template-columns: 1fr; gap: 26px; padding-top: 30px; }
  .ax-made { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ax-hero-bg span, .ax-header-line::after, .ax-env-led::after { animation: none; }
  .ax-hero-copy, .ax-steps li, body.ax .auth-card.ax-card { animation: none; }
}
[dir="rtl"] .ax-made { margin-left: 0; margin-right: auto; }
[dir="rtl"] .ax-card-head, [dir="rtl"] body.ax .ax-card h2, [dir="rtl"] body.ax .ax-card .sub { text-align: right; }

/* ─── Pied de page compact (ordinateur) ───────────────────────────────── */
.ax-footer-bar { display: none; }
.ax-brand.is-mini .ax-brand-mark { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
.ax-brand.is-mini .ax-brand-mark img { width: 25px; }
.ax-brand.is-mini .ax-brand-txt strong { font-size: 1.02rem; }
.ax-brand.is-mini .ax-brand-txt small { font-size: .72rem; margin-top: 2px; }
.ax-bar-links { display: flex; gap: 4px; }
.ax-bar-links a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 10px; color: rgba(232, 244, 237, .82); text-decoration: none; font-size: .84rem; font-weight: 600; transition: background .2s, color .2s; }
.ax-bar-links a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ax-bar-links a i { opacity: .7; }
.ax-bar-env { display: flex; gap: 8px; }
.ax-env-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #fff;
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); transition: box-shadow .4s ease, background .4s ease; }
.ax-env-chip .led { width: 8px; height: 8px; border-radius: 50%; }
.ax-env-chip.is-prod .led { background: #3ddc84; box-shadow: 0 0 10px #3ddc84; }
.ax-env-chip.is-training .led { background: var(--es-train-400); box-shadow: 0 0 10px var(--es-train-400); }
.ax-env-chip.is-off .led { background: #8a959b; box-shadow: none; }
body.ax[data-env="production"] .ax-env-chip.is-prod,
body.ax[data-env="training"] .ax-env-chip.is-training { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1.5px var(--ax-accent-3); }
.ax-bar-meta { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: .78rem; color: rgba(232, 244, 237, .6); white-space: nowrap; }
.ax-bar-meta i { color: var(--ax-gold-2); }
.ax-bar-meta .ax-made { margin-left: 0; }

/* ─── Ordinateur : la page tient entièrement dans l'écran, sans défilement ── */
@media (min-width: 992px) {
  body.ax { min-height: 100vh; min-height: 100dvh; }
  body.ax .auth-shell.ax-shell { flex: 1 1 auto; min-height: 0; padding: clamp(10px, 1.8vh, 18px) clamp(16px, 2.4vw, 32px); grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  body.ax .auth-hero.ax-hero { min-height: 0; padding: clamp(20px, 4.4vh, 52px) clamp(28px, 3.4vw, 52px) 0; }
  body.ax .ax-hero h1 { font-size: clamp(1.7rem, min(3.1vw, 5.4vh), 3.05rem); margin-top: clamp(10px, 2.4vh, 22px); }
  body.ax .ax-hero p.lead { margin-top: clamp(8px, 1.8vh, 18px); font-size: clamp(.95rem, 2vh, 1.18rem); }
  .ax-kpis { margin-top: clamp(14px, 3vh, 30px); }
  .ax-kpi { padding: clamp(9px, 1.5vh, 14px); }
  .ax-steps { margin-top: clamp(12px, 2.8vh, 28px); gap: clamp(6px, 1vh, 10px); }
  .ax-steps li { padding-block: clamp(7px, 1.2vh, 12px); }
  .ax-hero-art { flex: 1 1 0; height: auto; min-height: 60px; max-height: 300px; }

  body.ax .auth-panel.ax-panel { min-height: 0; padding: 0 0 0 clamp(16px, 2.6vw, 44px); align-items: center; }
  body.ax .auth-card.ax-card { max-height: 100%; padding: clamp(16px, 3vh, 36px) clamp(24px, 2.8vw, 40px) clamp(14px, 2.4vh, 30px); }
  body.ax .ax-card-head { margin-bottom: clamp(10px, 2.2vh, 22px); }
  body.ax .ax-card h2 { font-size: clamp(1.35rem, min(2.3vw, 3.6vh), 2rem); margin-top: clamp(2px, .8vh, 8px); }
  body.ax .ax-card .sub { font-size: clamp(.88rem, 1.9vh, 1rem); margin-top: clamp(2px, .6vh, 6px); }
  body.ax .ax-switch { margin-bottom: clamp(10px, 2vh, 20px) !important; }
  body.ax .ax-switch-legend { margin-bottom: clamp(5px, 1vh, 10px); }
  body.ax .ax-opt { min-height: clamp(52px, 7.6vh, 72px); padding-block: clamp(6px, 1.2vh, 12px); }
  body.ax .ax-opt .opt-ico { width: clamp(34px, 5vh, 44px); height: clamp(34px, 5vh, 44px); flex-basis: clamp(34px, 5vh, 44px); }
  body.ax .ax-info { margin-top: clamp(6px, 1.2vh, 12px) !important; }
  body.ax .ax-info-box { padding: clamp(7px, 1.2vh, 12px) 14px; }
  body.ax .es-demo-fill { margin-top: clamp(6px, 1vh, 10px); padding-block: clamp(5px, .8vh, 8px); }
  body.ax .ax-field { margin-bottom: clamp(8px, 1.7vh, 16px); }
  body.ax .ax-field label, body.ax .ax-label-row label { margin-bottom: clamp(3px, .7vh, 7px); }
  body.ax .ax-card .form-control { min-height: clamp(42px, 5.8vh, 54px); }
  body.ax .ax-remember { margin: clamp(0px, .4vh, 4px) 0 clamp(10px, 2vh, 20px); }
  body.ax .ax-submit { min-height: clamp(44px, 6.2vh, 58px); }
  body.ax .ax-card .divider-or { margin: clamp(6px, 1.6vh, 18px) 0; }
  body.ax .ax-wa { min-height: clamp(42px, 5.6vh, 54px); }
  body.ax .ax-trust { margin-top: clamp(8px, 1.8vh, 20px); }

  /* Pied de page : barre unique, riche mais compacte */
  .ax-footer { flex: 0 0 auto; }
  .ax-footer-inner, .ax-footer-bottom { display: none; }
  .ax-footer-bar { position: relative; display: flex; align-items: center; gap: clamp(12px, 1.6vw, 24px); max-width: 1600px; margin: 0 auto;
    padding: clamp(8px, 1.3vh, 12px) clamp(16px, 2.4vw, 32px); }
}
@media (min-width: 992px) and (max-width: 1279.98px) {
  .ax-bar-links a span, .ax-bar-meta > span:first-child, .ax-brand.is-mini .ax-brand-txt small { display: none; }
  .ax-bar-links a { font-size: .8rem; padding: 6px 8px; }
}
@media (min-width: 992px) and (max-height: 820px) {
  body.ax .ax-info-box p { font-size: .8rem; line-height: 1.35; }
  body.ax .ax-trust { display: none; }
  .ax-kpi small, .ax-steps li small { display: none; }
}
@media (min-width: 992px) and (max-height: 720px) {
  body.ax { --ax-header-h: 60px; }
  .ax-brand-mark { width: 40px; height: 40px; flex-basis: 40px; }
  body.ax .ax-card-eyebrow, body.ax .ax-card .sub { display: none; }
  body.ax .ax-info-box.is-prod p, body.ax .ax-info-box.is-training p { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  body.ax .ax-card .divider-or { display: none; }
  body.ax .ax-wa { margin-top: 8px; }
  .ax-brand.is-mini .ax-brand-txt small { display: none; }
}
