/* ============================================
   LABOPHARMA PORTAL - Styles spécifiques
   Hérite du design system /css/style.css
   ============================================ */

/* === PAGES LAYOUT === */
.lp-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg-primary);
}

/* === LOGIN PAGE === */
.lp-login-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    backdrop-filter: blur(20px);
}

.lp-login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.lp-logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--gradient-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 28px;
    color: white;
}

.lp-logo-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.lp-logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.lp-login-footer {
    margin-top: 32px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-glass);
}

.lp-login-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.lp-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-blue);
    transition: color var(--transition-fast);
}

.lp-link:hover {
    color: var(--accent-cyan);
}

/* === ALERTS === */
.lp-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    line-height: 1.5;
}

.lp-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.lp-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

/* === TOPBAR (Dashboard) === */
.lp-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

.lp-topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lp-topbar-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.lp-topbar-brand-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.lp-topbar-brand-text span {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 8px;
}

.lp-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lp-topbar-user {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-topbar-user i {
    color: var(--accent-green);
}

.lp-btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.lp-btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

/* === DASHBOARD MAIN === */
.lp-main {
    padding-top: 104px;
    padding-bottom: 60px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.lp-main .container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* === PRODUCT FORM CARD === */
.lp-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 32px;
}

.lp-form-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.lp-form-card-header i {
    font-size: 1.3rem;
    color: var(--accent-blue);
}

.lp-form-card-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.lp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.lp-form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

.lp-ppv-wrap {
    position: relative;
}

.lp-ppv-wrap input {
    padding-right: 60px;
}

.lp-ppv-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}

.lp-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 8px;
}

.lp-btn-add:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* === PRODUCT TABLE === */
.lp-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 32px;
}

.lp-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.lp-table-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lp-table-header-left i {
    font-size: 1.3rem;
    color: var(--accent-cyan);
}

.lp-table-header-left h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.lp-product-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.lp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.lp-product-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.lp-product-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-glass);
    white-space: nowrap;
}

.lp-product-table td {
    padding: 12px 14px;
    font-size: 0.85rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.lp-product-table tr:hover td {
    background: var(--bg-card-hover);
}

.lp-product-table .td-ppv {
    font-weight: 600;
    color: var(--accent-green);
}

.lp-btn-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lp-btn-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* === LOADING SPINNER === */
.lp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px 20px;
}

.lp-loading p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.lp-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(99, 102, 241, 0.15);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* === STATUS BADGES === */
.lp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.lp-badge-draft {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.lp-badge-submitted {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

/* === ACTION BUTTONS (Edit + Delete) === */
.lp-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lp-btn-edit:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
    color: #818cf8;
}

/* === FORM EDIT MODE === */
.lp-form-card.editing {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.15), 0 4px 20px rgba(251, 191, 36, 0.08);
}

.lp-form-card.editing .lp-form-card-header i {
    color: #fbbf24;
}

.lp-form-card.editing .lp-btn-add {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.lp-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.lp-btn-cancel-edit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lp-btn-cancel-edit:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

.lp-product-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.lp-product-empty i {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* === PRODUCT CARDS (Mobile) === */
.lp-product-cards {
    display: none;
}

.lp-product-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 12px;
    position: relative;
}

.lp-product-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-glass);
}

.lp-product-card-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.lp-product-card-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.lp-product-card-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lp-product-card-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.lp-product-card-value {
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* === SUBMIT ALL BUTTON === */
.lp-submit-wrap {
    text-align: center;
}

.lp-submit-wrap .btn {
    min-width: 300px;
}

.lp-submit-wrap .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* === ADHESION PAGE === */
.lp-adhesion-card {
    width: 100%;
    max-width: 540px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    backdrop-filter: blur(20px);
}

.lp-adhesion-header {
    text-align: center;
    margin-bottom: 32px;
}

.lp-adhesion-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lp-adhesion-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === BUTTON STATES === */
.btn-loading .btn-text { display: none; }
.btn-loading .btn-spinner { display: inline-flex; }
.btn .btn-spinner {
    display: none;
    align-items: center;
    gap: 8px;
}

.btn .btn-spinner i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === reCAPTCHA BADGE (bottom-left instead of bottom-right) === */
.grecaptcha-badge {
    visibility: hidden;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .lp-main {
        padding-top: 88px;
    }
}

@media (max-width: 768px) {
    .lp-login-card {
        padding: 36px 24px;
    }

    .lp-adhesion-card {
        padding: 36px 24px;
    }

    .lp-form-grid {
        grid-template-columns: 1fr;
    }

    .lp-topbar {
        padding: 0 16px;
    }

    .lp-topbar-user {
        display: none;
    }

    .lp-table-wrap {
        display: none;
    }

    .lp-product-cards {
        display: block;
    }

    .lp-form-card,
    .lp-table-card {
        padding: 24px 20px;
    }

    .lp-main .container {
        padding: 0 16px;
    }

    .lp-submit-wrap .btn {
        min-width: auto;
        width: 100%;
    }

    .lp-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .lp-page {
        padding: 20px 12px;
    }

    .lp-login-card,
    .lp-adhesion-card {
        padding: 28px 20px;
    }

    .lp-logo-title {
        font-size: 1.6rem;
    }

    .lp-topbar-brand-text span {
        display: none;
    }

    .lp-product-card-fields {
        grid-template-columns: 1fr;
    }
}
