/* ════════════════════════════════════════════════════════════════════════════
   Portal login — projet.tknoweb.fr
   Standalone page (no base.html.twig). Self-contained styles.
   ════════════════════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.portal-login-body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #0f172a;
    background:
        radial-gradient(ellipse at 15% 80%, rgba(59, 130, 246, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 20%, rgba(168, 85, 247, 0.16) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(14, 165, 233, 0.10) 0%, transparent 60%),
        linear-gradient(135deg, #0a0e1a 0%, #0f172a 50%, #0c1426 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

/* ─── Animated background orbs ──────────────────────────────────────────── */
.portal-bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: orbFloat 18s ease-in-out infinite;
}

.orb--1 {
    width: 460px; height: 460px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    top: -150px; left: -120px;
}

.orb--2 {
    width: 520px; height: 520px;
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    bottom: -180px; right: -160px;
    animation-delay: -6s;
}

.orb--3 {
    width: 320px; height: 320px;
    background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -12s;
    opacity: 0.35;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.08); }
    66%      { transform: translate(-30px, 40px) scale(0.96); }
}

.orb--3 {
    animation-name: orbCenterFloat;
}
@keyframes orbCenterFloat {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-52%, -48%) scale(1.1); }
}

/* ─── Layout shell ──────────────────────────────────────────────────────── */
.portal-login-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.portal-login-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 30px 80px rgba(0, 0, 0, 0.45),
        0 12px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: cardIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ─── Header ────────────────────────────────────────────────────────────── */
.portal-login-head {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1d4ed8 100%);
    padding: 36px 32px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portal-login-head::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

.portal-login-head::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #3b82f6 30%, #a855f7 70%, transparent 100%);
}

.portal-login-logo {
    height: 42px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    position: relative;
}

.portal-login-tag {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 500;
    position: relative;
}

/* ─── Body ──────────────────────────────────────────────────────────────── */
.portal-login-body-inner {
    padding: 40px 36px 28px;
}

.portal-login-title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.portal-login-subtitle {
    margin: 0 0 28px;
    font-size: 14px;
    line-height: 1.55;
    color: #64748b;
}

.portal-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 13.5px;
    line-height: 1.5;
}

.portal-alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #b91c1c;
}

.portal-alert-success {
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #15803d;
}

.portal-alert i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 16px;
}

/* ─── Form ──────────────────────────────────────────────────────────────── */
.portal-login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.portal-field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
    margin-bottom: 6px;
}

.portal-field-input {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 14px;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.portal-field-input:focus-within {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.portal-field-input > i {
    color: #94a3b8;
    font-size: 16px;
    margin-right: 10px;
    transition: color 0.18s;
}

.portal-field-input:focus-within > i {
    color: #3b82f6;
}

.portal-field-input input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 13px 0;
    font-size: 15px;
    color: #0f172a;
    font-family: inherit;
}

.portal-field-input input::placeholder {
    color: #cbd5e1;
}

.portal-eye {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px 4px 6px 8px;
    font-size: 16px;
    transition: color 0.18s;
}

.portal-eye:hover { color: #475569; }

/* ─── Submit ────────────────────────────────────────────────────────────── */
.portal-submit {
    margin-top: 10px;
    border: none;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    color: #ffffff;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.32);
    transition: transform 0.12s, box-shadow 0.18s, opacity 0.18s;
}

.portal-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(59, 130, 246, 0.42);
}

.portal-submit:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.28);
}

.portal-submit i {
    font-size: 14px;
    transition: transform 0.18s;
}

.portal-submit:hover i {
    transform: translateX(3px);
}

/* ─── Help / footer ─────────────────────────────────────────────────────── */
.portal-login-help {
    margin: 28px 0 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: #64748b;
}

.portal-login-help .text-muted { color: #94a3b8; }

.portal-login-foot {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding: 16px 36px;
    background: #fafbfc;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .portal-login-card { border-radius: 20px; }
    .portal-login-head { padding: 28px 24px 22px; }
    .portal-login-body-inner { padding: 32px 24px 22px; }
    .portal-login-foot { padding: 14px 24px; }
    .portal-login-title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .orb, .portal-login-card { animation: none; }
}
