/* GPI — Login utilisateur · thème Pivot (ovales animés) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap');

.pivot-login {
    --pivot-teal: #5BC4BF;
    --pivot-teal-deep: #3A9B96;
    --pivot-lime: #8DC63F;
    --pivot-orange: #F58220;
    --pivot-ink: #0f172a;
    --pivot-muted: #64748b;
    --pivot-surface: rgba(255, 255, 255, 0.92);
    --pivot-border: rgba(15, 23, 42, 0.08);
    --pivot-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    font-family: 'Source Sans 3', system-ui, sans-serif;
    color: var(--pivot-ink);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(91, 196, 191, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(141, 198, 63, 0.16) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 70% 15%, rgba(245, 130, 32, 0.1) 0%, transparent 45%),
        linear-gradient(160deg, #f7fbfb 0%, #eef8f7 40%, #f8faf8 100%);
}

.pivot-login *,
.pivot-login *::before,
.pivot-login *::after {
    box-sizing: border-box;
}

.pivot-login a {
    color: var(--pivot-teal-deep);
    text-decoration: none;
    font-weight: 600;
}

.pivot-login a:hover {
    color: var(--pivot-teal);
}

/* ── Animated Pivot ovals (logo motif) ── */
.pivot-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.pivot-orb {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    opacity: 0.55;
}

.pivot-orb--1 {
    width: 420px;
    height: 280px;
    left: -80px;
    top: 8%;
    border-color: rgba(91, 196, 191, 0.45);
    background: radial-gradient(ellipse at center, rgba(91, 196, 191, 0.12), transparent 70%);
    animation: pivot-orbit-a 18s ease-in-out infinite;
}

.pivot-orb--2 {
    width: 340px;
    height: 220px;
    left: 40px;
    top: 18%;
    border-color: rgba(141, 198, 63, 0.4);
    background: radial-gradient(ellipse at center, rgba(141, 198, 63, 0.1), transparent 70%);
    animation: pivot-orbit-b 22s ease-in-out infinite;
}

.pivot-orb--3 {
    width: 260px;
    height: 170px;
    right: -40px;
    bottom: 12%;
    border-color: rgba(245, 130, 32, 0.35);
    background: radial-gradient(ellipse at center, rgba(245, 130, 32, 0.1), transparent 70%);
    animation: pivot-orbit-c 16s ease-in-out infinite;
}

.pivot-orb--4 {
    width: 180px;
    height: 120px;
    right: 18%;
    top: 10%;
    border-color: rgba(58, 155, 150, 0.35);
    animation: pivot-pulse 8s ease-in-out infinite;
}

.pivot-orb--soft {
    border-width: 0;
    filter: blur(2px);
}

@keyframes pivot-orbit-a {
    0%, 100% { transform: rotate(-12deg) translate(0, 0) scale(1); }
    50% { transform: rotate(8deg) translate(24px, 18px) scale(1.05); }
}

@keyframes pivot-orbit-b {
    0%, 100% { transform: rotate(18deg) translate(0, 0) scale(1); }
    50% { transform: rotate(-6deg) translate(-20px, 12px) scale(1.08); }
}

@keyframes pivot-orbit-c {
    0%, 100% { transform: rotate(-20deg) translate(0, 0); }
    50% { transform: rotate(10deg) translate(-16px, -20px); }
}

@keyframes pivot-pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

/* ── Layout ── */
.pivot-login__shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 2rem;
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

@media (max-width: 900px) {
    .pivot-login__shell {
        grid-template-columns: 1fr;
        padding: 1.5rem 1rem 2rem;
        gap: 1.5rem;
    }
}

/* ── Brand / hero ── */
.pivot-login__brand {
    position: relative;
    padding: 1rem 0.5rem;
    animation: pivot-fade-up 0.7s ease both;
}

.pivot-logo-stage {
    position: relative;
    width: min(280px, 70vw);
    height: min(220px, 50vw);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pivot-logo-ring {
    position: absolute;
    border-radius: 50%;
    border: 2.5px solid var(--ring-color, var(--pivot-teal));
    opacity: 0.85;
    animation: pivot-ring-spin var(--ring-duration, 14s) linear infinite;
}

.pivot-logo-ring--a {
    width: 92%;
    height: 68%;
    --ring-color: var(--pivot-teal);
    --ring-duration: 16s;
    animation-direction: normal;
}

.pivot-logo-ring--b {
    width: 74%;
    height: 88%;
    --ring-color: var(--pivot-lime);
    --ring-duration: 20s;
    animation-direction: reverse;
    opacity: 0.7;
}

.pivot-logo-ring--c {
    width: 58%;
    height: 48%;
    --ring-color: var(--pivot-orange);
    --ring-duration: 12s;
    opacity: 0.55;
}

@keyframes pivot-ring-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pivot-logo-mark {
    position: relative;
    z-index: 2;
    width: 88px;
    height: 88px;
    border-radius: 24px;
    background: #fff;
    box-shadow:
        0 12px 32px rgba(91, 196, 191, 0.28),
        0 0 0 1px rgba(91, 196, 191, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pivot-logo-float 5s ease-in-out infinite;
}

.pivot-logo-mark img {
    width: 58px;
    height: auto;
    display: block;
}

@keyframes pivot-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.pivot-login__brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 0.65rem;
    color: var(--pivot-ink);
}

.pivot-login__brand-name span {
    background: linear-gradient(120deg, var(--pivot-teal-deep), var(--pivot-teal) 45%, var(--pivot-lime));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pivot-login__tagline {
    font-size: 1.05rem;
    color: var(--pivot-muted);
    max-width: 28rem;
    line-height: 1.55;
    margin: 0 0 1.5rem;
}

.pivot-login__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.pivot-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--pivot-border);
    color: var(--pivot-ink);
    backdrop-filter: blur(8px);
}

