/**
 * Boat Show Wizard - Styles
 * NautiSphere - Module Salons Nautiques
 */

/* ═══════════════════════════════════════════════════════════════
   VARIABLES
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bsw-primary: #001e57;
    --bsw-primary-light: rgba(0, 30, 87, 0.1);
    --bsw-accent: #00b9d1;
    --bsw-accent-light: rgba(0, 185, 209, 0.1);
    --bsw-accent-lighter: #38bdf8;
    --bsw-success: #22c55e;
    --bsw-warning: #f59e0b;
    --bsw-danger: #ef4444;
    --bsw-text: #1e293b;
    --bsw-text-secondary: #64748b;
    --bsw-text-light: #94a3b8;
    --bsw-border: #e2e8f0;
    --bsw-bg: #f8fafc;
    --bsw-white: #ffffff;
    --bsw-gradient: linear-gradient(135deg, #001e57 0%, #00b9d1 100%);
    --bsw-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --bsw-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --bsw-shadow-glow: 0 0 40px rgba(0, 185, 209, 0.2);
    --bsw-radius: 12px;
    --bsw-radius-lg: 16px;
    --bsw-transition: all 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL OVERLAY
   ═══════════════════════════════════════════════════════════════ */

.bsw-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--bsw-transition);
}

.bsw-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bsw-modal-container {
    background: var(--bsw-white);
    border-radius: var(--bsw-radius-lg);
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--bsw-shadow-lg);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.bsw-modal-overlay.active .bsw-modal-container {
    transform: scale(1) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   MODAL HEADER
   ═══════════════════════════════════════════════════════════════ */

.bsw-modal-header {
    background: var(--bsw-gradient);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.bsw-modal-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bsw-modal-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--bsw-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bsw-accent);
}

.bsw-modal-title h2 {
    margin: 0;
    color: var(--bsw-white);
    font-size: 20px;
    font-weight: 700;
}

.bsw-modal-title p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.bsw-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--bsw-transition);
}

.bsw-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Header Actions - Container pour les boutons du header */
.bsw-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Bouton de sauvegarde rapide dans le header */
.bsw-header-save-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #0D9488;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bsw-header-save-btn:hover:not(:disabled) {
    background: #0F766E;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}

.bsw-header-save-btn:active:not(:disabled) {
    transform: translateY(0);
}

.bsw-header-save-btn:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}

.bsw-header-save-btn i {
    font-size: 12px;
}

/* Etat sauvegarde en cours */
.bsw-header-save-btn.saving {
    background: #0891B2;
}

/* Etat succes */
.bsw-header-save-btn.success {
    background: #059669;
}

/* Etat erreur */
.bsw-header-save-btn.error {
    background: #DC2626;
}

/* Spinner de chargement */
.bsw-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: bsw-spin 0.8s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════════════
   WIZARD PROGRESS
   ═══════════════════════════════════════════════════════════════ */

.bsw-wizard-progress {
    background: var(--bsw-bg);
    padding: 24px;
    border-bottom: 1px solid var(--bsw-border);
    flex-shrink: 0;
}

.bsw-wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.bsw-wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    cursor: default;
    user-select: none;
}

/* Etapes cliquables (completees) */
.bsw-wizard-step.clickable {
    cursor: pointer;
}

.bsw-wizard-step.clickable:hover .bsw-step-number {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.bsw-wizard-step.clickable:active .bsw-step-number {
    transform: scale(1.05);
}

/* Tooltip au survol */
.bsw-wizard-step[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--bsw-text);
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
    pointer-events: none;
}

.bsw-wizard-step[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bsw-text);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
    pointer-events: none;
}

.bsw-wizard-step.clickable:hover::before,
.bsw-wizard-step.clickable:hover::after {
    opacity: 1;
    visibility: visible;
}

.bsw-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bsw-border);
    color: var(--bsw-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: var(--bsw-transition);
}

.bsw-step-label {
    font-size: 13px;
    color: var(--bsw-text-secondary);
    font-weight: 500;
    transition: var(--bsw-transition);
}

.bsw-wizard-step.active .bsw-step-number {
    background: var(--bsw-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 185, 209, 0.4);
}

.bsw-wizard-step.active .bsw-step-label {
    color: var(--bsw-primary);
    font-weight: 600;
}

.bsw-wizard-step.completed .bsw-step-number {
    background: var(--bsw-success);
    color: white;
}

.bsw-wizard-step.completed .bsw-step-number::after {
    content: '✓';
}

.bsw-wizard-step.completed .bsw-step-number span {
    display: none;
}

.bsw-wizard-step-line {
    width: 60px;
    height: 3px;
    background: var(--bsw-border);
    margin: 0 12px;
    margin-bottom: 24px;
    transition: var(--bsw-transition);
}

.bsw-wizard-step-line.completed {
    background: var(--bsw-success);
}

/* ═══════════════════════════════════════════════════════════════
   WIZARD CONTENT
   ═══════════════════════════════════════════════════════════════ */

.bsw-wizard-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: var(--bsw-white);
}

.bsw-step-content {
    max-width: 800px;
    margin: 0 auto;
}

.bsw-step-header {
    text-align: center;
    margin-bottom: 32px;
}

.bsw-step-header h3 {
    margin: 0;
    font-size: 24px;
    color: var(--bsw-text);
}

.bsw-step-header p {
    margin: 8px 0 0;
    color: var(--bsw-text-secondary);
    font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════
   FORM SECTIONS
   ═══════════════════════════════════════════════════════════════ */

.bsw-form-section {
    background: var(--bsw-white);
    border: 1px solid var(--bsw-border);
    border-radius: var(--bsw-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.bsw-section-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--bsw-text);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bsw-section-hint {
    font-size: 13px;
    color: var(--bsw-text-secondary);
    margin-bottom: 12px;
}

.bsw-form-group {
    margin-bottom: 16px;
}

.bsw-form-group:last-child {
    margin-bottom: 0;
}

.bsw-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--bsw-text-secondary);
    margin-bottom: 6px;
}

.bsw-required {
    color: var(--bsw-danger);
}

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

