/* ===============================
   WRAPPER (ANTI-CONFLIT TOTAL)
================================ */
.bb-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.bb-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #f9fafb;
    padding: 20px;
}

/* ===============================
   CONTAINER PRINCIPAL
================================ */
.bb-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* ===============================
   SECTION FORMULAIRE
================================ */
.bb-form-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Bouton retour */
.bb-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 20px;
    color: #6366f1;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.bb-back-btn:hover {
    background: #e5e7eb;
}

/* ===============================
   TITRES
================================ */
.bb-section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.bb-section-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* ===============================
   FORMULAIRE
================================ */
.bb-form-group {
    margin-bottom: 25px;
}

.bb-form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.bb-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.bb-form-input:focus {
    outline: none;
    border-color: #6366f1;
}

.bb-form-input::placeholder {
    color: #9ca3af;
}

/* ===============================
   UPLOAD
================================ */
.bb-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.bb-upload-area:hover {
    border-color: #6366f1;
}

.bb-upload-icon {
    font-size: 3rem;
    color: #6366f1;
    margin-bottom: 12px;
}

.bb-upload-text {
    font-size: 0.9rem;
    color: #6366f1;
    font-weight: 500;
}

/* ===============================
   IMAGES
================================ */
.bb-images-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.bb-add-image-btn {
    width: 90px;
    height: 90px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.bb-add-image-btn:hover {
    border-color: #6366f1;
}

.bb-add-icon {
    font-size: 1.8rem;
    color: #6366f1;
    margin-bottom: 4px;
}

.bb-add-text {
    font-size: 0.7rem;
    color: #6366f1;
    font-weight: 500;
}

.bb-image-preview {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
}

/* ===============================
   INPUT AVEC SUFFIXE
================================ */
.bb-input-with-suffix {
    position: relative;
}

.bb-input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
}

.bb-date-input {
    padding-right: 50px;
}

/* ===============================
   TOGGLE SWITCH
================================ */
.bb-toggle-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.bb-toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

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

.bb-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 26px;
    transition: 0.3s;
    cursor: pointer;
}

.bb-toggle-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.bb-toggle-switch input:checked + .bb-toggle-slider {
    background: #6366f1;
}

.bb-toggle-switch input:checked + .bb-toggle-slider::before {
    transform: translateX(22px);
}

.bb-toggle-label {
    font-size: 0.85rem;
    color: #6b7280;
}

/* ===============================
   ÉDITEUR TEXTE
================================ */
.bb-text-editor {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

.bb-editor-toolbar {
    background: #f9fafb;
    padding: 8px 12px;
    border-bottom: 1px solid #d1d5db;
    display: flex;
    gap: 8px;
}

.bb-editor-btn {
    padding: 4px 8px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.bb-editor-content {
    min-height: 180px;
    padding: 16px;
    font-size: 0.95rem;
    border: none;
    outline: none;
    resize: vertical;
    width: 100%;
    font-family: inherit;
}

/* ===============================
   SUBMIT
================================ */
.bb-submit-btn {
    width: 100%;
    padding: 14px;
    background: #6366f1;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}

.bb-submit-btn:hover {
    background: #4f46e5;
}

/* ===============================
   PREVIEW
================================ */
.bb-preview-section {
    background: #e5e7eb;
    border-radius: 16px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 968px) {
    .bb-container {
        grid-template-columns: 1fr;
    }

    .bb-preview-section {
        display: none;
    }
}
