/*!
 * FSP Marketplace - Frontend styles
 * Palette : Vert FSP #1B6B3A / Gold #C9A961 / Navy #0F2C4D / Sand #FAF7F0
 */

:root {
    --fsp-green: #1B6B3A;
    --fsp-green-dark: #0F4A26;
    --fsp-gold: #C9A961;
    --fsp-gold-dark: #A8893E;
    --fsp-navy: #0F2C4D;
    --fsp-navy-light: #1F3F66;
    --fsp-sand: #FAF7F0;
    --fsp-sand-warm: #F5EFE1;
    --fsp-mint: #E8F4ED;
    --fsp-alert: #C8102E;
    --fsp-border: #E5E1D5;
    --fsp-text: #1A1A1A;
    --fsp-text-muted: #6B6B6B;
    --fsp-radius: 12px;
    --fsp-radius-lg: 20px;
    --fsp-shadow-sm: 0 2px 8px rgba(15, 44, 77, 0.06);
    --fsp-shadow: 0 4px 16px rgba(15, 44, 77, 0.08);
    --fsp-shadow-lg: 0 12px 40px rgba(15, 44, 77, 0.14);
}

/* ============================================================
   TYPOGRAPHIE & BASE
   ============================================================ */
.fsp-registration-wrapper,
.fsp-members-page,
.fsp-dashboard,
.fsp-login-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--fsp-text);
    line-height: 1.6;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

.fsp-registration-wrapper h1,
.fsp-members-page h1,
.fsp-login-wrapper h1 {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--fsp-navy);
    font-size: 36px;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.fsp-subtitle {
    color: var(--fsp-text-muted);
    font-size: 16px;
    margin-bottom: 32px;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.fsp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid var(--fsp-border);
    background: white;
    color: var(--fsp-navy);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.fsp-btn:hover { box-shadow: var(--fsp-shadow); transform: translateY(-1px); }
.fsp-btn-primary {
    background: var(--fsp-green);
    color: white;
    border-color: var(--fsp-green);
}
.fsp-btn-primary:hover { background: var(--fsp-green-dark); color: white; }
.fsp-btn-gold {
    background: var(--fsp-gold);
    color: var(--fsp-navy);
    border-color: var(--fsp-gold);
}
.fsp-btn-gold:hover { background: var(--fsp-gold-dark); color: white; }
.fsp-btn-large { padding: 16px 32px; font-size: 16px; border-radius: 12px; }
.fsp-btn-small { padding: 6px 14px; font-size: 12px; }
.fsp-btn-ghost { background: transparent; }

/* ============================================================
   INSCRIPTION : 3 CARTES DE CHOIX
   ============================================================ */
.fsp-registration-header {
    text-align: center;
    margin-bottom: 48px;
}
.fsp-account-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.fsp-account-type-card {
    cursor: pointer;
    display: block;
    position: relative;
}
.fsp-account-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.fsp-card-inner {
    background: white;
    border: 2px solid var(--fsp-border);
    border-radius: var(--fsp-radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.2s;
    height: 100%;
    box-sizing: border-box;
}
.fsp-account-type-card:hover .fsp-card-inner {
    border-color: var(--fsp-green);
    box-shadow: var(--fsp-shadow);
    transform: translateY(-2px);
}
.fsp-account-type-card.fsp-selected .fsp-card-inner,
.fsp-account-type-card input[type="radio"]:checked ~ .fsp-card-inner {
    border-color: var(--fsp-green);
    background: linear-gradient(135deg, white 0%, var(--fsp-mint) 100%);
    box-shadow: var(--fsp-shadow);
}
.fsp-featured .fsp-card-inner {
    border-color: var(--fsp-gold);
    background: linear-gradient(135deg, white 0%, #FBF6E8 100%);
}
.fsp-card-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}
.fsp-account-type-card h3 {
    font-family: 'Fraunces', serif;
    color: var(--fsp-navy);
    margin: 0 0 8px;
    font-size: 22px;
}
.fsp-account-type-card p {
    color: var(--fsp-text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}
.fsp-account-type-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    font-size: 13px;
}
.fsp-account-type-card ul li {
    padding: 4px 0;
    color: var(--fsp-text);
}
.fsp-badge-gold {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--fsp-gold);
    color: var(--fsp-navy);
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.fsp-registration-cta {
    text-align: center;
    margin-bottom: 32px;
}
.fsp-kafo-icon {
    color: var(--fsp-gold);
    font-size: 18px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}
.fsp-cta-note {
    color: var(--fsp-text-muted);
    font-size: 13px;
    margin-top: 12px;
}
.fsp-registration-footer {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--fsp-border);
}
.fsp-registration-footer p {
    color: var(--fsp-text-muted);
    margin: 8px 0;
}
.fsp-registration-footer a {
    color: var(--fsp-green);
    font-weight: 600;
}
.fsp-legal { font-size: 12px; }

.fsp-alert {
    padding: 12px 16px;
    border-radius: var(--fsp-radius);
    margin-bottom: 24px;
    font-size: 14px;
}
.fsp-alert-error {
    background: #FDECEE;
    border: 1px solid var(--fsp-alert);
    color: #A00D25;
}
.fsp-alert-success {
    background: var(--fsp-mint);
    border: 1px solid var(--fsp-green);
    color: var(--fsp-green-dark);
}

.fsp-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: fsp-spin 0.7s linear infinite;
}
@keyframes fsp-spin { to { transform: rotate(360deg); } }

