/* ════════════════════════════════════════════════════════════
   BREXALDIE WEB AGENCY — AUTH SYSTEM
   Palette bleu corporate + accent cyan · Aurora · Parallax · Tilt 3D
   v2.0 — rebrand Brexaldie (épuré : sans drapeau / braises / topo)
   ════════════════════════════════════════════════════════════ */

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

:root {
    /* Bleu corporate Brexaldie (slots "navy" = base sombre) */
    --mt-navy:        #0E1E47;
    --mt-navy-dark:   #081330;
    --mt-navy-light:  #1E3A8A;
    --mt-navy-soft:   #2952C8;
    /* Accent cyan/sky Brexaldie (slots "gold" repurposés) */
    --mt-gold:        #38BDF8;
    --mt-gold-light:  #7DD3FC;
    --mt-gold-dark:   #0EA5E9;
    /* Filets de marque (slots "flag" repurposés en dégradé bleu) */
    --mt-flag-blue:   #2563EB;
    --mt-flag-yellow: #38BDF8;
    --mt-flag-red:    #1D4ED8;

    --mt-text:        #0F1B2D;
    --mt-text-muted:  #64748B;
    --mt-text-soft:   #94A3B8;
    --mt-border:      #E4E8EF;
    --mt-border-light:#F1F4F8;
    --mt-bg-input:    #F8FAFC;

    --mt-success:     #1E8E5A;
    --mt-danger:      #C53030;
    --mt-warning:     #B57F0A;

    --mt-radius:      12px;
    --mt-radius-lg:   16px;
}

body.mt-auth {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    /* !important : Perfex force un fond clair sur <body> — on garde le bleu de marque */
    background: var(--mt-navy-dark) !important;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
html { background: var(--mt-navy-dark); }

/* ── Neutralisation du chrome Perfex (le sélecteur global `footer{}` de
   Perfex peignait notre <footer class="mt-aside-foot"> en blanc → bande
   blanche en bas du panneau). On rétablit un fond transparent. ── */
body.mt-auth footer.mt-aside-foot {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: none !important;
    min-height: 0 !important;
}

/* Filet de marque Brexaldie en haut */
body.mt-auth::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--mt-flag-blue) 0% 33.33%,
        var(--mt-flag-yellow) 33.33% 66.66%,
        var(--mt-flag-red) 66.66% 100%);
    z-index: 10000;
}

/* ── SHELL SPLIT ── */
.mt-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ════════════════════════════════════════════════════
   PANNEAU GAUCHE — IMMERSIVE AURORA
   ════════════════════════════════════════════════════ */
.mt-aside {
    width: 46%;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 800px 600px at 30% 20%, #1E3A8A 0%, transparent 60%),
        radial-gradient(ellipse 700px 500px at 70% 80%, #2952C8 0%, transparent 55%),
        linear-gradient(165deg, var(--mt-navy-dark) 0%, var(--mt-navy) 50%, #112B63 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Filet de marque vertical */
.mt-aside::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: 4px;
    background: linear-gradient(180deg,
        var(--mt-flag-blue) 0% 33.33%,
        var(--mt-flag-yellow) 33.33% 66.66%,
        var(--mt-flag-red) 66.66% 100%);
    z-index: 9;
}

/* ── AURORA LAYERS ── */
.mt-aurora {
    position: absolute;
    inset: -100px;
    z-index: 1;
    filter: blur(70px);
    opacity: 0.55;
    pointer-events: none;
}
.mt-aurora::before,
.mt-aurora::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    will-change: transform;
}
.mt-aurora::before {
    background: radial-gradient(circle, rgba(56,189,248,0.65) 0%, transparent 70%);
    top: -10%; left: -10%;
    animation: mtAurora1 22s ease-in-out infinite alternate;
}
.mt-aurora::after {
    background: radial-gradient(circle, rgba(37,99,235,0.45) 0%, transparent 70%);
    bottom: -15%; right: -10%;
    animation: mtAurora2 26s ease-in-out infinite alternate;
}
@keyframes mtAurora1 {
    0%   { transform: translate(0,0) scale(1) rotate(0deg); }
    50%  { transform: translate(80px,-60px) scale(1.2) rotate(80deg); }
    100% { transform: translate(-40px,80px) scale(0.95) rotate(160deg); }
}
@keyframes mtAurora2 {
    0%   { transform: translate(0,0) scale(1) rotate(0deg); }
    50%  { transform: translate(-70px,50px) scale(1.15) rotate(-70deg); }
    100% { transform: translate(60px,-40px) scale(1.05) rotate(-150deg); }
}

.mt-aurora-3 {
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56,189,248,0.20) 0%, transparent 70%);
    top: 40%; left: 50%;
    transform: translate(-50%,-50%);
    filter: blur(80px);
    z-index: 1;
    animation: mtAurora3 18s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes mtAurora3 {
    0%, 100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1); }
    50%      { opacity: 0.9; transform: translate(-40%,-60%) scale(1.3); }
}