.pivot-pill i {
    color: var(--pill-accent, var(--pivot-teal));
    font-size: 0.85rem;
}

.pivot-pill--teal { --pill-accent: var(--pivot-teal); }
.pivot-pill--lime { --pill-accent: var(--pivot-lime); }
.pivot-pill--orange { --pill-accent: var(--pivot-orange); }

/* ── Form panel ── */
.pivot-login__panel {
    animation: pivot-fade-up 0.7s ease 0.15s both;
}

.pivot-login__card {
    background: var(--pivot-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--pivot-border);
    border-radius: 24px;
    box-shadow: var(--pivot-shadow);
    padding: 1.75rem 1.65rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.pivot-login__card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--pivot-teal), var(--pivot-lime), var(--pivot-orange));
}

.pivot-login__card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
}

.pivot-login__card-sub {
    font-size: 0.88rem;
    color: var(--pivot-muted);
    margin: 0 0 1.35rem;
}

.pivot-field {
    margin-bottom: 0.95rem;
}

.pivot-field__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pivot-muted);
    margin-bottom: 0.35rem;
}

.pivot-field__control {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    padding: 0.15rem 0.9rem;
    min-height: 48px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pivot-field__control:focus-within {
    border-color: var(--pivot-teal);
    box-shadow: 0 0 0 3px rgba(91, 196, 191, 0.22);
}

.pivot-field__control i {
    color: var(--pivot-teal);
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.pivot-field__control input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 0.95rem;
    color: var(--pivot-ink);
    padding: 0.7rem 0;
    min-width: 0;
}

.pivot-field__control input::placeholder {
    color: #94a3b8;
}

.pivot-field__toggle {
    border: none;
    background: transparent;
    color: var(--pivot-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: inline-flex;
    transition: color 0.2s ease;
}

.pivot-field__toggle:hover {
    color: var(--pivot-teal-deep);
}

.pivot-field__error {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #dc2626;
    font-weight: 500;
}

.pivot-login__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin: 0.35rem 0 1.15rem;
}

.pivot-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--pivot-muted);
    cursor: pointer;
    user-select: none;
}

.pivot-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--pivot-teal);
    cursor: pointer;
}

.pivot-login__forgot {
    font-size: 0.85rem;
}

.pivot-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: none;
    border-radius: 14px;
    padding: 0.85rem 1.25rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--pivot-teal) 0%, var(--pivot-teal-deep) 100%);
    box-shadow: 0 10px 24px rgba(91, 196, 191, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.pivot-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(58, 155, 150, 0.4);
    filter: brightness(1.03);
}

.pivot-btn:active {
    transform: translateY(0);
}

.pivot-login__footer-links {
    text-align: center;
    margin-top: 1.15rem;
    font-size: 0.88rem;
    color: var(--pivot-muted);
}

.pivot-login__legal {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.pivot-theme-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--pivot-border);
    background: rgba(255, 255, 255, 0.9);
    color: var(--pivot-teal-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease;
}

.pivot-theme-btn:hover {
    transform: scale(1.08) rotate(12deg);
}

@keyframes pivot-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dark mode */
[data-theme="dark"] .pivot-login,
[data-bs-theme="dark"] .pivot-login {
    --pivot-ink: #f1f5f9;
    --pivot-muted: #94a3b8;
    --pivot-surface: rgba(15, 23, 42, 0.88);
    --pivot-border: rgba(148, 163, 184, 0.18);
    --pivot-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(91, 196, 191, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(141, 198, 63, 0.1) 0%, transparent 50%),
        linear-gradient(160deg, #0b1220 0%, #0f172a 50%, #111827 100%);
}

[data-theme="dark"] .pivot-login__card,
[data-bs-theme="dark"] .pivot-login__card,
[data-theme="dark"] .pivot-field__control,
[data-bs-theme="dark"] .pivot-field__control,
[data-theme="dark"] .pivot-pill,
[data-bs-theme="dark"] .pivot-pill,
[data-theme="dark"] .pivot-theme-btn,
[data-bs-theme="dark"] .pivot-theme-btn,
[data-theme="dark"] .pivot-logo-mark,
[data-bs-theme="dark"] .pivot-logo-mark {
    background: rgba(30, 41, 59, 0.95);
}

[data-theme="dark"] .pivot-field__control input,
[data-bs-theme="dark"] .pivot-field__control input {
    color: #f1f5f9;
}

@media (prefers-reduced-motion: reduce) {
    .pivot-orb,
    .pivot-logo-ring,
    .pivot-logo-mark,
    .pivot-login__brand,
    .pivot-login__panel {
        animation: none !important;
    }
}