.bsw-form-hint {
    font-size: 12px;
    color: var(--bsw-text-light);
    margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   INPUTS
   ═══════════════════════════════════════════════════════════════ */

.bsw-input,
.bsw-select,
.bsw-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--bsw-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--bsw-text);
    background: var(--bsw-white);
    transition: var(--bsw-transition);
    box-sizing: border-box;
}

.bsw-input:focus,
.bsw-select:focus,
.bsw-textarea:focus {
    outline: none;
    border-color: var(--bsw-accent);
    box-shadow: 0 0 0 3px var(--bsw-accent-light);
}

.bsw-input::placeholder,
.bsw-textarea::placeholder {
    color: var(--bsw-text-light);
}

.bsw-textarea {
    resize: vertical;
    min-height: 80px;
}

.bsw-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.bsw-color-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.bsw-color-input input[type="color"] {
    width: 44px;
    height: 44px;
    padding: 2px;
    border: 2px solid var(--bsw-border);
    border-radius: 8px;
    cursor: pointer;
}

.bsw-color-input input[type="text"] {
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════
   EVENT TYPE GRID
   ═══════════════════════════════════════════════════════════════ */

.bsw-event-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.bsw-event-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--bsw-border);
    border-radius: var(--bsw-radius);
    cursor: pointer;
    transition: var(--bsw-transition);
    background: var(--bsw-white);
}

.bsw-event-type-option:hover {
    border-color: var(--bsw-accent);
    background: var(--bsw-accent-light);
}

.bsw-event-type-option.selected {
    border-color: var(--bsw-accent);
    background: var(--bsw-accent-light);
}

.bsw-event-type-option input {
    display: none;
}

.bsw-event-type-icon {
    font-size: 28px;
}

.bsw-event-type-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--bsw-text);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   TEAM MEMBERS - NEW DESIGN
   ═══════════════════════════════════════════════════════════════ */

/* Section Header */
.bsw-team-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.bsw-team-section-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--bsw-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bsw-team-count {
    background: var(--bsw-accent-light);
    color: var(--bsw-accent);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Tabs */
.bsw-team-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: var(--bsw-bg);
    padding: 4px;
    border-radius: 10px;
}

.bsw-team-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--bsw-text-secondary);
    cursor: pointer;
    transition: var(--bsw-transition);
}

.bsw-team-tab:hover {
    background: var(--bsw-white);
    color: var(--bsw-text);
}

.bsw-team-tab.active {
    background: var(--bsw-white);
    color: var(--bsw-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bsw-team-tab i {
    font-size: 14px;
}

.bsw-team-tab.active i {
    color: var(--bsw-accent);
}

/* Tab Content */
.bsw-team-tab-content {
    display: none;
}

.bsw-team-tab-content.active {
    display: block;
}

/* Autocomplete Search */
.bsw-team-search-container {
    position: relative;
    margin-bottom: 16px;
}

.bsw-team-search-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 2px solid var(--bsw-border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--bsw-text);
    background: var(--bsw-white);
    transition: var(--bsw-transition);
    box-sizing: border-box;
}

.bsw-team-search-input:focus {
    outline: none;
    border-color: var(--bsw-accent);
    box-shadow: 0 0 0 3px var(--bsw-accent-light);
}

.bsw-team-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bsw-text-light);
    font-size: 14px;
}

.bsw-team-search-spinner {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bsw-accent);
    font-size: 14px;
    animation: bsw-spin 1s linear infinite;
}

@keyframes bsw-spin {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Autocomplete Dropdown */
.bsw-team-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bsw-white);
    border: 1px solid var(--bsw-border);
    border-radius: 10px;
    box-shadow: var(--bsw-shadow-lg);
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
    display: none;
}

.bsw-team-dropdown.show {
    display: block;
}

.bsw-team-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: var(--bsw-transition);
    border-bottom: 1px solid var(--bsw-border);
}

.bsw-team-dropdown-item:last-child {
    border-bottom: none;
}

.bsw-team-dropdown-item:hover {
    background: var(--bsw-accent-light);
}

.bsw-team-dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bsw-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.bsw-team-dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bsw-team-dropdown-info {
    flex: 1;
    min-width: 0;
}

.bsw-team-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--bsw-text);
    margin-bottom: 2px;
}

.bsw-team-dropdown-role {
    font-size: 12px;
    color: var(--bsw-text-secondary);
}

.bsw-team-dropdown-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bsw-team-dropdown-badge.collaborator {
    background: #dbeafe;
    color: #1d4ed8;
}

.bsw-team-dropdown-badge.reseller {
    background: #dcfce7;
    color: #16a34a;
}

.bsw-team-dropdown-empty {
    padding: 24px;
    text-align: center;
    color: var(--bsw-text-secondary);
}

.bsw-team-dropdown-empty i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
    color: var(--bsw-text-light);
}

.bsw-team-dropdown-empty p {
    margin: 0;
    font-size: 13px;
}

.bsw-team-dropdown-empty small {
    font-size: 11px;
    color: var(--bsw-text-light);
}

/* Une panne de recherche ne se lit pas comme une absence de resultat :
   elle porte donc sa propre couleur, et non le gris de l'etat vide. */
.bsw-team-dropdown-error {
    background: #fef2f2;
    border-top: 2px solid #fca5a5;
}

.bsw-team-dropdown-error i,
.bsw-team-dropdown-error p {
    color: #b91c1c;
}

.bsw-team-dropdown-error small {
    color: #991b1b;
    display: block;
    margin-top: 6px;
    line-height: 1.45;
}

/* Guest Form */
.bsw-team-guest-form {
    background: var(--bsw-bg);
    border-radius: 12px;
    padding: 20px;
}

.bsw-team-guest-form-header {
    margin-bottom: 16px;
}

.bsw-team-guest-form-header h5 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bsw-text);
}

.bsw-team-guest-form-header p {
    margin: 0;
    font-size: 12px;
    color: var(--bsw-text-secondary);
}

.bsw-team-guest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.bsw-team-guest-grid .bsw-form-group {
    margin-bottom: 0;
}