/* ── TOPOGRAPHIC MESH (désactivé — rendu épuré Brexaldie) ── */
.mt-topo {
    display: none !important;
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.22;
}
.mt-topo svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}
.mt-topo path {
    fill: none;
    stroke: var(--mt-gold);
    stroke-width: 1;
    stroke-opacity: 0.6;
    animation: mtTopoFlow 14s ease-in-out infinite;
    transform-origin: center;
}
.mt-topo path:nth-child(1) { animation-delay: 0s; stroke-opacity: 0.35; }
.mt-topo path:nth-child(2) { animation-delay: 0.6s; stroke-opacity: 0.50; }
.mt-topo path:nth-child(3) { animation-delay: 1.2s; stroke-opacity: 0.65; }
.mt-topo path:nth-child(4) { animation-delay: 1.8s; stroke-opacity: 0.55; }
.mt-topo path:nth-child(5) { animation-delay: 2.4s; stroke-opacity: 0.40; }
.mt-topo path:nth-child(6) { animation-delay: 3.0s; stroke-opacity: 0.30; }
@keyframes mtTopoFlow {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* ── CANVAS EMBERS (désactivé — rendu épuré Brexaldie) ── */
#mt-embers {
    display: none !important;
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

/* ── CONTENU IDENTITAIRE ── */
.mt-brand {
    position: relative;
    z-index: 8;
    text-align: center;
    max-width: 440px;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
    will-change: transform;
}

/* Badge eyebrow (Brexaldie · Web Agency) */
.mt-republic {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    margin-bottom: 28px;
    background: rgba(56,189,248,0.10);
    border: 1px solid rgba(56,189,248,0.32);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--mt-gold-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: mtFadeDown 0.6s cubic-bezier(0.16,1,0.3,1) both;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.05);
}
@keyframes mtFadeDown {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mt-flag-mini {
    display: inline-block;
    width: 20px; height: 13px;
    background: linear-gradient(135deg,
        var(--mt-flag-blue) 0% 30%,
        var(--mt-flag-yellow) 30% 36%,
        var(--mt-flag-red) 36% 64%,
        var(--mt-flag-yellow) 64% 70%,
        var(--mt-flag-blue) 70% 100%);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    position: relative;
}
.mt-flag-mini::after {
    content: '★';
    position: absolute;
    top: -1px; left: 2px;
    color: var(--mt-flag-yellow);
    font-size: 9px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}

/* ── LOGO + ANNEAUX DE PULSATION ── */
.mt-logo-stage {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 26px;
    animation: mtLogoIn 0.8s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}
@keyframes mtLogoIn {
    from { opacity: 0; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1); }
}
.mt-logo-stage::before,
.mt-logo-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    border: 1.5px solid rgba(56,189,248,0.45);
    pointer-events: none;
    animation: mtRingPulse 3.5s ease-out infinite;
}
.mt-logo-stage::after {
    animation-delay: 1.75s;
}
@keyframes mtRingPulse {
    0%   { inset: 0; opacity: 0.9; }
    100% { inset: -45px; opacity: 0; }
}
.mt-logo-box {
    position: relative;
    padding: 16px 26px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(56,189,248,0.08) 100%),
        rgba(14,30,71,0.30);
    border: 1px solid rgba(56,189,248,0.30);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 12px 36px rgba(0,0,0,0.30),
        inset 0 1px 0 rgba(255,255,255,0.12);
    z-index: 2;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mt-logo-box img {
    max-height: 64px;
    max-width: 200px;
    width: auto;
    height: auto;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.30));
    display: block;
}
.mt-logo-text {
    display: inline-block;
    font-size: 22px;
    font-weight: 800;
    color: var(--mt-gold-light);
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.30);
}
.mt-logo-text small {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.30em;
    color: var(--mt-gold);
    margin-top: 2px;
}

