/* ============================================================
   SOSPharma+ — Login page styles
   Charte graphique v1.0 — 2026
   ============================================================ */

/* ── Variables charte ─────────────────────────────────────── */
:root {
    --sp-green:      #4CD137;
    --sp-dark:       #0F3D4C;
    --sp-teal:       #1a5f7a;
    --sp-green-dark: #27ae60;
    --sp-white:      #FFFFFF;
    --sp-grey-bg:    #F5F7FA;
    --sp-text:       #2C3E50;
    --sp-muted:      #7f8c8d;
    --sp-border:     #d0d5dd;
    --sp-error:      #e74c3c;
    --sp-success-bg: #e8f8f5;
}

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

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    min-height: 100vh;
    background: var(--sp-grey-bg);
    display: flex;
    flex-direction: column;
}

@media (min-width: 861px) {
    html, body {
        height: 100%;
        overflow: hidden;
    }
}

/* ── Header (mobile uniquement) ──────────────────────────── */

.lp-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: var(--sp-white);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 2px 16px rgba(15, 61, 76, 0.08);
    position: relative;
    z-index: 20;
}

.lp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.lp-brand-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.lp-brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--sp-dark);
    letter-spacing: 0.3px;
}

.lp-btn-back {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--sp-white);
    border: 1.5px solid var(--sp-dark);
    padding: 8px 18px;
    border-radius: 50px;
    color: var(--sp-dark);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.lp-btn-back:hover {
    background: var(--sp-dark);
    color: var(--sp-white);
}

/* ── Layout principal ─────────────────────────────────────── */

.lp-wrapper {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* ── Panneau gauche : formulaire ──────────────────────────── */

.lp-form-panel {
    flex: 0 0 48%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 3rem;
    background: var(--sp-white);
}

.lp-form-inner {
    width: 100%;
    max-width: 360px;
}

.lp-title {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sp-white);
    background: var(--sp-green);
    padding: 5px 18px 7px;
    border-radius: 50px;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
    font-family: 'Poppins', sans-serif;
}

.lp-subtitle {
    color: var(--sp-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

/* Alert */
.lp-alert {
    background: #fff3e0;
    border-left: 4px solid #f39c12;
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--sp-error);
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Champs */
.lp-field {
    margin-bottom: 10px;
}

.lp-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sp-text);
    margin-bottom: 4px;
    text-align: left;
    font-family: 'Poppins', sans-serif;
}

.lp-input {
    width: 100%;
    padding: 9px 13px;
    border: 1.5px solid var(--sp-border);
    border-radius: 10px;
    font-size: 0.88rem;
    font-family: 'Poppins', sans-serif;
    color: var(--sp-text);
    background: var(--sp-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.lp-input:focus {
    border-color: var(--sp-green);
    box-shadow: 0 0 0 3px rgba(76, 209, 55, 0.15);
}

.lp-input::placeholder {
    color: #a0aec0;
}

/* Mot de passe */
.lp-password-wrap {
    position: relative;
}

.lp-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--sp-muted);
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.lp-eye-btn:hover {
    color: var(--sp-green);
}

.lp-input-pw {
    padding-right: 42px;
}

/* Toggle Se souvenir de moi */
.lp-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    margin-top: 6px;
}

.lp-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.lp-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.lp-toggle-track {
    position: absolute;
    inset: 0;
    background: #d0d5dd;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s;
}

.lp-toggle-track::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--sp-white);
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.lp-toggle input:checked ~ .lp-toggle-track {
    background: var(--sp-green);
}

.lp-toggle input:checked ~ .lp-toggle-track::before {
    transform: translateX(20px);
}

.lp-remember-label {
    font-size: 0.82rem;
    font-family: 'Poppins', sans-serif;
    color: var(--sp-muted);
    cursor: pointer;
    user-select: none;
}

/* Bouton Se connecter */
.lp-btn-submit {
    width: 100%;
    padding: 11px;
    background: var(--sp-green);
    color: var(--sp-white);
    border: none;
    border-radius: 50px;
    font-size: 0.93rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.25s, transform 0.1s, box-shadow 0.25s;
    box-shadow: 0 4px 16px rgba(76, 209, 55, 0.3);
}

.lp-btn-submit:hover {
    background: #3ec42e;
    box-shadow: 0 6px 20px rgba(76, 209, 55, 0.4);
}

.lp-btn-submit:active {
    transform: scale(0.99);
}

/* Note bas de formulaire */
.lp-note {
    text-align: center;
    color: var(--sp-muted);
    font-size: 0.78rem;
    font-family: 'Poppins', sans-serif;
    margin-top: 16px;
}

/* ── Hamburger ────────────────────────────────────────────── */

.lp-desktop-only { display: flex; }
.lp-mobile-only  { display: none; }

.lp-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--sp-grey-bg);
    border: 1.5px solid var(--sp-border);
    border-radius: 10px;
    cursor: pointer;
    padding: 8px;
    transition: background 0.2s;
}

.lp-hamburger:hover { background: #e8edf0; }

.lp-ham-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--sp-dark);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
}

.lp-hamburger--open .lp-ham-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.lp-hamburger--open .lp-ham-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.lp-hamburger--open .lp-ham-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Drawer mobile ────────────────────────────────────────── */

.lp-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100%;
    background: var(--sp-white);
    box-shadow: -4px 0 24px rgba(15, 61, 76, 0.12);
    z-index: 1000;
    transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.lp-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e8f5e9;
}

.lp-drawer-brand {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--sp-dark);
    letter-spacing: 0.2px;
}

