@charset "utf-8";
/* Page de connexion (public/index.php) — autonome, sans le template CelestialUI. */

@font-face { font-family: 'Roboto'; font-weight: 400; font-display: swap;
    src: url('../fonts/Roboto/Roboto-Regular.woff2') format('woff2'), url('../fonts/Roboto/Roboto-Regular.woff') format('woff'); }
@font-face { font-family: 'Roboto'; font-weight: 500; font-display: swap;
    src: url('../fonts/Roboto/Roboto-Medium.woff2') format('woff2'), url('../fonts/Roboto/Roboto-Medium.woff') format('woff'); }
@font-face { font-family: 'Roboto'; font-weight: 700; font-display: swap;
    src: url('../fonts/Roboto/Roboto-Bold.woff2') format('woff2'), url('../fonts/Roboto/Roboto-Bold.woff') format('woff'); }

:root {
    --np-red: #e30613;
    --np-red-hover: #c20510;
    --np-navy: #0b1a6e;          /* bleu du logo Neo-Planner */
    --np-text: #111827;
    --np-text-2: #4b5563;
    --np-muted: #6b7280;
    --np-border: #d1d5db;
    --np-bg: #f3f4f6;
    --np-radius: 12px;
    --np-font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.np-login {
    font-family: var(--np-font);
    color: var(--np-text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.np-login__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
    min-height: 100vh;
}

/* ---------- Visuel ---------- */
.np-login__hero {
    position: relative;
    overflow: hidden;
    background: #1f2329;
}
.np-login__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 40% center;
    transform: scale(1.02);
    animation: np-zoom 18s ease-out forwards;
}
@keyframes np-zoom { to { transform: scale(1.08); } }
.np-login__hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(17, 24, 39, .15) 0%, rgba(17, 24, 39, 0) 35%, rgba(17, 24, 39, .78) 100%),
        linear-gradient(90deg, rgba(17, 24, 39, .25) 0%, rgba(17, 24, 39, 0) 50%);
}
.np-login__hero-content {
    position: absolute;
    left: 56px;
    right: 56px;
    bottom: 56px;
    z-index: 1;
    color: #fff;
    max-width: 560px;
}
.np-login__gostore { width: 240px; max-width: 70%; height: auto; display: block; margin-bottom: 18px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35)); }
.np-login__tagline {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85);
}
.np-login__claim {
    margin: 0;
    font-size: 26px;
    line-height: 1.3;
    font-weight: 500;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

/* ---------- Panneau ---------- */
.np-login__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px 24px;
    background: #fff;
}
.np-login__card { width: 100%; max-width: 380px; margin: auto 0; }
.np-login__logo { display: block; width: 210px; max-width: 70%; height: auto; margin: 0 auto 36px; }
.np-login__title { margin: 0 0 8px; font-size: 26px; font-weight: 700; color: var(--np-text); }
.np-login__subtitle { margin: 0 0 28px; font-size: 14px; line-height: 1.55; color: var(--np-muted); }

.np-login__error {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--np-red);
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 14px;
}

.np-login__form { display: grid; gap: 18px; }

.np-field { display: block; }
.np-field__label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 500; color: var(--np-text-2); }
.np-field__control { position: relative; display: flex; align-items: center; }
.np-field__control > svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    fill: #9ca3af;
    pointer-events: none;
    transition: fill .15s;
}
.np-field__control input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 44px;
    border: 1px solid var(--np-border);
    border-radius: 10px;
    background: #fff;
    color: var(--np-text);
    font: inherit;
    font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
}
.np-field__control input::placeholder { color: #9ca3af; }
.np-field__control input:hover { border-color: #9ca3af; }
.np-field__control input:focus { outline: none; border-color: var(--np-red); box-shadow: 0 0 0 4px rgba(227, 6, 19, .12); }
.np-field__control:focus-within > svg { fill: var(--np-red); }

.np-field__toggle {
    position: absolute;
    right: 6px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.np-field__toggle svg { width: 20px; height: 20px; fill: #9ca3af; }
.np-field__toggle:hover svg, .np-field__toggle[aria-pressed="true"] svg { fill: var(--np-text-2); }
.np-field__toggle:focus-visible { outline: 2px solid var(--np-red); outline-offset: 1px; }

.np-login__submit {
    margin-top: 6px;
    height: 50px;
    border: 0;
    border-radius: 10px;
    background: var(--np-red);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(227, 6, 19, .25);
    transition: background .15s, transform .1s, box-shadow .15s;
}
.np-login__submit:hover { background: var(--np-red-hover); box-shadow: 0 8px 20px rgba(227, 6, 19, .3); }
.np-login__submit:active { transform: translateY(1px); }
.np-login__submit:focus-visible { outline: 3px solid rgba(227, 6, 19, .35); outline-offset: 2px; }

.np-login__footer { margin-top: 32px; font-size: 12px; color: #9ca3af; text-align: center; }

/* ---------- Tablette / mobile : la photo devient un bandeau ---------- */
@media (max-width: 900px) {
    .np-login__layout { grid-template-columns: 1fr; grid-template-rows: 240px 1fr; }
    .np-login__hero-content { left: 24px; right: 24px; bottom: 22px; }
    .np-login__gostore { width: 170px; margin-bottom: 10px; }
    .np-login__claim { font-size: 18px; }
    .np-login__panel { padding: 32px 20px 20px; }
    .np-login__logo { width: 170px; margin-bottom: 24px; }
}
@media (max-width: 480px) {
    .np-login__layout { grid-template-rows: 190px 1fr; }
    .np-login__claim { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .np-login__photo { animation: none; transform: none; }
}