/* Titres */
.mt-brand-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.028em;
    margin-bottom: 12px;
    color: #fff;
    background: linear-gradient(135deg, #fff 0%, var(--mt-gold-light) 55%, var(--mt-gold) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation-name: mtFadeUp, mtGrad;
    animation-duration: 0.7s, 8s;
    animation-timing-function: cubic-bezier(0.16,1,0.3,1), ease-in-out;
    animation-delay: 0.2s, 0s;
    animation-iteration-count: 1, infinite;
    animation-fill-mode: both, none;
}
@keyframes mtFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes mtGrad {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.mt-brand-sub {
    color: rgba(255,255,255,0.78);
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.65;
    margin-bottom: 8px;
    animation: mtFadeUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.3s both;
}
.mt-brand-sub em {
    color: var(--mt-gold-light);
    font-style: italic;
    font-weight: 500;
}

/* Séparateur shimmer */
.mt-sep {
    width: 56px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--mt-gold), transparent);
    margin: 24px auto 28px;
    position: relative;
    overflow: hidden;
    animation: mtFadeUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.4s both;
}
.mt-sep::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(56,189,248,0.9), transparent);
    animation: mtShimmer 3s infinite;
}
@keyframes mtShimmer { to { left: 100%; } }

/* Features glass */
.mt-features {
    display: flex;
    flex-direction: column;
    gap: 11px;
    width: 100%;
    text-align: left;
    list-style: none;
    padding: 0;
}
.mt-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    color: rgba(255,255,255,0.86);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    animation: mtFeatIn 0.65s cubic-bezier(0.16,1,0.3,1) both;
}
.mt-feature:nth-child(1) { animation-delay: 0.45s; }
.mt-feature:nth-child(2) { animation-delay: 0.60s; }
.mt-feature:nth-child(3) { animation-delay: 0.75s; }
.mt-feature:nth-child(4) { animation-delay: 0.90s; }
@keyframes mtFeatIn {
    from { opacity: 0; transform: translateX(-22px); }
    to   { opacity: 1; transform: translateX(0); }
}
.mt-feature:hover {
    background: rgba(56,189,248,0.10);
    border-color: rgba(56,189,248,0.32);
    transform: translateX(6px);
    box-shadow: 0 0 22px rgba(56,189,248,0.14);
}
.mt-feat-icon {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(56,189,248,0.22), rgba(56,189,248,0.10));
    border: 1px solid rgba(56,189,248,0.20);
    border-radius: 11px;
    flex-shrink: 0;
    transition: transform 0.3s, box-shadow 0.3s;
}
.mt-feature:hover .mt-feat-icon {
    transform: scale(1.10) rotate(-5deg);
    box-shadow: 0 0 16px rgba(56,189,248,0.40);
}
.mt-feat-icon svg {
    width: 17px; height: 17px;
    stroke: var(--mt-gold-light);
    fill: none;
    stroke-width: 1.8;
}