.lp-drawer-close {
    background: var(--sp-grey-bg);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--sp-dark);
    transition: background 0.2s;
    flex-shrink: 0;
}

.lp-drawer-close:hover {
    background: #fde8e8;
    color: #e74c3c;
}

.lp-drawer--open { right: 0; }

.lp-drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-top: 1px solid var(--sp-grey-bg);
}

.lp-drawer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    color: var(--sp-dark);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    transition: background 0.18s;
}

.lp-drawer-link:hover {
    background: var(--sp-grey-bg);
    color: var(--sp-dark);
}

.lp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 61, 76, 0.4);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.lp-overlay--show { display: block; }

/* ── Panneau droit : branding ─────────────────────────────── */

.lp-brand-panel {
    flex: 1;
    background:
        radial-gradient(ellipse at 75% 18%, rgba(76, 209, 55, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 85%, rgba(0, 0, 0, 0.2) 0%, transparent 50%),
        linear-gradient(148deg, rgba(15, 61, 76, 0.55) 0%, rgba(13, 74, 94, 0.4) 35%, rgba(26, 95, 122, 0.3) 70%, rgba(30, 122, 150, 0.22) 100%),
        url('../../images/bk.png');
    background-size: auto, auto, auto, cover;
    background-position: center, center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(7% 0, 100% 0, 100% 100%, 0% 100%);
    position: relative;
    overflow: hidden;
}

/* Anneaux décoratifs */
.lp-bp-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: floatRing 9s ease-in-out infinite;
}

@keyframes floatRing {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50%       { transform: translate(-50%, -50%) translateY(-12px); }
}

.lp-bp-ring--xl { width: 580px; height: 580px; border-color: rgba(255,255,255,0.05); animation-duration: 10s; }
.lp-bp-ring--lg { width: 400px; height: 400px; animation-duration: 8s; }
.lp-bp-ring--sm { width: 250px; height: 250px; border-color: rgba(76, 209, 55, 0.15); animation-duration: 7s; }

/* Croix pharmaceutiques */
.lp-bp-plus {
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
    font-weight: 300;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.lp-bp-plus--1 { font-size: 3.2rem; top: 12%;  right: 14%; }
.lp-bp-plus--2 { font-size: 1.8rem; bottom: 18%; right: 20%; }
.lp-bp-plus--3 { font-size: 1.3rem; top: 58%;  left: 13%; }

.lp-bp-dot {
    position: absolute;
    border-radius: 50%;
    background: rgba(76, 209, 55, 0.15);
    pointer-events: none;
}

.lp-bp-dot--1 { width: 10px; height: 10px; top: 28%;  right: 28%; }
.lp-bp-dot--2 { width:  6px; height:  6px; bottom: 30%; left: 24%; }

/* Filigrane : icônes pharmaceutiques */
.lp-bp-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.08);
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

.lp-bp-icon--1 { font-size: 4.6rem; top: 10%;   left: 10%;  transform: rotate(-18deg); }
.lp-bp-icon--2 { font-size: 3.2rem; bottom: 14%; left: 16%; transform: rotate(12deg);  }
.lp-bp-icon--3 { font-size: 5.4rem; top: 36%;   right: 8%;  transform: rotate(15deg);  color: rgba(76, 209, 55, 0.1); }
.lp-bp-icon--4 { font-size: 2.6rem; top: 16%;   right: 30%; transform: rotate(-10deg); }
.lp-bp-icon--5 { font-size: 3rem;   bottom: 8%;  right: 18%; transform: rotate(-22deg); }
.lp-bp-icon--6 { font-size: 7rem;   bottom: -4%; left: -4%;  transform: rotate(8deg);  color: rgba(76, 209, 55, 0.07); }

/* Contenu branding */
.lp-brand-content {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Cercle glassmorphisme logo */
.lp-bp-logo-wrap {
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.6rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}

.lp-brand-logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.lp-brand-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--sp-white);
    letter-spacing: 4px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

.lp-brand-tagline {
    font-size: 0.82rem;
    font-family: 'Poppins', sans-serif;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.4px;
    max-width: 230px;
    line-height: 1.7;
    font-weight: 400;
}

/* ── Footer ───────────────────────────────────────────────── */

.lp-footer {
    text-align: center;
    padding: 12px 20px;
    color: var(--sp-muted);
    font-size: 0.75rem;
    font-family: 'Poppins', sans-serif;
    background: var(--sp-white);
    border-top: 1px solid #e8edf0;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 860px) {
    .lp-brand-panel  { display: none; }
    .lp-desktop-only { display: none; }
    .lp-mobile-only  { display: flex; }
    .lp-hamburger    { display: flex; }
    .lp-header       { display: flex; }

    body {
        background: linear-gradient(160deg, rgba(76,209,55,0.07) 0%, var(--sp-grey-bg) 60%, var(--sp-white) 100%);
    }

    .lp-header { border-radius: 0 0 20px 20px; }

    .lp-wrapper {
        justify-content: center;
        align-items: center;
        padding: 28px 20px;
        min-height: unset;
    }

    .lp-form-panel {
        flex: unset;
        width: 100%;
        max-width: 460px;
        padding: 0;
        background: transparent;
    }

    .lp-form-inner {
        background: var(--sp-white);
        border-radius: 20px;
        box-shadow: 0 4px 28px rgba(15, 61, 76, 0.1);
        padding: 2rem 1.8rem;
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .lp-wrapper      { padding: 16px 12px; }
    .lp-form-inner   { padding: 1.6rem 1.2rem; border-radius: 16px; }
    .lp-title        { font-size: 1.3rem; }
    .lp-brand-name   { font-size: 1.1rem; }
}