.bsw-team-guest-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Member Cards Grid */
.bsw-team-cards-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    margin-bottom: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--bsw-border);
}

.bsw-team-cards-header h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--bsw-text);
}

.bsw-team-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

/* Member Card */
.bsw-team-card {
    background: var(--bsw-white);
    border: 2px solid var(--bsw-border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    position: relative;
    transition: var(--bsw-transition);
}

.bsw-team-card:hover {
    border-color: var(--bsw-accent);
    box-shadow: 0 4px 12px rgba(0, 185, 209, 0.15);
}

.bsw-team-card-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bsw-bg);
    border: none;
    color: var(--bsw-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--bsw-transition);
    opacity: 0;
}

.bsw-team-card:hover .bsw-team-card-remove {
    opacity: 1;
}

.bsw-team-card-remove:hover {
    background: var(--bsw-danger);
    color: white;
}

.bsw-team-card-edit {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bsw-bg);
    border: none;
    color: var(--bsw-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: var(--bsw-transition);
    opacity: 0;
}

.bsw-team-card:hover .bsw-team-card-edit {
    opacity: 0.6;
}

.bsw-team-card-edit:hover {
    opacity: 1;
    background: var(--bsw-primary);
    color: white;
}

.bsw-team-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    overflow: hidden;
}

.bsw-team-card-avatar.nautisphere {
    background: var(--bsw-gradient);
}

.bsw-team-card-avatar.guest {
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
}

.bsw-team-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bsw-team-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--bsw-text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsw-team-card-role {
    font-size: 11px;
    color: var(--bsw-text-secondary);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsw-team-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.bsw-team-card-badge.nautisphere {
    background: var(--bsw-accent-light);
    color: var(--bsw-accent);
}

.bsw-team-card-badge.guest {
    background: #f1f5f9;
    color: #64748b;
}

.bsw-team-card-badge.collaborator {
    background: #dbeafe;
    color: #1d4ed8;
}

.bsw-team-card-badge.reseller {
    background: #dcfce7;
    color: #16a34a;
}

.bsw-team-card-badge i {
    font-size: 8px;
}

.bsw-team-card-qr {
    margin-top: 8px;
    font-size: 10px;
    color: var(--bsw-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Empty State */
.bsw-team-empty {
    text-align: center;
    padding: 32px 20px;
    background: var(--bsw-bg);
    border-radius: 12px;
    border: 2px dashed var(--bsw-border);
}

.bsw-team-empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.bsw-team-empty h5 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bsw-text);
}

.bsw-team-empty p {
    margin: 0;
    font-size: 12px;
    color: var(--bsw-text-secondary);
    max-width: 280px;
    margin: 0 auto;
}

.bsw-empty-text {
    color: var(--bsw-text-light);
    font-size: 13px;
    font-style: italic;
    text-align: center;
    padding: 12px;
}

/* Legacy support - old row style */
.bsw-team-member-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 40px;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

/* ═══════════════════════════════════════════════════════════════
   TEAM MEMBERS - RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .bsw-team-tabs {
        flex-direction: column;
    }

    .bsw-team-guest-grid {
        grid-template-columns: 1fr;
    }

    .bsw-team-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bsw-team-guest-actions {
        flex-direction: column;
    }

    .bsw-team-guest-actions .bsw-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bsw-team-cards-grid {
        grid-template-columns: 1fr;
    }

    .bsw-team-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 12px;
        gap: 12px;
    }

    .bsw-team-card-avatar {
        width: 44px;
        height: 44px;
        margin: 0;
        flex-shrink: 0;
    }

    .bsw-team-card-info {
        flex: 1;
        min-width: 0;
    }

    .bsw-team-card-remove,
    .bsw-team-card-edit {
        position: static;
        opacity: 1;
    }

    .bsw-team-card-edit {
        opacity: 0.6;
    }
}

/* ═══════════════════════════════════════════════════════════════
   IMAGE UPLOAD
   ═══════════════════════════════════════════════════════════════ */

.bsw-image-upload-zone {
    border: 2px dashed var(--bsw-border);
    border-radius: var(--bsw-radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--bsw-transition);
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bsw-image-upload-zone:hover {
    border-color: var(--bsw-accent);
    background: var(--bsw-accent-light);
}

.bsw-image-upload-zone img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

.bsw-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--bsw-text-secondary);
}

.bsw-upload-icon {
    font-size: 32px;
}

.bsw-upload-hint {
    font-size: 12px;
    color: var(--bsw-text-light);
}

.bsw-remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bsw-danger);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.bsw-logo-upload-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bsw-logo-upload-mini img {
    height: 40px;
    max-width: 120px;
    object-fit: contain;
    border-radius: 4px;
}

/* Logo Upload Centered */
.bsw-logo-group-centered {
    text-align: center;
}

.bsw-logo-upload-centered {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.bsw-logo-preview-centered {
    position: relative;
    display: inline-block;
    padding: 16px 24px;
    background: var(--bsw-bg);
    border: 2px solid var(--bsw-border);
    border-radius: var(--bsw-radius);
}

.bsw-logo-preview-centered img {
    max-height: 60px;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.bsw-logo-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--bsw-danger);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--bsw-transition);
}

.bsw-logo-remove:hover {
    transform: scale(1.1);
}

.bsw-logo-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 40px;
    background: var(--bsw-bg);
    border: 2px dashed var(--bsw-border);
    border-radius: var(--bsw-radius);
    cursor: pointer;
    transition: var(--bsw-transition);
    color: var(--bsw-text-secondary);
}

.bsw-logo-upload-placeholder:hover {
    border-color: var(--bsw-accent);
    background: var(--bsw-accent-light);
    color: var(--bsw-accent);
}

.bsw-logo-upload-placeholder i {
    font-size: 24px;
}

.bsw-logo-upload-placeholder span {
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.bsw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--bsw-transition);
    border: none;
}

.bsw-btn-primary {
    background: var(--bsw-gradient);
    color: white;
}

.bsw-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 185, 209, 0.4);
}

.bsw-btn-secondary {
    background: var(--bsw-bg);
    color: var(--bsw-text);
    border: 2px solid var(--bsw-border);
}