/* Help box */
.mt-help {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(56,189,248,0.22);
    border-radius: 14px;
    padding: 20px 22px;
    text-align: left;
    backdrop-filter: blur(10px);
    animation: mtFeatIn 0.65s cubic-bezier(0.16,1,0.3,1) 0.45s both;
}
.mt-help h3 {
    color: var(--mt-gold-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mt-help h3 svg { width: 14px; height: 14px; stroke: var(--mt-gold); fill: none; stroke-width: 2; }
.mt-help p {
    color: rgba(255,255,255,0.78);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 6px;
}
.mt-help p:last-child { margin-bottom: 0; }
.mt-help strong { color: #fff; }

/* Footer aside */
.mt-aside-foot {
    position: relative;
    z-index: 8;
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.08);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    color: rgba(255,255,255,0.42);
    letter-spacing: 0.08em;
    animation: mtFadeUp 1s cubic-bezier(0.16,1,0.3,1) 1.1s both;
}
.mt-aside-version {
    background: rgba(56,189,248,0.14);
    color: var(--mt-gold);
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Powered by E-Business Afrika */
.mt-powered {
    position: relative;
    z-index: 8;
    margin-top: 14px;
    text-align: center;
    font-size: 10.5px;
    color: rgba(255,255,255,0.40);
    letter-spacing: 0.06em;
    animation: mtFadeUp 1s cubic-bezier(0.16,1,0.3,1) 1.3s both;
}
.mt-powered a {
    color: var(--mt-gold-light);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}
.mt-powered a:hover {
    color: var(--mt-gold);
    text-decoration: underline;
}

/* ════════════════════════════════════════════════════
   PANNEAU DROIT — FORM 3D TILT
   ════════════════════════════════════════════════════ */
.mt-main {
    width: 54%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 40px;
    background:
        radial-gradient(ellipse 600px 400px at 75% 5%, rgba(14,30,71,0.04) 0%, transparent 60%),
        radial-gradient(ellipse 500px 400px at 15% 95%, rgba(56,189,248,0.05) 0%, transparent 55%),
        #FAFBFD;
    position: relative;
    overflow: hidden;
    perspective: 1500px;
}
.mt-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(14,30,71,0.04) 1px, transparent 0);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 85% 85% at center, black 25%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 85% 85% at center, black 25%, transparent 80%);
    pointer-events: none;
    z-index: 1;
}
.mt-main::after {
    content: '';
    position: absolute;
    width: 360px; height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14,30,71,0.04) 0%, transparent 70%);
    top: -100px; right: -100px;
    animation: mtBlobFloat 18s ease-in-out infinite;
    pointer-events: none;
}
@keyframes mtBlobFloat {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(30px,20px) scale(1.1); }
    66%      { transform: translate(-20px,40px) scale(0.95); }
}

/* Security indicator */
.mt-security {
    position: absolute;
    top: 32px;
    right: 40px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: var(--mt-text-soft);
    letter-spacing: 0.10em;
    text-transform: uppercase;
    font-weight: 600;
    z-index: 5;
    animation: mtFadeIn 0.6s 0.5s both;
}
@keyframes mtFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.mt-security svg { width: 14px; height: 14px; stroke: var(--mt-success); fill: none; stroke-width: 2; }

/* ── CARD 3D TILT ── */
.mt-card {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 3;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
    will-change: transform;
}

.mt-card > * {
    animation: mtFormIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
.mt-card > *:nth-child(1) { animation-delay: 0.10s; }
.mt-card > *:nth-child(2) { animation-delay: 0.18s; }
.mt-card > *:nth-child(3) { animation-delay: 0.26s; }
.mt-card > *:nth-child(4) { animation-delay: 0.34s; }
.mt-card > *:nth-child(5) { animation-delay: 0.42s; }
.mt-card > *:nth-child(6) { animation-delay: 0.50s; }
.mt-card > *:nth-child(7) { animation-delay: 0.58s; }
.mt-card > *:nth-child(8) { animation-delay: 0.66s; }
.mt-card > *:nth-child(9) { animation-delay: 0.74s; }
.mt-card > *:nth-child(10) { animation-delay: 0.82s; }
@keyframes mtFormIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Back link */
.mt-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--mt-text-muted);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    transition: all 0.2s;
}
.mt-back:hover { color: var(--mt-navy); transform: translateX(-3px); }
.mt-back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Badge access */
.mt-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: linear-gradient(135deg, #F0F6FF, #EAF2FF);
    border: 1px solid #C7DBFF;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mt-gold-dark);
    margin-bottom: 22px;
}
.mt-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--mt-success);
    box-shadow: 0 0 0 3px rgba(30,142,90,0.20);
    animation: mtPulse 2s infinite;
}
@keyframes mtPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.82); }
}

