/* ─── Junoh Readmore – Styles ─── */

.jrm-readmore {
    position: relative;
}

/* ── Titre principal du widget ── */
.jrm-readmore__title {
    margin: 0 0 16px;
    color: #398183;
}

/* ═══════════════════════════════════════════
   Contenu riche (WYSIWYG)
   Stylise tous les éléments HTML internes
═══════════════════════════════════════════ */

.jrm-readmore__content {
    position: relative;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

/* État étendu */
.jrm-readmore__content.jrm-expanded {
    max-height: none !important;
}

/* ── Paragraphes ── */
.jrm-readmore__content p {
    margin: 0 0 1em;
    line-height: 1.7;
}

.jrm-readmore__content p:last-child {
    margin-bottom: 0;
}

/* ── Titres internes (H2 – H6) ── */
.jrm-readmore__content h2,
.jrm-readmore__content h3,
.jrm-readmore__content h4,
.jrm-readmore__content h5,
.jrm-readmore__content h6 {
    color: #398183;
    margin: 1.4em 0 0.6em;
    line-height: 1.3;
}

.jrm-readmore__content h2:first-child,
.jrm-readmore__content h3:first-child,
.jrm-readmore__content h4:first-child {
    margin-top: 0;
}

.jrm-readmore__content h2 {
    font-size: 1.5em;
}

.jrm-readmore__content h3 {
    font-size: 1.25em;
}

.jrm-readmore__content h4 {
    font-size: 1.1em;
}

/* ── Gras / Italique ── */
.jrm-readmore__content strong,
.jrm-readmore__content b {
    font-weight: 700;
}

.jrm-readmore__content em,
.jrm-readmore__content i {
    font-style: italic;
}

/* ── Listes à puces & numérotées ── */
.jrm-readmore__content ul,
.jrm-readmore__content ol {
    margin: 0.8em 0;
    padding-left: 1.6em;
}

.jrm-readmore__content ul {
    list-style-type: disc;
}

.jrm-readmore__content ol {
    list-style-type: decimal;
}

.jrm-readmore__content li {
    margin-bottom: 0.4em;
    line-height: 1.6;
}

.jrm-readmore__content li::marker {
    color: #398183;
}

/* ── Liens ── */
.jrm-readmore__content a {
    color: #398183;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.jrm-readmore__content a:hover {
    opacity: 0.75;
}

/* ── Images dans le contenu ── */
.jrm-readmore__content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1em 0;
    display: block;
}

/* ── Citations (blockquote) ── */
.jrm-readmore__content blockquote {
    margin: 1em 0;
    padding: 0.8em 1.2em;
    border-left: 4px solid #398183;
    background: rgba(57, 129, 131, 0.06);
    border-radius: 0 6px 6px 0;
    font-style: italic;
}

/* ── Séparateurs ── */
.jrm-readmore__content hr {
    border: none;
    border-top: 2px solid rgba(57, 129, 131, 0.2);
    margin: 1.5em 0;
}

/* ── Tableaux ── */
.jrm-readmore__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.jrm-readmore__content th,
.jrm-readmore__content td {
    padding: 0.6em 0.8em;
    border: 1px solid #ddd;
    text-align: left;
}

.jrm-readmore__content th {
    background: rgba(57, 129, 131, 0.08);
    font-weight: 600;
}

/* ── Dégradé de masquage (indique qu'il y a du contenu caché) ── */
.jrm-readmore__content:not(.jrm-expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.jrm-readmore__content.jrm-expanded::after {
    display: none;
}

/* ═══════════════════════════════════════════
   Blocs Image + Texte
═══════════════════════════════════════════ */

.jrm-block {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-top: 30px;
}

.jrm-block:first-child {
    margin-top: 0;
}

/* Image à droite */
.jrm-block--right {
    flex-direction: row-reverse;
}

/* Conteneur image */
.jrm-block__image {
    width: 40%;
    flex-shrink: 0;
}

.jrm-block__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

/* Conteneur texte */
.jrm-block__text {
    flex: 1;
    min-width: 0;
}

.jrm-block__title {
    color: #398183;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 0.6em;
    line-height: 1.3;
}

.jrm-block__text p {
    margin: 0 0 0.8em;
    line-height: 1.7;
}

.jrm-block__text p:last-child {
    margin-bottom: 0;
}

/* Responsive : empiler en colonne sur mobile */
@media (max-width: 767px) {

    .jrm-block,
    .jrm-block--right {
        flex-direction: column;
    }

    .jrm-block__image {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════
   Bouton Lire plus / Lire moins
═══════════════════════════════════════════ */

.jrm-readmore__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    background: none;
    border: none;
    color: #398183;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: opacity 0.25s ease;
    position: relative;
}

/* Flèche animée */
.jrm-readmore__btn::after {
    content: '▼';
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

.jrm-readmore__btn[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.jrm-readmore__btn:hover {
    opacity: 0.8;
}

/* Masquer le bouton quand le contenu n'est pas tronqué */
.jrm-readmore__btn.jrm-hidden {
    display: none;
}