/* ==============================================
   Poulpe Booking — Espace privé (login + dashboards)
   ============================================== */

/* --- Layout --- */
.pb-private-wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: inherit;
}
.pb-private-wrap.pb-dashboard {
    max-width: 900px;
}

/* --- Card login / reset --- */
.pb-private-card {
    background: #fff;
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    overflow: hidden;
}
.pb-private-header {
    background: var(--color-primary, #2A5234);
    color: #fff;
    padding: 28px 32px;
    text-align: center;
}
.pb-private-header h2 {
    margin: 0 0 6px;
    font-size: 1.4em;
    color: #fff !important;
    border: none !important;
    border-bottom: 2px solid var(--color-secondary, #C9A84C) !important;
    display: inline-block;
    padding-bottom: 6px;
}
.pb-private-header p {
    margin: 0;
    color: #fff !important;
    opacity: .85;
    font-size: .95em;
}
.pb-private-body {
    padding: 28px 32px;
}

/* --- Radio toggle Parrainage / Partenariat --- */
.pb-login-type-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border: 2px solid var(--color-border, #dde5de);
    border-radius: var(--radius-full, 30px);
    overflow: hidden;
}
.pb-radio-pill {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: .9em;
    color: #555;
    transition: all .2s;
    background: #fff;
}
.pb-radio-pill input { display: none; }
.pb-radio-pill:hover { color: var(--color-primary, #2A5234); }
.pb-radio-pill.active {
    background: var(--color-primary, #2A5234);
    color: #fff;
}

/* --- Form fields --- */
.pb-private-form { margin: 0; }
.pb-field {
    margin-bottom: 18px;
}
.pb-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: .9em;
    color: #333;
}
.pb-field input[type="email"],
.pb-field input[type="password"],
.pb-field input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--color-border, #dde5de);
    border-radius: var(--radius-md, 8px);
    font-size: 1em;
    font-family: inherit;
    transition: border-color .2s;
    box-sizing: border-box;
}
.pb-field input:focus {
    outline: none;
    border-color: var(--color-primary, #2A5234);
}

/* --- Buttons --- */
.pb-btn {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: var(--radius-md, 8px);
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    line-height: 1.4;
}
.pb-btn-primary {
    background: var(--color-primary, #2A5234);
    color: #fff;
    border-color: var(--color-primary, #2A5234);
    width: 100%;
}
.pb-btn-primary:hover {
    background: var(--color-secondary, #C9A84C);
    border-color: var(--color-secondary, #C9A84C);
    color: var(--color-primary, #2A5234);
}
.pb-btn-outline {
    background: transparent;
    color: var(--color-primary, #2A5234);
    border-color: var(--color-border, #dde5de);
}
.pb-btn-outline:hover {
    border-color: var(--color-primary, #2A5234);
}
.pb-btn-sm {
    padding: 8px 16px;
    font-size: .85em;
}

/* --- Alerts --- */
.pb-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md, 8px);
    font-size: .9em;
    margin-bottom: 16px;
}
.pb-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.pb-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* --- Forgot password link --- */
.pb-login-forgot {
    text-align: center;
    margin-top: 16px;
    font-size: .9em;
}
.pb-login-forgot a {
    color: var(--color-primary, #2A5234);
    text-decoration: none;
}
.pb-login-forgot a:hover {
    text-decoration: underline;
}

/* ==============================================
   Dashboard
   ============================================== */

/* Header */
.pb-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.pb-dash-header h2 {
    margin: 0;
    color: var(--color-primary, #2A5234);
    font-size: 1.5em;
}
.pb-dash-subtitle {
    margin: 4px 0 0;
    color: #888;
    font-size: .9em;
}

/* Stats cards */
.pb-dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.pb-stat-card {
    background: #fff;
    border-radius: var(--radius-lg, 12px);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    border: 1px solid var(--color-border, #dde5de);
}
.pb-stat-value {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--color-primary, #2A5234);
}
.pb-stat-label {
    display: block;
    font-size: .85em;
    color: #888;
    margin-top: 4px;
}

/* Sections */
.pb-dash-section {
    background: #fff;
    border-radius: var(--radius-lg, 12px);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    border: 1px solid var(--color-border, #dde5de);
}
.pb-dash-section h3 {
    margin: 0 0 16px;
    color: var(--color-primary, #2A5234);
    font-size: 1.15em;
}

/* Code display */
.pb-code-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-bg-light, #f5f7f5);
    padding: 14px 20px;
    border-radius: var(--radius-md, 8px);
    margin-bottom: 8px;
}
.pb-code-value {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--color-primary, #2A5234);
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}
.pb-btn-copy {
    background: var(--color-primary, #2A5234);
    color: #fff;
    border-color: var(--color-primary, #2A5234);
}
.pb-btn-copy:hover {
    background: var(--color-secondary, #C9A84C);
    border-color: var(--color-secondary, #C9A84C);
    color: var(--color-primary, #2A5234);
}
.pb-help-text {
    color: #888;
    font-size: .85em;
    margin: 8px 0 0;
}

/* Milestones */
.pb-milestones-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pb-milestone {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md, 8px);
    background: var(--color-bg-light, #f5f7f5);
    transition: all .2s;
}
.pb-milestone--reached {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.pb-milestone-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-border, #dde5de);
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9em;
    flex-shrink: 0;
}
.pb-milestone--reached .pb-milestone-badge {
    background: var(--color-primary, #2A5234);
    color: #fff;
}
.pb-milestone-info {
    flex: 1;
}
.pb-milestone-info strong { display: block; color: #333; }
.pb-milestone-info span { font-size: .85em; color: #888; }
.pb-milestone-status { flex-shrink: 0; }

/* Badges */
.pb-badge-ok {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .8em;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
}
.pb-badge-pending {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .8em;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}

/* Reward cards */
.pb-reward-card {
    padding: 16px;
    border-radius: var(--radius-md, 8px);
    background: var(--color-bg-light, #f5f7f5);
    margin-bottom: 12px;
}
.pb-reward-info strong { display: block; color: #333; }
.pb-reward-info span { font-size: .85em; color: #888; }
.pb-reward-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.pb-reward-other-form { margin-top: 10px; }
.pb-field-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.pb-field-row input {
    flex: 1;
    min-width: 140px;
    padding: 8px 12px;
    border: 2px solid var(--color-border, #dde5de);
    border-radius: var(--radius-md, 8px);
    font-size: .9em;
    font-family: inherit;
}

/* Table */
.pb-dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9em;
}
.pb-dash-table th {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 2px solid var(--color-border, #dde5de);
    color: #888;
    font-weight: 600;
    font-size: .85em;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.pb-dash-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--color-border, #dde5de);
    color: #444;
}
.pb-dash-table tr:last-child td { border-bottom: none; }

.pb-empty {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

/* --- Booking cards --- */
.pb-bookings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pb-booking-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius-md, 8px);
    background: var(--color-bg-light, #f5f7f5);
    gap: 12px;
    flex-wrap: wrap;
}
.pb-booking-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pb-booking-info strong {
    color: #333;
}
.pb-booking-date {
    font-size: .85em;
    color: #888;
}
.pb-booking-details {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pb-booking-price {
    font-weight: 700;
    color: var(--color-primary, #2A5234);
    font-size: 1.05em;
}
.pb-btn-invoice {
    white-space: nowrap;
}

/* --- Badge error (cancelled) --- */
.pb-badge-error {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .8em;
    font-weight: 600;
    background: #fef2f2;
    color: #b91c1c;
}

/* --- Gallery cards --- */
.pb-gallery-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-md, 8px);
    background: var(--color-bg-light, #f5f7f5);
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.pb-gallery-processing {
    background: #fff8e1;
    border: 1px solid #fde68a;
}
.pb-gallery-icon {
    font-size: 1.6em;
    flex-shrink: 0;
}
.pb-gallery-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pb-gallery-info strong { color: #333; }
.pb-gallery-info span { font-size: .85em; color: #888; }
.pb-gallery-status { flex-shrink: 0; }
.pb-gallery-action { flex-shrink: 0; }

/* Badge processing */
.pb-badge-processing {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: .8em;
    font-weight: 600;
    background: #fff8e1;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Expiry badge */
.pb-expiry-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: .78em;
    font-weight: 600;
}
.pb-expiry-ok {
    background: #dcfce7;
    color: #166534;
}
.pb-expiry-warning {
    background: #fef3c7;
    color: #92400e;
}
.pb-expiry-danger {
    background: #fef2f2;
    color: #b91c1c;
}

/* Photo process reminder */
.pb-photo-process {
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--color-bg-light, #f5f7f5);
    border-radius: var(--radius-md, 8px);
    border-left: 4px solid var(--color-secondary, #C9A84C);
}
.pb-photo-process h4 {
    margin: 0 0 10px;
    color: var(--color-primary, #2A5234);
    font-size: 1em;
}
.pb-photo-process ol {
    margin: 0;
    padding-left: 20px;
}
.pb-photo-process li {
    font-size: .88em;
    color: #555;
    line-height: 1.8;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .pb-private-wrap { padding: 12px; }
    .pb-private-body { padding: 20px; }
    .pb-private-header { padding: 20px; }
    .pb-dash-header { flex-direction: column; align-items: flex-start; }
    .pb-code-display { flex-direction: column; text-align: center; }
    .pb-dash-table { font-size: .8em; }
    .pb-field-row { flex-direction: column; }
    .pb-booking-card { flex-direction: column; align-items: flex-start; }
    .pb-booking-details { width: 100%; justify-content: space-between; }
    .pb-gallery-card { flex-direction: column; align-items: flex-start; }
    .pb-gallery-action { width: 100%; }
    .pb-gallery-action .pb-btn { width: 100%; text-align: center; }
    .pb-sub-actions { flex-direction: column; }
    .pb-sub-actions .pb-btn { width: 100%; text-align: center; }
}

/* ══════════════════════════════════════════════════════════════
   Abonnements — Espace client
   ══════════════════════════════════════════════════════════════ */

.pb-subscription-card {
    background: #fff;
    border: 1px solid var(--pb-border, #dde5de);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.pb-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.pb-sub-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pb-sub-info strong {
    font-size: 1.1em;
    color: var(--pb-green, #2A5234);
}
.pb-sub-price {
    font-weight: 600;
    color: var(--pb-green, #2A5234);
    font-size: .95em;
}

.pb-sub-details {
    margin-bottom: 16px;
}
.pb-sub-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: .9em;
}
.pb-sub-detail-row:last-child { border-bottom: none; }
.pb-sub-detail-row span:first-child { color: #888; }

.pb-sub-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.pb-btn-danger {
    background: transparent;
    color: #c00;
    border: 1px solid #c00;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: .85em;
}
.pb-btn-danger:hover { background: #c00; color: #fff; }

.pb-sub-commitment-note {
    font-size: .8em;
    color: #999;
    font-style: italic;
}

.pb-sub-sessions {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.pb-sub-sessions h4 {
    margin: 0 0 8px;
    font-size: .9em;
    color: #666;
}
.pb-sub-session-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 6px 0;
    font-size: .85em;
    border-bottom: 1px solid #fafafa;
}
.pb-sub-session-period {
    color: #888;
    min-width: 180px;
}
.pb-sub-session-date {
    color: var(--pb-green, #2A5234);
    font-weight: 500;
}
