/**
 * Styles personnalisés pour le blog
 * Ce fichier surcharge les styles de base pour l'affichage des articles
 */

/* Le blog hérite des styles de base du site et ajoute quelques spécificités */
.article-content {
    font-size: 1.1rem;
}

/* Titres - couleur primaire pour h2 du blog */
.article-content h2 {
    color: var(--primary-color);
    margin-top: 2.5rem;
}

.article-content h3 {
    margin-top: 2rem;
}

/* Texte en gras - couleur primaire pour le blog */
.article-content strong {
    color: var(--primary-color);
}

/* Images éditables */
.article-content .editable-image {
    position: relative;
    margin: 2rem auto;
    max-width: 100%;
    cursor: pointer;
}

.article-content .editable-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-content .editable-image:hover img {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

/* Blocs CTA - style spécifique au blog */
.article-content .cta-preview,
.article-content .article-cta {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(26, 54, 66, 0.2);
}

/* Le blog utilise les styles de base pour blockquote, code, pre, et tables */
/* Pas besoin de les redéfinir ici */

/* ===========================
   Widget: Citation / Quote
   =========================== */
.widget-quote {
    margin: 2rem 0;
    padding: 1.5rem;
    font-style: italic;
}

.widget-quote--bordered {
    border-left: 4px solid var(--primary-color);
    background: #f8f9fa;
}

.widget-quote--card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.widget-quote--large {
    font-size: 1.5rem;
    text-align: center;
    border: none;
    background: none;
}

.widget-quote__text {
    margin: 0 0 1rem;
}

.widget-quote__footer {
    font-size: 0.9rem;
    font-style: normal;
    color: #666;
}

.widget-quote__author {
    font-weight: 600;
}

.widget-quote__source::before {
    content: ' — ';
}

/* ===========================
   Widget: Video
   =========================== */
.widget-video__wrapper {
    position: relative;
    width: 100%;
}

.widget-video__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.widget-video--error {
    padding: 2rem;
    background: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    text-align: center;
}

/* ===========================
   Widget: Code
   =========================== */
.widget-code {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    background: #1e1e1e;
}

.widget-code__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.widget-code__filename {
    font-size: 0.85rem;
    color: #888;
    font-family: monospace;
}

.widget-code__copy {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    background: #3d3d3d;
    color: #ccc;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.widget-code__copy:hover {
    background: #4d4d4d;
}

.widget-code pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
}

.widget-code code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #d4d4d4;
    background: none;
    padding: 0;
}

/* ===========================
   Widget: Alert
   =========================== */
.widget-alert {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    margin: 2rem 0;
    border-radius: 8px;
    border-left: 4px solid;
}

.widget-alert--info {
    background: #e7f3ff;
    border-color: #0066cc;
}

.widget-alert--success {
    background: #d4edda;
    border-color: #28a745;
}

.widget-alert--warning {
    background: #fff3cd;
    border-color: #ffc107;
}

.widget-alert--danger {
    background: #f8d7da;
    border-color: #dc3545;
}

.widget-alert--note {
    background: #f8f9fa;
    border-color: #6c757d;
}

.widget-alert__icon {
    font-size: 1.5rem;
    line-height: 1;
}

.widget-alert__title {
    display: block;
    margin-bottom: 0.5rem;
}

.widget-alert__text {
    margin: 0;
}

/* ===========================
   Widget: Table
   =========================== */
.widget-table__wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

.widget-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.widget-table th,
.widget-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.widget-table thead th {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.widget-table--striped tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.widget-table--bordered th,
.widget-table--bordered td {
    border: 1px solid #dee2e6;
}

.widget-table--compact th,
.widget-table--compact td {
    padding: 0.5rem;
    font-size: 0.9rem;
}

.widget-table caption {
    padding: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    caption-side: bottom;
}

/* ===========================
   Widget: Accordion
   =========================== */
.widget-accordion {
    margin: 2rem 0;
}

.widget-accordion__item {
    margin-bottom: 0.5rem;
}

.widget-accordion--bordered .widget-accordion__item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.widget-accordion--separated .widget-accordion__item {
    border-bottom: 1px solid #dee2e6;
    border-radius: 0;
}

.widget-accordion__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s;
}

.widget-accordion__header:hover {
    background: #e9ecef;
}

.widget-accordion__header::-webkit-details-marker {
    display: none;
}

.widget-accordion__icon::after {
    content: '+';
    font-size: 1.25rem;
    color: #666;
}

.widget-accordion__item[open] .widget-accordion__icon::after {
    content: '−';
}

.widget-accordion__content {
    padding: 1rem 1.25rem;
}

.widget-accordion__content p {
    margin: 0;
}

/* ===========================
   Widget: Separator
   =========================== */
.widget-separator {
    border: none;
}

.widget-separator--space {
    background: transparent;
}

/* Responsive - ajustements spécifiques au blog */
@media (max-width: 768px) {
    .article-content {
        font-size: 1rem;
    }

    .article-content .editable-image {
        margin: 1.5rem auto;
    }

    .widget-quote--large {
        font-size: 1.25rem;
    }

    .widget-alert {
        flex-direction: column;
        gap: 0.5rem;
    }

    .widget-table th,
    .widget-table td {
        padding: 0.5rem;
    }
}
