/* =============================================
   STRUCTURE PRINCIPALE
   ============================================= */

#miassar-ad-campaign-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 20px 0;
    box-sizing: border-box;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #fcb800 0%, #fcb800 100%);
    z-index: 1;
    transition: background 0.5s ease;
}

.ad-campaign-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

/* =============================================
   EN-TÊTE ET ÉTAPES
   ============================================= */

.campaign-header {
    text-align: center;
    margin-bottom: 20px;
}

.campaign-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.campaign-steps {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    position: relative;
    flex-wrap: wrap;
}

.campaign-steps:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #eee;
    z-index: 1;
}

.campaign-steps .step {
    position: relative;
    z-index: 2;
    padding: 5px 10px;
    background: #eee;
    border-radius: 20px;
    margin-bottom: 10px;
    font-size: 0.9em;
    flex: 1;
    min-width: 100px;
    text-align: center;
    box-sizing: border-box;
}

.campaign-steps .step.active {
    background: #fcb800;
    color: white;
}

/* =============================================
   FORMULAIRE ET ÉTAPES
   ============================================= */

.form-step {
    display: none;
    animation: fadeIn 0.3s;
}

.form-step.active {
    display: block;
}

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

/* =============================================
   OPTIONS DE FORMAT
   ============================================= */

.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.format-option input[type="radio"] {
    display: none;
}

.format-option label {
    display: block;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    height: 100%;
    box-sizing: border-box;
}

.format-option input[type="radio"]:checked + label {
    border-color: #fcb800;
    background: #fff9e6;
}

.format-option input[type="radio"]#format-video:checked + label {
    border-color: #fcb800;
    background: #fff9e6;
    box-shadow: 0 0 0 2px #fcb800;
}

.format-icon {
    font-size: 2em;
    margin-bottom: 10px;
    color: #2989d8;
}

.price-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #27ae60;
    color: white;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 0.9em;
}

/* =============================================
   CHAMPS DE FORMULAIRE
   ============================================= */

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.product-input-group {
    display: flex;
    margin-bottom: 10px;
}

.product-input-group input {
    flex: 1;
    margin-right: 5px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.required-field {
    border-left: 3px solid #fcb800 !important;
    padding-left: 5px !important;
}

/* =============================================
   BOUTONS DE NAVIGATION
   ============================================= */

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

button {
    padding: 10px 15px;
    background: #fcb800;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

button:hover {
    background: #1a6fb3;
}

button.prev-step {
    background: #e6a500;
}

button.prev-step:hover {
    background: #6c7a7d;
}

.payment-btn {
    background: #27ae60;
}

.payment-btn:hover {
    background: #219955;
}

.product-input-group button {
    padding: 0 12px;
}

/* =============================================
   APERÇU DES PRODUITS
   ============================================= */

.product-preview {
    border: 1px solid #eee;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.product-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
}

.product-preview .title {
    font-weight: bold;
    flex: 1;
}

.product-preview .price {
    color: #27ae60;
    font-weight: bold;
    margin-left: 10px;
}

/* =============================================
   RÉCAPITULATIF
   ============================================= */

.summary-container {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.summary-container h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.total-price {
    font-size: 1.2em;
    color: #2989d8;
    margin-top: 10px;
}

/* =============================================
   CONDITIONS ET VALIDATION
   ============================================= */

.terms-group {
    margin: 20px 0;
    display: flex;
    align-items: center;
}

.terms-group input {
    margin-right: 10px;
}

.terms-group label {
    font-size: 0.9em;
}

/* =============================================
   MESSAGES D'ERREUR ET VALIDATION
   ============================================= */

.error-message {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 5px;
}

input.error {
    border-color: #e74c3c !important;
}

.error {
    border-color: #ff4444 !important;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* =============================================
   NOTIFICATIONS
   ============================================= */

.miassar-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
}

.miassar-notification.error {
    background: #ffebee;
    border-left: 4px solid #ff4444;
    color: #ff4444;
}

.miassar-notification.success {
    background: #e8f5e9;
    border-left: 4px solid #00C851;
    color: #00C851;
}

.miassar-notification-icon {
    font-size: 1.5em;
    margin-right: 10px;
}

.miassar-notification-message {
    font-size: 0.9em;
}

.info-note {
    font-size: 0.9em;
    color: #666;
    margin: 10px 0;
    padding: 8px;
    background: #f8f8f8;
    border-radius: 4px;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 768px) {
    .ad-campaign-content {
        padding: 15px;
    }
    
    .format-options {
        grid-template-columns: 1fr;
    }
    
    .campaign-header h1 {
        font-size: 1.5em;
    }
    
    .campaign-steps .step {
        font-size: 0.8em;
        padding: 3px 8px;
    }
    
    button {
        padding: 8px 12px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .product-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .product-preview img {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        margin-bottom: 10px;
    }
}