.bsw-btn-secondary:hover {
    border-color: var(--bsw-accent);
    background: var(--bsw-accent-light);
}

.bsw-btn-success {
    background: var(--bsw-success);
    color: white;
}

.bsw-btn-outline {
    background: transparent;
    color: var(--bsw-text-secondary);
    border: 2px dashed var(--bsw-border);
}

.bsw-btn-outline:hover {
    border-color: var(--bsw-accent);
    color: var(--bsw-accent);
}

.bsw-btn-add {
    width: 100%;
    margin-top: 12px;
    background: var(--bsw-white);
    color: var(--bsw-accent);
    border: 2px dashed var(--bsw-accent);
}

.bsw-btn-add:hover {
    background: var(--bsw-accent-light);
}

.bsw-btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.bsw-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--bsw-bg);
    border: 1px solid var(--bsw-border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--bsw-transition);
}

.bsw-btn-icon:hover {
    background: var(--bsw-accent-light);
    border-color: var(--bsw-accent);
}

.bsw-btn-danger {
    color: var(--bsw-danger);
}

.bsw-btn-danger:hover {
    background: #fef2f2;
    border-color: var(--bsw-danger);
}

/* ═══════════════════════════════════════════════════════════════
   MODELS SELECTION (Step 2)
   ═══════════════════════════════════════════════════════════════ */

.bsw-models-search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.bsw-models-search-bar .bsw-input {
    flex: 1;
}

.bsw-models-search-bar .bsw-select {
    width: 180px;
}

.bsw-models-selection-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.bsw-models-section {
    margin-bottom: 24px;
}

.bsw-models-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--bsw-text);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bsw-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.bsw-model-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid var(--bsw-border);
    border-radius: var(--bsw-radius);
    cursor: pointer;
    transition: var(--bsw-transition);
    background: var(--bsw-white);
    position: relative;
}

.bsw-model-card:hover {
    border-color: var(--bsw-accent);
    background: var(--bsw-accent-light);
}

.bsw-model-card.selected {
    border-color: var(--bsw-success);
    background: rgba(34, 197, 94, 0.1);
}

.bsw-model-checkbox {
    font-size: 20px;
    color: var(--bsw-text-light);
    flex-shrink: 0;
}

.bsw-model-card.selected .bsw-model-checkbox {
    color: var(--bsw-success);
}

.bsw-model-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--bsw-bg);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bsw-model-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bsw-model-image span {
    font-size: 24px;
}

.bsw-model-info {
    flex: 1;
    min-width: 0;
}

.bsw-model-brand {
    font-size: 11px;
    font-weight: 600;
    color: var(--bsw-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bsw-model-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--bsw-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsw-model-details {
    font-size: 12px;
    color: var(--bsw-text-secondary);
}

.bsw-model-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--bsw-accent);
    margin-top: 4px;
}

.bsw-btn-featured {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    background: var(--bsw-white);
    border: 1px solid var(--bsw-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: var(--bsw-transition);
}

.bsw-btn-featured:hover,
.bsw-btn-featured.active {
    background: var(--bsw-warning);
    border-color: var(--bsw-warning);
    color: white;
}

/* Selected Models */
.bsw-selected-models-section {
    background: var(--bsw-bg);
    border-radius: var(--bsw-radius);
    padding: 16px;
}

.bsw-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.bsw-section-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--bsw-text);
}

.bsw-selected-models-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.bsw-selected-model-card {
    width: 100px;
    text-align: center;
    position: relative;
}

.bsw-selected-model-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px;
    border-radius: 8px;
    background: var(--bsw-white);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bsw-border);
}

.bsw-selected-model-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bsw-selected-model-image span {
    font-size: 24px;
}

.bsw-selected-model-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--bsw-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsw-featured-badge {
    position: absolute;
    top: -4px;
    left: 6px;
    font-size: 16px;
}

.bsw-btn-remove {
    position: absolute;
    top: -4px;
    right: 6px;
    width: 20px;
    height: 20px;
    padding: 0;
    background: var(--bsw-danger);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}

.bsw-empty-selection {
    text-align: center;
    color: var(--bsw-text-light);
    font-size: 13px;
    padding: 24px;
    width: 100%;
}

.bsw-loading {
    text-align: center;
    color: var(--bsw-text-secondary);
    padding: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   FORM CONFIG (Step 3)
   ═══════════════════════════════════════════════════════════════ */

.bsw-step-form-config .bsw-step-content {
    max-width: 100%;
}

.bsw-form-config-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.bsw-form-config-panel {
    flex: 1;
}

.bsw-form-preview-panel {
    flex-shrink: 0;
}

.bsw-form-fields-toggles {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bsw-toggle-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bsw-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--bsw-transition);
}

.bsw-toggle-field:hover {
    background: var(--bsw-accent-light);
}

.bsw-toggle-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--bsw-accent);
    cursor: pointer;
}

.bsw-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--bsw-text);
}

.bsw-toggle-hint {
    display: block;
    font-size: 12px;
    color: var(--bsw-text-secondary);
    margin-top: 2px;
}

/* Phone Mockup */
.bsw-phone-mockup {
    background: #1a1a1a;
    border-radius: 36px;
    padding: 12px;
    box-shadow: var(--bsw-shadow-lg);
}

.bsw-phone-screen {
    background: var(--bsw-white);
    border-radius: 28px;
    overflow: hidden;
    min-height: 500px;
}

.bsw-preview-header {
    padding: 24px;
    text-align: center;
}

.bsw-preview-logo {
    max-height: 50px;
    max-width: 140px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.bsw-preview-body {
    padding: 20px;
}

.bsw-preview-title {
    margin: 0;
    font-size: 18px;
    color: var(--bsw-text);
    text-align: center;
}

.bsw-preview-subtitle {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--bsw-text-secondary);
    text-align: center;
}

.bsw-preview-message {
    margin: 16px 0;
    font-size: 13px;
    color: var(--bsw-text-secondary);
    text-align: center;
}

.bsw-preview-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bsw-preview-field input,
.bsw-preview-field select,
.bsw-preview-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--bsw-border);
    border-radius: 6px;
    font-size: 12px;
    background: var(--bsw-bg);
    box-sizing: border-box;
}