/* Heading */
.mt-heading {
    font-size: 28px;
    font-weight: 800;
    color: var(--mt-navy);
    margin-bottom: 6px;
    letter-spacing: -0.028em;
}
.mt-subheading {
    font-size: 14px;
    color: var(--mt-text-muted);
    margin-bottom: 28px;
    line-height: 1.55;
}

/* Alerts */
.mt-alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 16px;
    border-radius: var(--mt-radius);
    font-size: 13px;
    margin-bottom: 18px;
    line-height: 1.5;
    border: 1px solid;
    animation: mtShake 0.45s cubic-bezier(0.16,1,0.3,1);
}
@keyframes mtShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(4px); }
}
.mt-alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; fill: none; stroke-width: 1.5; }
.mt-alert-danger  { background: #FDE8E8; border-color: #FBC9C9; color: #7B1D1D; }
.mt-alert-danger svg { stroke: var(--mt-danger); }
.mt-alert-success { background: #E7F6EE; border-color: #B8E5C7; color: #14593A; }
.mt-alert-success svg { stroke: var(--mt-success); }
.mt-alert-warning { background: #FFF4D6; border-color: #FCE4A1; color: #6B4906; }
.mt-alert-warning svg { stroke: var(--mt-warning); }

/* Form fields */
.mt-field {
    margin-bottom: 20px;
    position: relative;
}
.mt-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mt-text-muted);
    margin-bottom: 7px;
    transition: color 0.2s;
}
.mt-field:focus-within .mt-label { color: var(--mt-navy); }
.mt-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}
.mt-forgot {
    font-size: 12px;
    font-weight: 600;
    color: var(--mt-navy);
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    transition: all 0.2s;
}
.mt-forgot:hover { color: var(--mt-gold-dark); transform: translateX(2px); }

.mt-input {
    width: 100%;
    padding: 13px 16px;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--mt-text);
    background: var(--mt-bg-input);
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius);
    outline: none;
    transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
    position: relative;
}
.mt-input:hover { border-color: #C5CCD7; background: #fff; }
.mt-input:focus {
    border-color: var(--mt-navy);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(14,30,71,0.10), 0 1px 3px rgba(0,0,0,0.04);
}
.mt-input::placeholder { color: var(--mt-text-soft); }

/* Password toggle */
.mt-input-wrap { position: relative; }
.mt-input-wrap .mt-input { padding-right: 48px; }
.mt-pw-toggle {
    position: absolute;
    right: 5px; top: 50%;
    transform: translateY(-50%);
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
}
.mt-pw-toggle:hover { background: var(--mt-border-light); }
.mt-pw-toggle:active { transform: translateY(-50%) scale(0.9); }
.mt-pw-toggle svg { width: 18px; height: 18px; stroke: var(--mt-text-soft); fill: none; stroke-width: 1.5; transition: stroke 0.2s; }
.mt-pw-toggle:hover svg { stroke: var(--mt-navy); }
.mt-pw-toggle .mt-eye-off { display: none; }
.mt-pw-toggle.is-visible .mt-eye-on { display: none; }
.mt-pw-toggle.is-visible .mt-eye-off { display: block; }

.mt-recaptcha { margin-bottom: 20px; display: flex; justify-content: flex-start; }

/* Checkbox */
.mt-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    cursor: pointer;
    user-select: none;
}
.mt-checkbox input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--mt-navy);
    cursor: pointer;
    transition: transform 0.15s;
}
.mt-checkbox input[type="checkbox"]:active { transform: scale(0.85); }
.mt-checkbox label, .mt-checkbox span {
    font-size: 13px;
    color: var(--mt-text-muted);
    cursor: pointer;
    font-weight: 500;
}

