﻿/*  Images CKEditor avec alignement */
figure.image {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 1em auto;
    text-align: center;
}

    figure.image img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 6px;
    }

/*  Alignements générés par CKEditor */
figure.image-style-align-left {
    float: left;
    margin-right: 1em;
    max-width: 200px;
    height: auto;
}

figure.image-style-align-center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.image-style-align-right {
    float: right;
    margin-left: 1em;
    max-width: 200px;
    height: auto;
}

/*  Images redimensionnées */
figure.image_resized {
    max-width: 100%;
}

/*  Légendes */
figure.image figcaption {
    font-size: 0.9em;
    color: #555;
    margin-top: 0.5em;
    font-style: italic;
}

/*  Paragraphes et titres */
.ck-content h1,
.ck-content h2,
.ck-content h3 {
    font-weight: bold;
    margin: 1em 0 0.5em;
}

.ck-content p {
    margin: 0.5em 0;
    line-height: 1.6;
}

/*  Liens */
.ck-content a {
    color: #0077cc;
    text-decoration: underline;
}

/*  Responsive */
@media (max-width: 600px) {
    figure.image {
        width: 100%;
    }

        figure.image img {
            width: 100%;
        }
}

.ck-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    font-size: 0.95em;
}

.ck-content th,
.ck-content td {
    border: 1px solid #ccc;
    padding: 0.5em;
    text-align: left;
}

.ck-content thead {
    background-color: #f5f5f5;
    font-weight: bold;
}

.ck-content td {
    vertical-align: top;
}

.ck-content table caption {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0.3em;
    text-align: center;
}

blockquote {
    margin-left: 20px;
    padding: 10px;
    border-left: 3px solid #ccc;
    font-style: italic;
}

figure.table {
    display: block;
    overflow-x: auto; /* Pour la compatibilité mobile */
    margin: 1em 0;
}

    figure.table table {
        width: 100%;
        border-collapse: collapse;
        font-family: Arial, sans-serif;
        font-size: 14px;
    }

    figure.table td,
    figure.table th {
        border: 1px solid #ccc;
        padding: 8px 12px;
        text-align: center;
    }

    figure.table tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    figure.table th {
        background-color: #f0f0f0;
        font-weight: bold;
    }

figure.table {
    display: block;
    overflow-x: auto;
}

/* Optionnel : éviter que le texte coule trop loin sous l'image */
{
    overflow: auto;
}