.bsw-preview-field textarea {
    min-height: 60px;
    resize: none;
}

.bsw-preview-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bsw-preview-checkbox input {
    width: 16px;
    height: 16px;
}

.bsw-preview-checkbox span {
    font-size: 11px;
    color: var(--bsw-text-secondary);
}

.bsw-preview-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
}

/* Logo Placeholder in Preview */
.bsw-preview-logo-placeholder {
    width: 80px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    margin: 0 auto;
}

/* Budget Slider Preview */
.bsw-preview-budget-slider {
    padding: 12px !important;
    background: var(--bsw-bg-light);
    border-radius: 8px;
}

.bsw-preview-budget-slider label {
    display: block;
    font-size: 11px;
    color: var(--bsw-text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bsw-budget-display {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--bsw-primary);
    margin-bottom: 10px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--bsw-accent);
}

.bsw-preview-budget-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    padding: 0;
    margin: 8px 0;
}

.bsw-preview-budget-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bsw-accent);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.bsw-budget-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--bsw-text-secondary);
}

/* RGPD Preview */
.bsw-preview-rgpd {
    background: rgba(0, 185, 209, 0.05);
    border: 1px solid var(--bsw-accent);
    border-radius: 6px;
    padding: 10px !important;
    margin-top: 8px;
}

.bsw-preview-rgpd-text {
    font-size: 10px !important;
    line-height: 1.3;
    color: var(--bsw-text);
}

.bsw-required-star {
    color: var(--bsw-danger);
    font-weight: bold;
}

.bsw-preview-legal {
    text-align: center;
    font-size: 10px;
    color: var(--bsw-text-light);
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.bsw-preview-legal i {
    color: var(--bsw-success);
}

/* Field groups with customizable options */
.bsw-field-group {
    margin-bottom: 8px;
}

.bsw-field-group .bsw-toggle-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bsw-btn-customize {
    margin-left: auto;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid var(--bsw-border);
    border-radius: 4px;
    color: var(--bsw-text-secondary);
    cursor: pointer;
    transition: var(--bsw-transition);
    font-size: 12px;
}

.bsw-btn-customize:hover {
    background: var(--bsw-bg-alt);
    border-color: var(--bsw-primary);
    color: var(--bsw-primary);
}

/* Options editor */
.bsw-options-editor {
    margin-top: 8px;
    padding: 12px;
    background: var(--bsw-bg-alt);
    border: 1px solid var(--bsw-border);
    border-radius: 8px;
}

.bsw-options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--bsw-text-secondary);
}

.bsw-btn-reset {
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: var(--bsw-text-secondary);
    cursor: pointer;
    font-size: 11px;
    transition: var(--bsw-transition);
}

.bsw-btn-reset:hover {
    color: var(--bsw-danger);
}

.bsw-options-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.bsw-option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: white;
    border: 1px solid var(--bsw-border);
    border-radius: 6px;
    transition: var(--bsw-transition);
}

.bsw-option-item:hover {
    border-color: var(--bsw-primary);
}

.bsw-drag-handle {
    color: var(--bsw-text-secondary);
    cursor: grab;
    opacity: 0.5;
}

.bsw-option-item:hover .bsw-drag-handle {
    opacity: 1;
}

.bsw-option-item input[type="text"] {
    flex: 1;
    padding: 4px 8px;
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--bsw-text);
}

.bsw-option-item input[type="text"]:focus {
    outline: none;
}

/* Option item actions (move up/down, remove) - for customizable fields editor */
.bsw-option-item-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: var(--bsw-transition);
}

.bsw-option-item:hover .bsw-option-item-actions {
    opacity: 1;
}

.bsw-btn-move-option {
    padding: 4px 6px;
    background: transparent;
    border: none;
    color: var(--bsw-text-secondary);
    cursor: pointer;
    transition: var(--bsw-transition);
    font-size: 10px;
}

.bsw-btn-move-option:hover:not(:disabled) {
    color: var(--bsw-primary);
}

.bsw-btn-move-option:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.bsw-btn-remove-option {
    padding: 4px 6px;
    background: transparent;
    border: none;
    color: var(--bsw-text-secondary);
    cursor: pointer;
    transition: var(--bsw-transition);
}

.bsw-btn-remove-option:hover:not(:disabled) {
    color: var(--bsw-danger);
}

.bsw-btn-remove-option:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Drag & drop states */
.bsw-option-item.bsw-dragging {
    opacity: 0.5;
    background: var(--bsw-accent);
    transform: scale(1.02);
}

.bsw-option-item.bsw-drag-over {
    border-color: var(--bsw-primary);
    border-style: dashed;
    background: rgba(0, 185, 209, 0.1);
}

.bsw-drag-handle {
    cursor: grab;
    touch-action: none;
}

.bsw-dragging .bsw-drag-handle {
    cursor: grabbing;
}

.bsw-options-add {
    display: flex;
    gap: 8px;
}

.bsw-options-add input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--bsw-border);
    border-radius: 6px;
    font-size: 13px;
}

.bsw-options-add input[type="text"]:focus {
    outline: none;
    border-color: var(--bsw-primary);
}

.bsw-btn-add-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bsw-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--bsw-transition);
    white-space: nowrap;
}

.bsw-btn-add-option:hover {
    background: var(--bsw-primary-dark);
}

/* RGPD Section in Form Config */
.bsw-rgpd-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--bsw-accent);
}

.bsw-rgpd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.bsw-rgpd-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bsw-accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bsw-rgpd-required {
    font-size: 11px;
    font-weight: 600;
    color: var(--bsw-danger);
    text-transform: uppercase;
}

.bsw-toggle-field-rgpd {
    background: rgba(0, 185, 209, 0.1);
    border: 1px solid var(--bsw-accent);
}

.bsw-toggle-field-rgpd input[type="checkbox"] {
    accent-color: var(--bsw-success);
}

.bsw-toggle-field-rgpd input[type="checkbox"]:disabled {
    opacity: 1;
    cursor: not-allowed;
}