/* ── SUBMIT LIQUID GOLD ── */
.mt-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background:
        linear-gradient(135deg, var(--mt-navy) 0%, var(--mt-navy-soft) 100%);
    border: none;
    border-radius: var(--mt-radius);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
    box-shadow:
        0 6px 18px rgba(14,30,71,0.30),
        inset 0 1px 0 rgba(255,255,255,0.15);
    isolation: isolate;
}
.mt-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at var(--mt-mx, 50%) var(--mt-my, 50%),
            rgba(56,189,248,0.55) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.35s;
    z-index: -1;
}
.mt-btn:hover::before { opacity: 1; }
.mt-btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -10%;
    width: 30%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(56,189,248,0.5), transparent);
    transform: skewX(-25deg);
    transition: left 0.7s cubic-bezier(0.16,1,0.3,1);
    z-index: -1;
}
.mt-btn:hover::after { left: 110%; }
.mt-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--mt-navy-soft) 0%, var(--mt-navy-light) 100%);
    box-shadow:
        0 14px 36px rgba(14,30,71,0.45),
        0 0 0 1px var(--mt-gold);
}
.mt-btn:active { transform: translateY(0); }
.mt-btn.is-loading { pointer-events: none; opacity: 0.85; }
.mt-btn.is-loading .mt-btn-text { visibility: hidden; }
.mt-btn .mt-spinner {
    display: none;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 22px; height: 22px;
    border: 2.5px solid rgba(255,255,255,0.30);
    border-top-color: var(--mt-gold);
    border-radius: 50%;
    animation: mtSpin 0.65s linear infinite;
}
.mt-btn.is-loading .mt-spinner { display: block; }
@keyframes mtSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* Register / portal link */
.mt-btn-secondary {
    display: block;
    width: 100%;
    padding: 12px 24px;
    margin-top: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--mt-navy);
    background: #fff;
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius);
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}
.mt-btn-secondary:hover {
    background: #F0F6FF;
    border-color: var(--mt-gold);
    color: var(--mt-navy);
    text-decoration: none;
}

.mt-portal-link {
    text-align: center;
    font-size: 13px;
    color: var(--mt-text-soft);
    margin-top: 24px;
}
.mt-portal-link a {
    color: var(--mt-navy);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
}
.mt-portal-link a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1.5px;
    background: var(--mt-gold);
    transition: width 0.3s cubic-bezier(0.16,1,0.3,1);
}
.mt-portal-link a:hover { color: var(--mt-gold-dark); }
.mt-portal-link a:hover::after { width: 100%; }

/* Skip link */
.mt-skip { position: absolute; left: -9999px; }
.mt-skip:focus {
    position: fixed;
    top: 12px; left: 12px;
    width: auto; height: auto;
    padding: 10px 18px;
    background: var(--mt-navy);
    color: #fff;
    border-radius: 10px;
    z-index: 9999;
    font-size: 13px;
}

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
    .mt-shell { flex-direction: column; }
    .mt-aside {
        width: 100%;
        min-height: 320px;
        padding: 36px 24px;
    }
    .mt-aside::after {
        top: auto; bottom: 0; left: 0; right: 0;
        width: 100%; height: 4px;
        background: linear-gradient(90deg,
            var(--mt-flag-blue) 0% 33.33%,
            var(--mt-flag-yellow) 33.33% 66.66%,
            var(--mt-flag-red) 66.66% 100%);
    }
    .mt-features, .mt-help { display: none; }
    .mt-aside-foot { display: none; }
    .mt-powered { margin-top: 18px; }
    .mt-sep { margin: 18px auto 0; }
    #mt-embers { display: none; }
    .mt-main {
        width: 100%;
        min-height: auto;
        padding: 36px 24px;
    }
    .mt-security { display: none; }
}
@media (max-width: 575px) {
    .mt-aside { padding: 28px 20px; min-height: 240px; }
    .mt-brand-title { font-size: 23px; }
    .mt-logo-box { padding: 12px 20px; }
    .mt-logo-box img { max-height: 52px; }
    .mt-main { padding: 28px 20px; }
    .mt-heading { font-size: 23px; }
    .mt-card { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
    }
    .mt-card, .mt-brand { transform: none !important; }
}

