/* =============================================
   ADVANCED ICON BUBBLES - STYLE CSS (UPDATED)
   ============================================= */

/* === CONTAINER PRINCIPAL === */
.aib-bubbles-wrapper {
    width: 100%;
    padding: 40px 20px;
}

.aib-bubbles-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

/* === ITEM COMPLET (BULLE + TEXTES) === */
.aib-bubble-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 180px;
}

/* === LA BULLE === */
.aib-bubble {
    width: var(--bubble-width, 150px);
    height: var(--bubble-height, 150px);
    border-radius: 50%;
    background-color: var(--bubble-bg, #000);
    border: 3px solid #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.35s ease-in-out;
    box-sizing: border-box;
    text-decoration: none;
}

.aib-bubble:hover {
    transform: scale(1.1);
    background-color: var(--bubble-hover-bg, #fff);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* === CONTAINER DE TEXTE DANS LA BULLE === */
.aib-bubble-text-container {
    width: 100%;
    max-height: calc(100% - 55px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

/* === TEXTES DANS LA BULLE === */
.aib-bubble-text {
    color: var(--text-color, #fff);
    text-align: center;
    line-height: 1.1;
    font-weight: bold;
    text-transform: uppercase;
    transition: color 0.35s ease-in-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Changement de couleur au survol */
.aib-bubble:hover .aib-bubble-text {
    color: var(--text-hover-color, #000);
}

/* === ICÔNE DANS LA BULLE === */
.aib-bubble-icon {
    width: var(--icon-size, 50px);
    height: var(--icon-size, 50px);
    max-width: 50%;
    max-height: 35%;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--text-color, #fff);
    transition: all 0.35s ease-in-out;
    flex-shrink: 0;
}

.aib-bubble-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: filter 0.35s ease-in-out;
}

.aib-bubble:hover .aib-bubble-icon {
    color: var(--text-hover-color, #000);
}

.aib-bubble:hover .aib-bubble-icon img {
    filter: none;
}

/* === TEXTES SOUS LA BULLE === */
.aib-bubble-label {
    margin-top: 20px;
    text-align: center;
    width: 100%;
}

.aib-label-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.aib-label-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    margin: 0;
    line-height: 1.3;
}

/* =============================================
   MODAL / POPUP
   ============================================= */

.aib-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

.aib-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.aib-modal {
    background: #fff;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease-in-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.aib-modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 15px 15px 0 0;
}

.aib-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.aib-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

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

.aib-modal-body {
    padding: 30px;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

.aib-modal-body h1,
.aib-modal-body h2,
.aib-modal-body h3 {
    color: #667eea;
    margin-top: 20px;
    margin-bottom: 10px;
}

.aib-modal-body p {
    margin-bottom: 15px;
}

.aib-modal-body ul,
.aib-modal-body ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.aib-modal-body strong {
    color: #764ba2;
}

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

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

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

/* Tablettes */
@media (max-width: 768px) {
    .aib-bubbles-container {
        gap: 35px;
    }
    
    .aib-bubble-item {
        width: 150px;
    }
    
    .aib-bubble {
        width: 130px;
        height: 130px;
    }
    
    .aib-bubble-text {
        font-size: 90% !important;
    }
    
    .aib-bubble-icon {
        font-size: 32px;
    }
    
    .aib-label-title {
        font-size: 14px;
    }
    
    .aib-label-subtitle {
        font-size: 12px;
    }
    
    .aib-modal {
        max-width: 95%;
    }
    
    .aib-modal-header h2 {
        font-size: 20px;
    }
    
    .aib-modal-body {
        padding: 20px;
        font-size: 14px;
    }
}

/* Mobiles */
@media (max-width: 480px) {
    .aib-bubbles-wrapper {
        padding: 30px 15px;
    }
    
    .aib-bubbles-container {
        gap: 30px;
    }
    
    .aib-bubble-item {
        width: 130px;
    }
    
    .aib-bubble {
        width: 110px;
        height: 110px;
        padding: 15px;
    }
    
    .aib-bubble-text {
        font-size: 85% !important;
    }
    
    .aib-bubble-icon {
        font-size: 28px;
    }
    
    .aib-label-title {
        font-size: 13px;
    }
    
    .aib-label-subtitle {
        font-size: 11px;
    }
    
    .aib-modal-header {
        padding: 20px;
    }
    
    .aib-modal-header h2 {
        font-size: 18px;
    }
    
    .aib-modal-body {
        padding: 15px;
        font-size: 13px;
    }
}

/* =============================================
   ADMIN STYLES
   ============================================= */

.aib-admin-container {
    max-width: 1200px;
    margin: 20px;
}

.aib-admin-header {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #e74c3c;
}

.aib-admin-header h1 {
    margin: 0 0 10px 0;
    color: #333;
}

.aib-bubble-editor {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.aib-bubble-editor h3 {
    margin-top: 0;
    color: #e74c3c;
}

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

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

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

.aib-form-group textarea {
    min-height: 150px;
    font-family: monospace;
    resize: vertical;
}

.aib-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.aib-color-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aib-color-input input[type="color"] {
    width: 50px;
    height: 38px;
    border: none;
    cursor: pointer;
}

.aib-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.aib-btn-primary {
    background: #e74c3c;
    color: #fff;
}

.aib-btn-primary:hover {
    background: #c0392b;
}

.aib-shortcode-box {
    background: #f8f9fa;
    padding: 15px;
    border-left: 4px solid #28a745;
    margin-top: 20px;
}

.aib-shortcode-box code {
    background: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.aib-modal-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.aib-modal-preview h4 {
    margin-top: 0;
    color: #667eea;
}
