/* ══════════════════════════════════════════════════════════════════════
   ftm-auth.css — Fast Track Maroc, authentication screens
   web/assets/css/ftm-auth.css

   Covers login, registration, password reset, change password and
   profile. Split layout: brand panel on the left, form card on the
   right, stacking to a compact header on mobile.

   Palette is the site identity — plum #2d0845 and gold #c49a38 — so the
   auth screens no longer read as a different product.
   ══════════════════════════════════════════════════════════════════════ */

:root{
    --plum:#2d0845;
    --plum-deep:#1b0130;
    --plum-soft:#faf7fd;
    --gold:#c49a38;
    --gold-lite:#e7c66a;
    --gold-soft:rgba(196,154,56,.14);
    --ink:#101113;
    --slate:#6b6478;
    --line:#e6e2ec;
    --ok:#1f9d55;
    --danger:#d64545;
    --radius:16px;
}

*{box-sizing:border-box}

html,body{height:100%}
body.ftm-auth{
    margin:0;
    font-family:'Poppins',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
    color:var(--ink);
    background:#fbfaf8;
    -webkit-font-smoothing:antialiased;
}

/* ══ SHELL ═══════════════════════════════════════════════════════════ */
.ftm-shell{display:flex;min-height:100vh}

/* ── Brand panel ── */
.ftm-brand{
    position:relative;flex:0 0 46%;max-width:620px;
    display:flex;flex-direction:column;justify-content:space-between;
    padding:44px 48px;color:#fff;overflow:hidden;
    background:#1b0130;
}
.ftm-brand__bg{position:absolute;top:0;left:0;right:0;bottom:0;
    background-size:cover;background-position:center;transform:scale(1.05)}
.ftm-brand__veil{position:absolute;top:0;left:0;right:0;bottom:0;
    background:linear-gradient(150deg,rgba(27,1,48,.94) 0%,rgba(45,8,69,.86) 55%,rgba(61,17,96,.62) 100%)}
.ftm-brand__in{position:relative;z-index:2}