/* ============================================================
   PAGE MEMBRES
   ============================================================ */
.fsp-members-header { text-align: center; margin-bottom: 32px; }
.fsp-members-header p { color: var(--fsp-text-muted); font-size: 16px; }

.fsp-members-tabs {
    display: flex;
    gap: 4px;
    background: var(--fsp-sand);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
    justify-content: center;
    flex-wrap: wrap;
}
.fsp-tab {
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--fsp-navy);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
    font-size: 14px;
}
.fsp-tab:hover { background: white; }
.fsp-tab.fsp-active {
    background: white;
    box-shadow: var(--fsp-shadow-sm);
    color: var(--fsp-green);
}
.fsp-tab-count {
    background: var(--fsp-border);
    color: var(--fsp-text-muted);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.fsp-tab.fsp-active .fsp-tab-count { background: var(--fsp-mint); color: var(--fsp-green); }

.fsp-members-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    align-items: center;
    flex-wrap: wrap;
}
.fsp-members-filters select {
    padding: 10px 16px;
    border: 1px solid var(--fsp-border);
    border-radius: 10px;
    font-family: inherit;
    background: white;
    font-size: 14px;
}
.fsp-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--fsp-border);
    border-radius: 10px;
    font-size: 14px;
}
.fsp-badge-gold-small {
    background: var(--fsp-gold);
    color: var(--fsp-navy);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.fsp-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.fsp-vendor-card {
    background: white;
    border-radius: var(--fsp-radius-lg);
    overflow: hidden;
    border: 1px solid var(--fsp-border);
    transition: all 0.25s;
}
.fsp-vendor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fsp-shadow-lg);
}
.fsp-card-prestataire { border-top: 3px solid var(--fsp-green); }
.fsp-card-commercant { border-top: 3px solid var(--fsp-navy); }

.fsp-vendor-cover {
    height: 120px;
    background: linear-gradient(135deg, var(--fsp-green) 0%, var(--fsp-navy) 100%);
    background-size: cover;
    background-position: center;
    position: relative;
}
.fsp-ribbon-pro {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--fsp-gold);
    color: var(--fsp-navy);
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 0.05em;
    box-shadow: var(--fsp-shadow-sm);
}
.fsp-vendor-type-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--fsp-navy);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.03em;
}

.fsp-vendor-body { padding: 20px; }
.fsp-vendor-identity {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    margin-top: -40px;
}
.fsp-vendor-logo,
.fsp-vendor-avatar-fallback {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
    background: white;
    box-shadow: var(--fsp-shadow-sm);
    display: grid;
    place-items: center;
    font-family: 'Fraunces', serif;
    font-size: 22px;
    color: var(--fsp-navy);
    flex-shrink: 0;
    object-fit: cover;
}
.fsp-vendor-identity h3 {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    margin: 0 0 4px;
    color: var(--fsp-navy);
}
.fsp-vendor-identity h3 a { color: inherit; text-decoration: none; }
.fsp-vendor-identity h3 a:hover { color: var(--fsp-green); }
.fsp-vendor-location {
    font-size: 12px;
    color: var(--fsp-text-muted);
    margin: 0;
}
.fsp-vendor-tagline {
    font-size: 13px;
    color: var(--fsp-text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}
.fsp-vendor-preview { margin-bottom: 16px; }
.fsp-vendor-items-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.fsp-item-mini {
    background: var(--fsp-sand);
    border-radius: 8px;
    overflow: hidden;
}
.fsp-item-mini-image {
    height: 60px;
    background-size: cover;
    background-position: center;
    background-color: #E8E4D5;
}
.fsp-item-mini-info { padding: 6px; text-align: center; }
.fsp-item-mini-title {
    display: block;
    font-size: 10px;
    color: var(--fsp-navy);
    line-height: 1.2;
    margin-bottom: 2px;
}
.fsp-item-mini-price {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--fsp-green);
}
.fsp-no-items {
    font-size: 12px;
    color: var(--fsp-text-muted);
    font-style: italic;
    text-align: center;
    padding: 12px;
    background: var(--fsp-sand);
    border-radius: 8px;
}
.fsp-vendor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--fsp-border);
}
.fsp-stars { color: var(--fsp-gold); font-size: 16px; }
.fsp-reviews-count { color: var(--fsp-text-muted); font-size: 12px; }