.bsw-rgpd-text-group {
    margin-top: 12px;
}

.bsw-textarea-sm {
    min-height: 60px;
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   GENERATE (Step 4)
   ═══════════════════════════════════════════════════════════════ */

.bsw-recap-section {
    background: var(--bsw-gradient);
    border: none;
}

.bsw-recap-section .bsw-section-label {
    color: white;
}

.bsw-recap-card {
    background: var(--bsw-white);
    border-radius: var(--bsw-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.bsw-recap-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bsw-recap-header img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.bsw-recap-placeholder {
    width: 80px;
    height: 80px;
    background: var(--bsw-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.bsw-recap-info h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--bsw-text);
}

.bsw-recap-info p {
    margin: 4px 0;
    font-size: 13px;
    color: var(--bsw-text-secondary);
}

/* QR Section */
.bsw-qr-main-container {
    display: flex;
    gap: 24px;
    align-items: center;
}

.bsw-qr-code-wrapper {
    width: 200px;
    height: 200px;
    background: var(--bsw-white);
    border: 2px solid var(--bsw-border);
    border-radius: var(--bsw-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bsw-qr-code-wrapper canvas,
.bsw-qr-code-wrapper img {
    max-width: 100%;
    max-height: 100%;
}

.bsw-qr-info {
    flex: 1;
}

.bsw-qr-url {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.bsw-qr-url code {
    flex: 1;
    padding: 10px 14px;
    background: var(--bsw-bg);
    border-radius: 6px;
    font-size: 12px;
    color: var(--bsw-text);
    word-break: break-all;
}

.bsw-qr-download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Prints Grid */
.bsw-prints-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.bsw-print-card {
    background: var(--bsw-bg);
    border: 2px solid var(--bsw-border);
    border-radius: var(--bsw-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--bsw-transition);
}

.bsw-print-card:hover {
    border-color: var(--bsw-accent);
    background: var(--bsw-accent-light);
    transform: translateY(-2px);
}

.bsw-print-preview {
    font-size: 40px;
    margin-bottom: 12px;
}

.bsw-print-card h5 {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--bsw-text);
}

.bsw-print-card p {
    margin: 0;
    font-size: 12px;
    color: var(--bsw-text-secondary);
}

/* Additional QR */
.bsw-additional-qr-list {
    margin-bottom: 16px;
}

.bsw-additional-qr-row {
    display: grid;
    grid-template-columns: 1fr 1fr 40px 40px;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

/* Options */
.bsw-toggle-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bsw-bg);
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 8px;
}

.bsw-toggle-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--bsw-accent);
}

.bsw-toggle-option span {
    font-size: 14px;
    color: var(--bsw-text);
}

.bsw-draft-action {
    text-align: center;
    margin-top: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   WIZARD FOOTER
   ═══════════════════════════════════════════════════════════════ */

.bsw-wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bsw-bg);
    border-top: 1px solid var(--bsw-border);
    flex-shrink: 0;
}

.bsw-wizard-footer-info {
    font-size: 13px;
    color: var(--bsw-text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .bsw-modal-container {
        max-height: 100vh;
        border-radius: 0;
    }

    .bsw-event-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .bsw-form-config-layout {
        grid-template-columns: 1fr;
    }

    .bsw-form-preview-panel {
        order: -1;
    }

    .bsw-phone-mockup {
        max-width: 280px;
        margin: 0 auto;
    }

    .bsw-qr-main-container {
        flex-direction: column;
        text-align: center;
    }

    .bsw-prints-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bsw-team-member-row {
        grid-template-columns: 1fr 1fr;
    }

    .bsw-team-member-row input:nth-child(3) {
        grid-column: 1 / 3;
    }

    .bsw-wizard-steps {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .bsw-step-label {
        font-size: 11px;
        white-space: nowrap;
    }

    .bsw-wizard-step-line {
        width: 30px;
    }

    .bsw-models-search-bar {
        flex-direction: column;
    }

    .bsw-models-search-bar .bsw-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bsw-modal-header {
        padding: 16px;
    }

    .bsw-modal-title h2 {
        font-size: 16px;
    }

    .bsw-modal-icon {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .bsw-wizard-content {
        padding: 16px;
    }

    .bsw-step-header h3 {
        font-size: 20px;
    }

    .bsw-form-section {
        padding: 16px;
    }

    .bsw-prints-grid {
        grid-template-columns: 1fr;
    }

    .bsw-additional-qr-row {
        grid-template-columns: 1fr 40px 40px;
    }

    .bsw-additional-qr-row input:first-child {
        grid-column: 1 / 4;
        margin-bottom: 8px;
    }
}

/* ==============================================
   PHASE 3: Team QR Codes Section
   ============================================== */

.bsw-team-qr-section {
    margin-top: 24px;
}

.bsw-team-qr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.bsw-team-qr-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bsw-team-qr-title h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bsw-team-qr-title h4 i {
    color: #0ea5e9;
}

.bsw-team-qr-title .bsw-team-qr-hint {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.bsw-team-qr-download-all {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bsw-team-qr-download-all:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-1px);
}

.bsw-team-qr-download-all:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* ==============================================
   Supports imprimés — badges A6 recto/verso
   ============================================== */

.bsw-team-qr-actions-globales {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* « Imprimer tous les badges » est l'action qui produit le support
   physique : elle porte la couleur pleine, quand le téléchargement des
   QR bruts reste secondaire. */
.bsw-team-qr-print-all {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bsw-team-qr-print-all:hover:not(:disabled) {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    transform: translateY(-1px);
}

.bsw-team-qr-print-all:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* ==============================================
   Sélecteur du logo imprimé (lot C)
   ============================================== */

/* Il ne s'affiche que si l'établissement secondaire a un logo : une ligne
   de réglage qui n'offre qu'une option ne serait qu'à lire pour rien. */
.bsw-logo-selecteur {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin-bottom: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.bsw-logo-selecteur-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
}

.bsw-logo-selecteur-label i { color: #0ea5e9; }

.bsw-logo-selecteur-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-left: auto;
}

.bsw-logo-choix-groupe {
    display: inline-flex;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.bsw-logo-choix {
    padding: 6px 14px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bsw-logo-choix:hover:not(.actif) {
    background: #f1f5f9;
    color: #0f172a;
}

.bsw-logo-choix.actif {
    background: #0f172a;
    color: #ffffff;
}

/* Le bouton « Badge » de chaque carte membre : même gabarit que ses deux
   voisins (PNG, Copier), mais teinté — c'est le seul des trois qui
   produit une feuille à imprimer, pas un fichier de plus. */
.bsw-team-qr-card-actions .bsw-team-qr-badge-btn {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    font-weight: 600;
}

.bsw-team-qr-card-actions .bsw-team-qr-badge-btn:hover:not(:disabled) {
    background: #1e293b;
    border-color: #1e293b;
    color: #ffffff;
}

.bsw-team-qr-card-actions .bsw-team-qr-badge-btn:disabled {
    background: #e2e8f0;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* Team QR Cards Grid */
.bsw-team-qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Individual Team Member QR Card */
.bsw-team-qr-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.bsw-team-qr-card:hover {
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
}

.bsw-team-qr-card.disabled {
    opacity: 0.6;
}

.bsw-team-qr-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.bsw-team-qr-card-member {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.bsw-team-qr-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.bsw-team-qr-card-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.bsw-team-qr-card-info {
    min-width: 0;
    flex: 1;
}

.bsw-team-qr-card-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsw-team-qr-card-role {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* QR Toggle Switch */
.bsw-team-qr-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.bsw-team-qr-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bsw-team-qr-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.bsw-team-qr-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.bsw-team-qr-toggle input:checked + .bsw-team-qr-toggle-slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bsw-team-qr-toggle input:checked + .bsw-team-qr-toggle-slider:before {
    transform: translateX(20px);
}

/* QR Code Container */
.bsw-team-qr-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.bsw-team-qr-code-container {
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #e2e8f0;
}

.bsw-team-qr-code-container img,
.bsw-team-qr-code-container canvas {
    max-width: 100%;
    max-height: 100%;
}

.bsw-team-qr-card.disabled .bsw-team-qr-code-container {
    background: #f1f5f9;
    position: relative;
}

.bsw-team-qr-card.disabled .bsw-team-qr-code-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.bsw-team-qr-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
}

.bsw-team-qr-status.enabled {
    background: #d1fae5;
    color: #059669;
}

.bsw-team-qr-status.disabled {
    background: #f1f5f9;
    color: #64748b;
}

/* QR Card Actions */
.bsw-team-qr-card-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.bsw-team-qr-card-actions button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bsw-team-qr-card-actions button:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #0ea5e9;
    color: #0ea5e9;
}

.bsw-team-qr-card-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Empty State */
.bsw-team-qr-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.bsw-team-qr-empty i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.bsw-team-qr-empty h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 8px 0;
}

.bsw-team-qr-empty p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ==============================================
   PHASE 3: WhatsApp Options
   ============================================== */

.bsw-options-section {
    margin-top: 24px;
}

.bsw-options-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bsw-options-title i {
    color: #0ea5e9;
}

.bsw-option-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 12px;
    gap: 16px;
}

.bsw-option-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.bsw-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.bsw-option-icon.email {
    background: #dbeafe;
    color: #2563eb;
}

.bsw-option-icon.whatsapp {
    background: #dcfce7;
    color: #16a34a;
}

.bsw-option-icon.notifications {
    background: #fef3c7;
    color: #d97706;
}

.bsw-option-info {
    flex: 1;
}

.bsw-option-label {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
    margin: 0 0 4px 0;
}

.bsw-option-hint {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.bsw-option-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.bsw-option-customize {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bsw-option-customize:hover {
    background: #f8fafc;
    border-color: #16a34a;
    color: #16a34a;
}

/* Toggle (reuse from team QR) */
.bsw-option-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.bsw-option-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.bsw-option-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.bsw-option-toggle input:checked + .bsw-option-toggle-slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bsw-option-toggle input:checked + .bsw-option-toggle-slider:before {
    transform: translateX(20px);
}

/* ==============================================
   PHASE 3: Template Editor Modal
   ============================================== */

.bsw-template-editor-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001; /* Above wizard modal (10000) */
    padding: 20px;
    animation: bsw-fadeIn 0.2s ease;
}

.bsw-template-editor-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: bsw-slideUp 0.3s ease;
}

@keyframes bsw-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bsw-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bsw-template-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.bsw-template-editor-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bsw-template-editor-title i {
    font-size: 24px;
    color: #16a34a;
}

.bsw-template-editor-title h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.bsw-template-editor-title p {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0 0;
}

.bsw-template-editor-close {
    width: 36px;
    height: 36px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
}

.bsw-template-editor-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

.bsw-template-editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Variables Panel */
.bsw-template-variables {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bsw-template-variables-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 4px 0;
}

.bsw-template-variables-header p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.bsw-template-variables-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bsw-template-variable-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 20px;
    font-size: 12px;
    color: #0369a1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bsw-template-variable-chip:hover {
    background: #e0f2fe;
    border-color: #0ea5e9;
}

.bsw-template-variable-chip code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 11px;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Message Editor */
.bsw-template-message {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bsw-template-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bsw-template-message-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.bsw-template-char-count {
    font-size: 12px;
    color: #64748b;
}

.bsw-template-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
}

.bsw-template-textarea:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.bsw-template-reset {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.bsw-template-reset:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Preview Panel */
.bsw-template-preview {
    grid-column: 1 / -1;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
}

.bsw-template-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.bsw-template-preview-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.bsw-template-preview-header i {
    color: #16a34a;
}

.bsw-template-preview-phone {
    background: #1a1a2e;
    border-radius: 24px;
    padding: 12px;
    max-width: 320px;
    margin: 0 auto;
}

.bsw-template-preview-phone-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    margin-bottom: 12px;
}

.bsw-template-preview-phone-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.bsw-template-preview-phone-contact {
    flex: 1;
}

.bsw-template-preview-phone-contact strong {
    color: white;
    font-size: 14px;
    display: block;
}

.bsw-template-preview-phone-contact span {
    color: #64748b;
    font-size: 11px;
}

.bsw-template-preview-bubble {
    background: #dcfce7;
    border-radius: 12px 12px 12px 0;
    padding: 12px;
    margin-left: 20px;
    position: relative;
}

.bsw-template-preview-bubble::before {
    content: "";
    position: absolute;
    left: -8px;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent #dcfce7 transparent;
}

.bsw-template-preview-bubble p {
    font-size: 13px;
    line-height: 1.5;
    color: #1a1a2e;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.bsw-template-preview-bubble-time {
    text-align: right;
    font-size: 10px;
    color: #64748b;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* Email Preview Styles */
.bsw-template-preview-email {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.bsw-template-preview-email-header {
    background: #f8fafc;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.bsw-template-preview-email-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    color: #475569;
    margin-bottom: 6px;
}

.bsw-template-preview-email-row:last-child {
    margin-bottom: 0;
}

.bsw-template-preview-email-label {
    font-weight: 600;
    color: #64748b;
    min-width: 50px;
}

.bsw-template-preview-email-subject {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.bsw-template-preview-email-subject strong {
    color: #1e293b;
    font-size: 14px;
}

.bsw-template-preview-email-body {
    padding: 20px;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
}

.bsw-template-preview-email-body p {
    font-size: 13px;
    line-height: 1.6;
    color: #334155;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.bsw-template-preview-email-footer {
    background: #f1f5f9;
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.bsw-template-preview-email-footer small {
    font-size: 11px;
    color: #94a3b8;
}

/* Email Subject Input */
.bsw-template-subject-group {
    margin-bottom: 16px;
}

.bsw-template-subject-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.bsw-template-subject-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: white;
    transition: all 0.2s ease;
}

.bsw-template-subject-input:focus {
    outline: none;
    border-color: var(--bsw-primary, #001e57);
    box-shadow: 0 0 0 3px rgba(0, 30, 87, 0.1);
}

/* Email modal modifier - slightly wider */
.bsw-template-editor-email {
    max-width: 1000px;
}

.bsw-template-editor-email .bsw-template-editor-title i {
    color: #3b82f6;
}

/* Footer Actions */
.bsw-template-editor-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.bsw-template-editor-cancel {
    padding: 10px 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bsw-template-editor-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.bsw-template-editor-save {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bsw-template-editor-save:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    transform: translateY(-1px);
}

/* ==============================================
   Responsive - Phase 3
   ============================================== */

@media (max-width: 768px) {
    .bsw-team-qr-header {
        flex-direction: column;
        align-items: stretch;
    }

    .bsw-team-qr-download-all {
        width: 100%;
        justify-content: center;
    }

    .bsw-team-qr-actions-globales {
        flex-direction: column;
        align-items: stretch;
    }

    .bsw-team-qr-print-all {
        width: 100%;
        justify-content: center;
    }

    /* Trois boutons côte à côte sur une carte étroite deviennent
       illisibles : ils passent sur deux lignes. */
    .bsw-team-qr-card-actions {
        flex-wrap: wrap;
    }

    .bsw-team-qr-card-actions .bsw-team-qr-badge-btn {
        flex: 1 0 100%;
    }

    .bsw-logo-selecteur {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .bsw-logo-selecteur-hint { margin-left: 0; }

    .bsw-logo-choix-groupe { width: 100%; }

    .bsw-logo-choix { flex: 1; max-width: none; }

    .bsw-team-qr-grid {
        grid-template-columns: 1fr;
    }

    .bsw-option-row {
        flex-direction: column;
    }

    .bsw-option-actions {
        width: 100%;
        justify-content: space-between;
    }

    .bsw-template-editor-body {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .bsw-template-editor-modal {
        max-height: 95vh;
        border-radius: 12px;
    }

    .bsw-template-preview-phone {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .bsw-team-qr-card-body {
        padding: 12px;
    }

    .bsw-team-qr-code-container {
        width: 140px;
        height: 140px;
    }

    .bsw-team-qr-card-actions {
        flex-direction: column;
    }

    .bsw-template-editor-header {
        padding: 16px;
    }

    .bsw-template-editor-title h3 {
        font-size: 16px;
    }

    .bsw-template-variables-list {
        flex-direction: column;
    }

    .bsw-template-variable-chip {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════
   BRAND SELECT
   ═══════════════════════════════════════════════════════════════ */

.bsw-brand-select-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bsw-brand-select {
    flex: 1;
}

.bsw-brand-logo-preview {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.bsw-brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--bsw-border);
}

.bsw-brand-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bsw-bg);
    border: 1px solid var(--bsw-border);
    border-radius: var(--bsw-radius);
}

.bsw-brand-display .bsw-brand-logo {
    width: 32px;
    height: 32px;
}

.bsw-brand-display .bsw-brand-name {
    font-weight: 500;
    color: var(--bsw-text);
}

.bsw-brand-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--bsw-radius);
    color: #92400e;
    font-size: 13px;
}

.bsw-brand-empty i {
    color: #f59e0b;
}

.bsw-brand-empty a {
    color: #92400e;
    font-weight: 500;
    text-decoration: underline;
}

.bsw-brand-empty a:hover {
    color: #78350f;
}

/* ═══════════════════════════════════════════════════════════════
   QR INDISPONIBLE — l'etat explicite du support pas encore generable

   Tant que le salon n'est pas enregistre, son slug definitif n'existe
   pas ; et tant que l'equipe n'est pas synchronisee vers
   boat_show_team_members, les membres n'ont pas de slug QR serveur.
   Dans les deux cas on affiche CE bloc, jamais un QR code : un QR
   dessine mais mort se decouvre sur le stand, un carre gris se
   decouvre dans le wizard.
   ═══════════════════════════════════════════════════════════════ */

.bsw-qr-indisponible {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    min-height: 140px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
}

.bsw-qr-indisponible i {
    font-size: 22px;
    color: #f59e0b;
}

.bsw-qr-indisponible p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
}

.bsw-url-indisponible {
    color: #94a3b8 !important;
    font-style: italic;
}