.ftm-logo{height:52px;width:auto;display:block}
.ftm-brand__head{margin-top:auto;padding-top:44px}
.ftm-brand h1{font-size:34px;font-weight:800;line-height:1.15;margin:0 0 14px;letter-spacing:-.5px}
.ftm-brand h1 em{font-style:normal;
    background:linear-gradient(92deg,var(--gold-lite),var(--gold));
    -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.ftm-brand p{font-size:15px;line-height:1.65;color:rgba(255,255,255,.76);margin:0;max-width:420px}

.ftm-points{list-style:none;margin:30px 0 0;padding:0;display:grid;gap:14px}
.ftm-points li{display:flex;align-items:flex-start;gap:12px;font-size:13.5px;
    color:rgba(255,255,255,.84);line-height:1.5}
.ftm-points i{flex:0 0 30px;height:30px;border-radius:9px;background:rgba(196,154,56,.20);
    color:var(--gold-lite);display:flex;align-items:center;justify-content:center;font-size:13px}

.ftm-brand__foot{position:relative;z-index:2;padding-top:36px;font-size:12px;
    color:rgba(255,255,255,.5);display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.ftm-brand__foot a{color:rgba(255,255,255,.72);text-decoration:none}
.ftm-brand__foot a:hover{color:#fff}

/* ── Form side ── */
.ftm-main{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 24px}
.ftm-card{width:100%;max-width:460px}

.ftm-card__head{margin-bottom:26px}
.ftm-eyebrow{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--gold);
    font-weight:700;margin-bottom:9px}
.ftm-card__head h2{font-size:27px;font-weight:800;margin:0 0 8px;letter-spacing:-.4px;line-height:1.2}
.ftm-card__head p{margin:0;font-size:14px;color:var(--slate);line-height:1.6}

/* Top bar with the back link and language switch */
.ftm-topbar{position:absolute;top:22px;right:26px;display:flex;align-items:center;gap:16px;
    font-size:12.5px;z-index:5}
.ftm-topbar a{color:var(--slate);text-decoration:none;font-weight:600}
.ftm-topbar a:hover{color:var(--plum)}
.ftm-lang{display:inline-flex;background:#f2eef7;border-radius:8px;padding:3px;gap:2px}
.ftm-lang a{padding:5px 11px;border-radius:6px;font-size:11.5px;font-weight:700;color:var(--slate)}
.ftm-lang a.is-on{background:#fff;color:var(--plum);box-shadow:0 2px 6px rgba(45,8,69,.12)}

/* ══ FORM ════════════════════════════════════════════════════════════ */
.ftm-field{margin-bottom:17px}
.ftm-field > label{display:block;font-size:12.5px;font-weight:600;color:#4a4358;margin-bottom:7px}
.ftm-field > label .req{color:var(--danger);margin-left:2px}

.ftm-input-wrap{position:relative;display:block}
.ftm-input-wrap > i{position:absolute;left:15px;top:50%;transform:translateY(-50%);
    color:#b3aabf;font-size:14px;pointer-events:none;transition:color .16s}

.ftm-auth input[type="text"],
.ftm-auth input[type="email"],
.ftm-auth input[type="password"],
.ftm-auth input[type="tel"],
.ftm-auth input[type="number"],
.ftm-auth select,
.ftm-auth textarea{
    width:100%;height:52px;border:1.6px solid var(--line);border-radius:12px;background:#fff;
    padding:0 16px;font-size:14.5px;font-family:inherit;color:var(--ink);
    transition:border-color .16s,box-shadow .16s;outline:none;-webkit-appearance:none;appearance:none;
}
.ftm-auth textarea{height:auto;min-height:96px;padding:14px 16px;line-height:1.55}
.ftm-auth select{cursor:pointer;
    background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236b6478' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat:no-repeat;background-position:right 15px center;background-size:16px;padding-right:38px}

/* fields WITH a leading icon (hand-written forms only — the generated
   FOSUser forms have no icons, so plain padding is the default) */
.ftm-field.with-icon input,
.ftm-field.with-icon select{padding-left:44px}
.ftm-field.with-icon input[type="password"]{padding-right:50px}

.ftm-auth input:focus,.ftm-auth select:focus,.ftm-auth textarea:focus{
    border-color:var(--plum);box-shadow:0 0 0 4px rgba(45,8,69,.09)}
.ftm-auth input:focus + i,
.ftm-input-wrap:focus-within > i{color:var(--gold)}
.ftm-auth input:disabled{background:#f7f5fa;color:var(--slate);cursor:not-allowed}

/* password visibility toggle */
.ftm-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:40px;height:40px;
    border:0;background:transparent;color:#a79fb4;cursor:pointer;border-radius:9px;
    display:flex;align-items:center;justify-content:center;font-size:14px;transition:.15s}
.ftm-eye:hover{background:#f4f1f8;color:var(--plum)}

/* errors */
.ftm-field.has-error input,
.ftm-field.has-error select,
.ftm-field.has-error textarea{border-color:var(--danger);box-shadow:0 0 0 4px rgba(214,69,69,.08)}
.ftm-error{display:block;font-size:12px;color:var(--danger);margin-top:6px;font-weight:500;line-height:1.45}
.ftm-error li{list-style:none}
.ftm-help{display:block;font-size:11.5px;color:var(--slate);margin-top:6px;line-height:1.5}

/* checkbox / remember me */
.ftm-check{display:flex;align-items:center;gap:10px;cursor:pointer;margin:0;font-weight:400}
.ftm-check input[type="checkbox"]{width:19px;height:19px;margin:0;accent-color:#2d0845;
    cursor:pointer;flex-shrink:0;height:19px;padding:0}
.ftm-check span{font-size:13px;color:#4a4358;line-height:1.4}

.ftm-row{display:flex;align-items:center;justify-content:space-between;gap:14px;
    flex-wrap:wrap;margin:4px 0 22px}
.ftm-link{font-size:13px;color:var(--plum);font-weight:600;text-decoration:none}
.ftm-link:hover{color:var(--gold);text-decoration:underline}

/* buttons */
.ftm-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;
    height:54px;padding:0 26px;border:0;border-radius:999px;font-family:inherit;font-size:15.5px;
    font-weight:700;cursor:pointer;text-decoration:none;line-height:1;
    transition:transform .16s,box-shadow .16s,background .16s}
.ftm-btn--primary{background:linear-gradient(135deg,var(--plum) 0%,var(--plum-deep) 100%);
    color:var(--gold-lite);box-shadow:0 10px 26px rgba(45,8,69,.26)}
.ftm-btn--primary:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(45,8,69,.32);color:#fff}
.ftm-btn--gold{background:linear-gradient(135deg,var(--gold-lite),var(--gold));color:#2a1c00;
    box-shadow:0 10px 26px rgba(196,154,56,.30)}
.ftm-btn--gold:hover{transform:translateY(-2px);color:#2a1c00}
.ftm-btn--ghost{background:#fff;color:var(--plum);border:1.6px solid var(--line)}
.ftm-btn--ghost:hover{border-color:var(--plum);background:var(--plum-soft);color:var(--plum)}
.ftm-btn:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.ftm-btn + .ftm-btn{margin-top:11px}

/* alerts */
.ftm-alert{display:flex;gap:12px;padding:14px 16px;border-radius:12px;font-size:13.5px;
    line-height:1.55;margin-bottom:20px;border-left:4px solid}
.ftm-alert i{font-size:15px;margin-top:2px;flex-shrink:0}
.ftm-alert--error{background:#fdf2f2;border-color:var(--danger);color:#8e3d35}
.ftm-alert--success{background:#f1fbf5;border-color:var(--ok);color:#1b6b3d}
.ftm-alert--info{background:var(--plum-soft);border-color:var(--plum);color:#3b2b4d}
.ftm-alert--warn{background:#fff9ec;border-color:var(--gold);color:#6d5312}

/* footer under the card */
.ftm-foot{margin-top:26px;padding-top:22px;border-top:1px solid var(--line);
    text-align:center;font-size:13.5px;color:var(--slate)}
.ftm-foot a{color:var(--plum);font-weight:700;text-decoration:none}
.ftm-foot a:hover{color:var(--gold)}

/* divider */
.ftm-sep{display:flex;align-items:center;gap:14px;margin:22px 0;
    font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#a79fb4;font-weight:700}
.ftm-sep:before,.ftm-sep:after{content:"";flex:1;height:1px;background:var(--line)}

/* two-column rows inside a form */
.ftm-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
@media(max-width:520px){.ftm-grid{grid-template-columns:1fr}}

/* ══ SUCCESS / MESSAGE SCREENS ═══════════════════════════════════════ */
.ftm-icon-big{width:74px;height:74px;border-radius:50%;display:flex;align-items:center;
    justify-content:center;font-size:32px;margin-bottom:22px}
.ftm-icon-big--ok{background:#eaf9ef;color:var(--ok)}
.ftm-icon-big--mail{background:var(--gold-soft);color:var(--gold)}
.ftm-icon-big--lock{background:var(--plum-soft);color:var(--plum)}

/* ══ PROFILE ═════════════════════════════════════════════════════════ */
.ftm-profile{display:flex;align-items:center;gap:16px;padding:18px;border-radius:14px;
    background:linear-gradient(135deg,var(--plum-deep),var(--plum));color:#fff;margin-bottom:22px}
.ftm-profile__av{width:56px;height:56px;border-radius:50%;flex-shrink:0;
    background:linear-gradient(135deg,var(--gold-lite),var(--gold));color:#2a1c00;
    display:flex;align-items:center;justify-content:center;font-size:19px;font-weight:800}
.ftm-profile__name{font-size:17px;font-weight:700}
.ftm-profile__mail{font-size:12.5px;color:rgba(255,255,255,.72);margin-top:3px}

.ftm-info{border:1px solid var(--line);border-radius:14px;overflow:hidden;margin-bottom:22px}
.ftm-info__row{display:flex;justify-content:space-between;gap:16px;padding:14px 17px;
    border-bottom:1px solid #f2eef7;font-size:13.5px}
.ftm-info__row:last-child{border-bottom:0}
.ftm-info__k{color:var(--slate)}
.ftm-info__v{font-weight:600;text-align:right;word-break:break-word}
.ftm-info__v.empty{color:#b3aabf;font-weight:400}

/* ══ RESPONSIVE ══════════════════════════════════════════════════════ */
@media(max-width:980px){
    .ftm-shell{flex-direction:column}
    .ftm-brand{flex:0 0 auto;max-width:none;padding:26px 24px;min-height:210px}
    .ftm-brand__head{padding-top:22px}
    .ftm-brand h1{font-size:25px}
    .ftm-points,.ftm-brand__foot{display:none}
    .ftm-main{padding:32px 20px 48px}
    .ftm-topbar{position:static;justify-content:flex-end;margin:0 0 18px}
    .ftm-card{max-width:520px;margin:0 auto}
}
@media(max-width:520px){
    .ftm-brand{padding:22px 18px;min-height:auto}
    .ftm-logo{height:42px}
    .ftm-brand h1{font-size:21px}
    .ftm-brand p{font-size:13.5px}
    .ftm-card__head h2{font-size:23px}
}
@media (prefers-reduced-motion:reduce){
    .ftm-auth *{transition-duration:.001ms !important;animation-duration:.001ms !important}
}
