/* abc/bil-style.css - Thème 100% Google AdSense / Material Design */
.bil-container {
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

/* Barre d'outils (Toolbar) type Google Toolbar */
.bil-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #dadce0;
    align-items: center;
}

.bil-toolbar-group {
    display: flex;
    align-items: center;
    gap: 2px;
    border-right: 1px solid #dfe1e5;
    padding-right: 8px;
    margin-right: 4px;
}

.bil-toolbar-group:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}

/* Boutons de la barre d'outils */
.bil-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    height: 32px;
    white-space: nowrap;
    text-decoration: none;
}

.bil-btn:hover {
    background: #f1f3f4;
    border-color: #dadce0;
    color: #202124;
}

.bil-btn:active, .bil-btn.active {
    background: #e8f0fe;
    color: #1a73e8;
    border-color: #d2e3fc;
}

/* Menus déroulants (Selects) style Google */
.bil-select {
    height: 32px;
    padding: 0 4px 0 6px;
    font-size: 13px;
    font-weight: 500;
    background-color: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #3c4043;
    cursor: pointer;
    outline: none;
    transition: background 0.15s, border-color 0.15s;
    width: 82px;
    min-width: 82px;
    max-width: 100px;
}

.bil-select:hover {
    background: #f1f3f4;
    border-color: #bdc1c6;
}

.bil-select:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 1px #1a73e8;
    width: auto;
}

.bil-select option:first-child {
    color: #5f6368;
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Zone d'édition Contenteditable (Ligne 1.1 et ombre subtile intérieure dans les coins) */
.bil-content-area {
    min-height: 380px;
    max-height: 750px;
    overflow-y: auto;
    padding: 24px;
    outline: none;
    font-size: 15px;
    line-height: 1.1;
    color: #202124;
    background-color: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Suppression des marges verticales excessives sur les paragraphes et divs de l'éditeur */
.bil-content-area p, 
.bil-content-area div {
    margin-top: 0;
    margin-bottom: 0.2rem;
}

.bil-content-area[placeholder]:empty:before {
    content: attr(placeholder);
    color: #9aa0a6;
    cursor: text;
}

/* Figures et légendes pour médias */
.bil-content-area figure {
    margin: 20px 0;
    text-align: center;
}

.bil-content-area img, 
.bil-content-area video {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bil-content-area figcaption {
    font-size: 13px;
    color: #5f6368;
    margin-top: 8px;
    font-style: italic;
}

/** BLOCS DE CODE (Style Éditeur Pro / VS Code sombre) **/
.bil-content-area pre.bil-code-block {
    background-color: #202124;
    color: #e8eaed;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    padding: 16px;
    border-radius: 6px;
    margin: 16px 0;
    overflow-x: auto;
    position: relative;
    border: 1px solid #3c4043;
}

.bil-content-area pre.bil-code-block::before {
    content: attr(data-language);
    position: absolute;
    top: 6px;
    right: 12px;
    font-size: 10px;
    text-transform: uppercase;
    color: #9aa0a6;
    letter-spacing: 1px;
    font-weight: bold;
}

.bil-content-area pre.bil-code-block code {
    background: transparent;
    padding: 0;
    color: #8ab4f8;
    font-size: 13px;
    line-height: 1.1;
    display: block;
    white-space: pre;
}

/* Wrapper d'images */
.bil-img-wrapper {
    position: relative;
    display: inline-block;
}

.bil-img-wrapper:hover .bil-btn-legend {
    opacity: 1 !important;
}

/* liens et ancre */
.bil-content-area a {
    text-decoration: underline;
    cursor: pointer;
}

.bil-content-area a:hover,
.bil-content-area a:focus {
    text-decoration: none;
    cursor: pointer;
}

/* Style des mini-menus déroulants personnalisés pour les couleurs (Adapté pour 60 couleurs) */
.bil-custom-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px;
    margin-top: 4px;
    min-width: 275px;
}

/* Grille de pastilles de couleurs (10 colonnes pour loger les 60 couleurs harmonieusement) */
.bil-color-grid {
    display: grid;
    grid-template-columns: repeat(10, 22px);
    gap: 5px;
    justify-content: center;
}

.bil-color-grid div {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.bil-color-grid div:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
    z-index: 2;
}

/*Bouton pour les réseaux sociaux*/
.bil-content-area .bil-social-icon-btn, 
.article-content .bil-social-icon-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background-color: #ffffff !important;
    text-decoration: none !important;
    margin: 3px 4px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease-in-out !important;
    border: 2px solid transparent !important;
}

.bil-content-area .bil-social-icon-btn i, 
.article-content .bil-social-icon-btn i {
    font-size: 1.15rem !important;
}

.bil-social-whatsapp { border-color: #25d366 !important; color: #25d366 !important; }
.bil-social-facebook { border-color: #1877f2 !important; color: #1877f2 !important; }
.bil-social-linkedin { border-color: #0a66c2 !important; color: #0a66c2 !important; }
.bil-social-x { border-color: #000000 !important; color: #000000 !important; }

.bil-content-area .bil-social-whatsapp:hover, .article-content .bil-social-whatsapp:hover {
    background-color: #25d366 !important; color: #ffffff !important; transform: translateY(-2px);
}
.bil-content-area .bil-social-facebook:hover, .article-content .bil-social-facebook:hover {
    background-color: #1877f2 !important; color: #ffffff !important; transform: translateY(-2px);
}
.bil-content-area .bil-social-linkedin:hover, .article-content .bil-social-linkedin:hover {
    background-color: #0a66c2 !important; color: #ffffff !important; transform: translateY(-2px);
}
.bil-content-area .bil-social-x:hover, .article-content .bil-social-x:hover {
    background-color: #000000 !important; color: #ffffff !important; transform: translateY(-2px);
}

.bil-single-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 6px;
}

@keyframes quizFadeSlideIn {
    0% { opacity: 0; transform: translateY(30px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.bil-animated-quiz {
    animation: quizFadeSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: opacity, transform;
}

.bil-quiz-wrapper .bil-quiz-feedback {
    display: none;
    width: 100%;
    margin-top: 8px;
}

.bil-quiz-wrapper .bil-quiz-feedback[style*="display: block"] {
    display: block !important;
}

.bil-quiz-wrapper .bil-quiz-feedback button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    background-color: #fff5f5 !important;
    border: 1px solid #dc3545 !important;
    color: #dc3545 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.bil-quiz-wrapper .bil-quiz-feedback button:hover {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

.bil-dynamic-ad-section {
    border: 2px dashed #ced4da;
    background-color: #f8f9fa;
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 6px;
    cursor: default;
    transition: all 0.2s ease-in-out;
}

.bil-dynamic-ad-section:hover {
    border-color: #6c757d;
    background-color: #f1f3f5;
}

.bil-dynamic-ad-text {
    font-family: inherit;
    font-size: 0.95rem;
    color: #495057;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}