.fsp-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--fsp-text-muted);
    background: var(--fsp-sand);
    border-radius: var(--fsp-radius-lg);
}

/* ============================================================
   DASHBOARD VENDEUR
   ============================================================ */
.fsp-dashboard {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
}
.fsp-dashboard-sidebar {
    background: white;
    border-radius: var(--fsp-radius-lg);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 20px;
    border: 1px solid var(--fsp-border);
}
.fsp-user-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--fsp-border);
}
.fsp-user-summary img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}
.fsp-user-summary strong {
    display: block;
    color: var(--fsp-navy);
    font-size: 14px;
    margin-bottom: 4px;
}
.fsp-role-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.fsp-role-prestataire { background: var(--fsp-mint); color: var(--fsp-green); }
.fsp-role-commercant { background: #E8EEF7; color: var(--fsp-navy); }

.fsp-dashboard-nav { display: flex; flex-direction: column; gap: 2px; }
.fsp-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--fsp-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.15s;
}
.fsp-nav-item:hover { background: var(--fsp-sand); color: var(--fsp-green); }
.fsp-nav-item.fsp-active {
    background: var(--fsp-mint);
    color: var(--fsp-green);
    font-weight: 600;
}
.fsp-nav-icon { font-size: 16px; }
.fsp-nav-logout { color: var(--fsp-alert); margin-top: 12px; border-top: 1px solid var(--fsp-border); padding-top: 16px; }

.fsp-dashboard-main {
    background: white;
    border-radius: var(--fsp-radius-lg);
    padding: 32px;
    border: 1px solid var(--fsp-border);
}
.fsp-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.fsp-tab-header h2 {
    font-family: 'Fraunces', serif;
    color: var(--fsp-navy);
    margin: 0 0 4px;
}
.fsp-tab-subtitle { color: var(--fsp-text-muted); margin: 0; font-size: 14px; }