/* ════════════════════════════════════════════════════════════
   ▓▓▓  CLIENT MODE — "BREXALDIE SKY" THEME  ▓▓▓
   Variante plus lumineuse : bleu vif + accent cyan (espace client)
   Activé quand <body class="mt-auth mt-client-mode">
   ════════════════════════════════════════════════════════════ */

/* ── Background aside : bleu vif au lieu du navy sombre ── */
body.mt-client-mode .mt-aside {
    background:
        radial-gradient(ellipse 800px 600px at 25% 25%, #2952C8 0%, transparent 60%),
        radial-gradient(ellipse 700px 500px at 75% 75%, #2563EB 0%, transparent 55%),
        linear-gradient(165deg, #0E1E47 0%, #1D4ED8 55%, #2563EB 100%);
}

/* ── Aurora : bleu vif + cyan ── */
body.mt-client-mode .mt-aurora::before {
    background: radial-gradient(circle, rgba(56,189,248,0.50) 0%, transparent 70%);
}
body.mt-client-mode .mt-aurora::after {
    background: radial-gradient(circle, rgba(96,165,250,0.55) 0%, transparent 70%);
}
body.mt-client-mode .mt-aurora-3 {
    background: radial-gradient(circle, rgba(56,189,248,0.32) 0%, transparent 70%);
}

/* ── Topographie (désactivée) : trait cyan ── */
body.mt-client-mode .mt-topo path {
    stroke: #38BDF8;
    stroke-opacity: 0.55;
}

/* ── Badge eyebrow : accent cyan ── */
body.mt-client-mode .mt-republic {
    background: rgba(56,189,248,0.12);
    border-color: rgba(56,189,248,0.42);
    color: #7DD3FC;
    box-shadow: 0 4px 18px rgba(29,78,216,0.25), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ── Logo box : accent cyan ── */
body.mt-client-mode .mt-logo-stage::before,
body.mt-client-mode .mt-logo-stage::after {
    border-color: rgba(56,189,248,0.55);
}
body.mt-client-mode .mt-logo-box {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.14) 0%, rgba(56,189,248,0.10) 100%),
        rgba(29,78,216,0.30);
    border-color: rgba(56,189,248,0.40);
    box-shadow:
        0 12px 36px rgba(29,78,216,0.32),
        inset 0 1px 0 rgba(255,255,255,0.16);
}
body.mt-client-mode .mt-logo-text {
    color: #7DD3FC;
}
body.mt-client-mode .mt-logo-text small {
    color: #38BDF8;
}

/* ── Title gradient : blanc → cyan → bleu clair ── */
body.mt-client-mode .mt-brand-title {
    color: #fff;
    background: linear-gradient(135deg, #fff 0%, #7DD3FC 50%, #38BDF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
body.mt-client-mode .mt-brand-sub em {
    color: #7DD3FC;
}

/* ── Séparateur cyan avec shimmer bleu ── */
body.mt-client-mode .mt-sep {
    background: linear-gradient(90deg, transparent, #38BDF8, transparent);
}
body.mt-client-mode .mt-sep::after {
    background: linear-gradient(90deg, transparent, rgba(96,165,250,0.95), transparent);
}

/* ── Features : icônes cyan, hover bleu ciel ── */
body.mt-client-mode .mt-feat-icon {
    background: linear-gradient(135deg, rgba(56,189,248,0.28), rgba(96,165,250,0.14));
    border-color: rgba(56,189,248,0.28);
}
body.mt-client-mode .mt-feat-icon svg {
    stroke: #7DD3FC;
}
body.mt-client-mode .mt-feature:hover {
    background: rgba(56,189,248,0.10);
    border-color: rgba(56,189,248,0.36);
    box-shadow: 0 0 24px rgba(56,189,248,0.22);
}
body.mt-client-mode .mt-feature:hover .mt-feat-icon {
    box-shadow: 0 0 18px rgba(56,189,248,0.48);
}

/* ── Footer aside ── */
body.mt-client-mode .mt-aside-version {
    background: rgba(56,189,248,0.20);
    color: #38BDF8;
}
body.mt-client-mode .mt-powered a {
    color: #7DD3FC;
}
body.mt-client-mode .mt-powered a:hover {
    color: #38BDF8;
}

/* ── PANNEAU DROIT (form) : touches sky au lieu de gold ── */
body.mt-client-mode .mt-main {
    background:
        radial-gradient(ellipse 600px 400px at 75% 5%, rgba(37,99,235,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 500px 400px at 15% 95%, rgba(56,189,248,0.07) 0%, transparent 55%),
        #FAFCFF;
}
body.mt-client-mode .mt-main::before {
    background-image: radial-gradient(circle at 1px 1px, rgba(29,78,216,0.05) 1px, transparent 0);
}
body.mt-client-mode .mt-main::after {
    background: radial-gradient(circle, rgba(37,99,235,0.05) 0%, transparent 70%);
}

/* Badge ESPACE CLIENT : bleu + cyan, très welcoming */
body.mt-client-mode .mt-badge {
    background: linear-gradient(135deg, #E6EEFF, #EFF4FF);
    border-color: #BFD6FF;
    color: #1D4ED8;
}
body.mt-client-mode .mt-dot {
    background: #1D4ED8;
    box-shadow: 0 0 0 3px rgba(29,78,216,0.22);
}

/* Heading : bleu vif plus accessible */
body.mt-client-mode .mt-heading {
    color: #1D4ED8;
}

/* Focus inputs : ring bleu vif */
body.mt-client-mode .mt-input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.14), 0 1px 3px rgba(0,0,0,0.04);
}
body.mt-client-mode .mt-field:focus-within .mt-label {
    color: #2563EB;
}

/* Forgot link & checkbox accent */
body.mt-client-mode .mt-forgot {
    color: #1D4ED8;
}
body.mt-client-mode .mt-forgot:hover {
    color: #2563EB;
}
body.mt-client-mode .mt-checkbox input[type="checkbox"] {
    accent-color: #2563EB;
}

/* ── BOUTON SUBMIT : gradient bleu vif + glow cyan ── */
body.mt-client-mode .mt-btn {
    background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%);
    box-shadow:
        0 6px 18px rgba(29,78,216,0.35),
        inset 0 1px 0 rgba(255,255,255,0.18);
}
body.mt-client-mode .mt-btn:hover {
    background: linear-gradient(135deg, #2563EB 0%, #60A5FA 100%);
    box-shadow:
        0 14px 36px rgba(37,99,235,0.45),
        0 0 0 1px #38BDF8;
}
body.mt-client-mode .mt-btn::before {
    background: radial-gradient(circle at var(--mt-mx, 50%) var(--mt-my, 50%),
        rgba(56,189,248,0.65) 0%, transparent 50%);
}
body.mt-client-mode .mt-btn::after {
    background: linear-gradient(90deg, transparent, rgba(56,189,248,0.7), transparent);
}
body.mt-client-mode .mt-btn .mt-spinner {
    border-top-color: #38BDF8;
}

/* Secondary button (inscription) */
body.mt-client-mode .mt-btn-secondary {
    color: #1D4ED8;
}
body.mt-client-mode .mt-btn-secondary:hover {
    background: #E6EEFF;
    border-color: #2563EB;
    color: #1D4ED8;
}

/* Portal link */
body.mt-client-mode .mt-portal-link a {
    color: #1D4ED8;
}
body.mt-client-mode .mt-portal-link a::after {
    background: #38BDF8;
}
body.mt-client-mode .mt-portal-link a:hover {
    color: #2563EB;
}

/* Back link */
body.mt-client-mode .mt-back:hover {
    color: #1D4ED8;
}

/* Help box (forgot password aside) */
body.mt-client-mode .mt-help {
    border-color: rgba(56,189,248,0.28);
}
body.mt-client-mode .mt-help h3 {
    color: #7DD3FC;
}
body.mt-client-mode .mt-help h3 svg {
    stroke: #38BDF8;
}

/* Security indicator — coloration plus douce côté client */
body.mt-client-mode .mt-security {
    color: #64748B;
}
body.mt-client-mode .mt-security svg {
    stroke: #1D4ED8;
}