.fsp-completion-alert {
    background: linear-gradient(135deg, #FBF6E8 0%, white 100%);
    border: 1px solid var(--fsp-gold);
    border-radius: var(--fsp-radius);
    padding: 20px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: center;
}
.fsp-progress {
    height: 8px;
    background: var(--fsp-border);
    border-radius: 4px;
    overflow: hidden;
    grid-column: 1 / 2;
}
.fsp-progress-fill { height: 100%; background: var(--fsp-gold); transition: width 0.3s; }

.fsp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.fsp-stat-card {
    background: var(--fsp-sand);
    padding: 20px;
    border-radius: var(--fsp-radius);
    text-align: center;
}
.fsp-stat-number {
    font-family: 'Fraunces', serif;
    font-size: 32px;
    color: var(--fsp-navy);
    font-weight: 600;
    line-height: 1;
    margin-bottom: 4px;
}
.fsp-stat-label {
    color: var(--fsp-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fsp-quick-actions { margin-top: 24px; }
.fsp-quick-actions h3 {
    font-family: 'Fraunces', serif;
    color: var(--fsp-navy);
    font-size: 18px;
    margin: 0 0 16px;
}
.fsp-actions-row { display: flex; gap: 12px; flex-wrap: wrap; }

.fsp-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
.fsp-items-table th {
    text-align: left;
    padding: 12px;
    background: var(--fsp-sand);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fsp-text-muted);
}
.fsp-items-table td {
    padding: 12px;
    border-bottom: 1px solid var(--fsp-border);
    font-size: 14px;
}
.fsp-items-table .fsp-thumb { border-radius: 8px; margin-right: 12px; vertical-align: middle; }
.fsp-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.fsp-status-publish, .fsp-status-active, .fsp-status-completed, .fsp-status-paid { background: var(--fsp-mint); color: var(--fsp-green); }
.fsp-status-draft, .fsp-status-pending { background: #FFF3D6; color: #8A6D1B; }
.fsp-status-cancelled, .fsp-status-unpaid { background: #FDECEE; color: var(--fsp-alert); }

.fsp-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 16px;
}
.fsp-service-card-dash {
    background: var(--fsp-sand);
    border-radius: var(--fsp-radius);
    padding: 16px;
}
.fsp-service-card-dash img { width: 100%; border-radius: 8px; margin-bottom: 12px; }
.fsp-service-card-dash h4 { font-family: 'Fraunces', serif; color: var(--fsp-navy); margin: 0 0 8px; }
.fsp-service-card-dash .fsp-price {
    font-family: 'Fraunces', serif;
    font-size: 20px;
    color: var(--fsp-green);
    font-weight: 600;
    margin: 0 0 12px;
}
.fsp-price-unit { font-size: 12px; color: var(--fsp-text-muted); font-family: 'Inter', sans-serif; font-weight: 400; }
.fsp-service-actions { display: flex; gap: 8px; }

.fsp-kafo-identity-card {
    background: linear-gradient(135deg, var(--fsp-navy) 0%, var(--fsp-navy-light) 100%);
    color: white;
    border-radius: var(--fsp-radius-lg);
    padding: 32px;
    position: relative;
}
.fsp-kafo-identity-card p { color: rgba(255,255,255,0.9); margin: 12px 0; }
.fsp-kafo-identity-card strong { color: var(--fsp-gold); }
.fsp-kafo-identity-card code { background: rgba(255,255,255,0.1); padding: 3px 8px; border-radius: 4px; color: var(--fsp-gold); }
.fsp-kafo-badge {
    display: inline-block;
    background: var(--fsp-gold);
    color: var(--fsp-navy);
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

/* ============================================================
   FORMULAIRE PROFIL
   ============================================================ */
.fsp-profile-form fieldset {
    border: 1px solid var(--fsp-border);
    border-radius: var(--fsp-radius);
    padding: 24px;
    margin-bottom: 20px;
}
.fsp-profile-form legend {
    font-family: 'Fraunces', serif;
    color: var(--fsp-navy);
    font-size: 16px;
    font-weight: 600;
    padding: 0 12px;
}
.fsp-form-row { margin-bottom: 16px; }
.fsp-form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fsp-form-row label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--fsp-navy);
}
.fsp-form-row input[type="text"],
.fsp-form-row input[type="number"],
.fsp-form-row input[type="email"],
.fsp-form-row select,
.fsp-form-row textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--fsp-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}
.fsp-form-row input:focus,
.fsp-form-row select:focus,
.fsp-form-row textarea:focus {
    outline: none;
    border-color: var(--fsp-green);
    box-shadow: 0 0 0 3px rgba(27, 107, 58, 0.1);
}
.fsp-checkbox-inline { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-size: 13px; }
.fsp-form-actions { text-align: right; padding-top: 16px; }

/* Media Picker (logo + cover) */
.fsp-media-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fsp-media-preview {
    width: 100%;
    height: 140px;
    border-radius: 10px;
    border: 2px dashed var(--fsp-border);
    background: var(--fsp-sand);
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    color: var(--fsp-text-muted);
    font-size: 14px;
    transition: all 0.2s;
}
.fsp-media-preview:hover { border-color: var(--fsp-green); }
.fsp-media-preview-wide { height: 100px; aspect-ratio: 3 / 1; }
.fsp-media-placeholder { font-size: 13px; text-align: center; padding: 12px; }
.fsp-media-actions { display: flex; gap: 6px; align-items: center; }
.fsp-media-remove {
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--fsp-alert);
    border-color: var(--fsp-alert);
}

/* ============================================================
   LOGIN
   ============================================================ */
.fsp-login-wrapper {
    max-width: 480px;
    text-align: center;
}
.fsp-login-alt { margin-top: 24px; color: var(--fsp-text-muted); }
.fsp-login-alt a { color: var(--fsp-green); font-weight: 600; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .fsp-dashboard { grid-template-columns: 1fr; }
    .fsp-dashboard-sidebar { position: static; }
    .fsp-account-type-selector { grid-template-columns: 1fr; }
    .fsp-form-row-2col { grid-template-columns: 1fr; }
    .fsp-completion-alert { grid-template-columns: 1fr; }
}
