/*
 * Présentation d'un événement (HTML filtré par app/helpers/rich_text_helper.php), même rendu sur le site public
 * et dans l'éditeur de l'administration. Couleurs : celles du site, jamais celles saisies par l'organisateur.
 * Palette du site public (public.css) ; valeurs reprises telles quelles dans l'éditeur de l'administration pour un aperçu fidèle.
 */
.rich-content {
    --rt-accent: var(--pub-accent, #e63338);
    --rt-accent-rgb: var(--pub-accent-rgb, 230, 51, 56);
    --rt-text: var(--pub-text-secondary, #344054);
    --rt-heading: var(--pub-text, #101828);
    --rt-muted: var(--pub-muted, #667085);
    --rt-border: var(--pub-border, #e6e8ec);
    --rt-surface: #fff;
    --rt-bg: var(--pub-bg, #f5f6f8);
    color: var(--rt-text);
    font-size: 1.05rem;
    line-height: 1.7;
    overflow-wrap: break-word;
}
.rich-content > :first-child { margin-top: 0; }
.rich-content > :last-child { margin-bottom: 0; }
.rich-content p, .rich-content ul, .rich-content ol, .rich-content table, .rich-content figure { margin: 0 0 1em; }
.rich-content h2, .rich-content h3, .rich-content h4 { color: var(--rt-heading); font-weight: 800; letter-spacing: -.01em; line-height: 1.25; margin: 1.6em 0 .5em; }
.rich-content h2 { font-size: 1.45rem; }
.rich-content h3 { font-size: 1.2rem; }
.rich-content h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--rt-accent); }
.rich-content a { color: var(--rt-accent); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rich-content strong, .rich-content b { color: var(--rt-heading); font-weight: 700; }
.rich-content mark { padding: .05em .3em; border-radius: 4px; background: rgba(var(--rt-accent-rgb), .14); color: var(--rt-heading); }
.rich-content ul, .rich-content ol { padding-left: 1.4em; }
.rich-content li + li { margin-top: .3em; }
.rich-content ul li::marker { color: var(--rt-accent); }
.rich-content blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--rt-accent); font-size: 1.15rem; font-style: italic; color: var(--rt-heading); }
.rich-content hr { margin: 2em 0; border: 0; border-top: 1px solid var(--rt-border); opacity: 1; }
.rich-content img { display: block; max-width: 100%; height: auto; border-radius: 12px; }
.rich-content figcaption { margin-top: 6px; font-size: .85rem; color: var(--rt-muted); text-align: center; }
.rich-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.rich-content th, .rich-content td { padding: 8px 12px; border-bottom: 1px solid var(--rt-border); text-align: left; vertical-align: top; }
.rich-content th { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--rt-muted); background: var(--rt-bg); }
.rich-content .rt-align-center { text-align: center; }
.rich-content .rt-align-right { text-align: right; }

/* Blocs prédéfinis */
.rich-content .rt-lead { font-size: 1.2rem; line-height: 1.6; color: var(--rt-heading); }

.rich-content .rt-callout { position: relative; margin: 1.4em 0; padding: 16px 18px 16px 52px; border-radius: 12px; background: rgba(var(--rt-accent-rgb), .07); border: 1px solid rgba(var(--rt-accent-rgb), .2); }
.rich-content .rt-callout::before { content: "\F431"; font-family: "bootstrap-icons"; position: absolute; left: 18px; top: 15px; font-size: 1.2rem; line-height: 1.5; color: var(--rt-accent); }
.rich-content .rt-callout-warning { background: #fffaeb; border-color: #fedf89; }
.rich-content .rt-callout-warning::before { content: "\F33A"; color: #dc6803; }
.rich-content .rt-callout-success { background: #ecfdf3; border-color: #abefc6; }
.rich-content .rt-callout-success::before { content: "\F26A"; color: #12b76a; }
.rich-content .rt-callout > :last-child { margin-bottom: 0; }

.rich-content .rt-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 1.4em 0; }
.rich-content .rt-highlight { padding: 16px; border-radius: 12px; background: var(--rt-surface); border: 1px solid var(--rt-border); text-align: center; line-height: 1.3; }
.rich-content .rt-highlight strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--rt-accent); }
.rich-content .rt-highlight span, .rich-content .rt-highlight { font-size: .9rem; color: var(--rt-muted); }

.rich-content .rt-schedule { list-style: none; padding: 0; margin: 1.4em 0; border-left: 2px solid rgba(var(--rt-accent-rgb), .3); }
.rich-content .rt-schedule li { position: relative; padding: 4px 0 10px 22px; margin: 0; }
.rich-content .rt-schedule li::before { content: ""; position: absolute; left: -7px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--rt-accent); box-shadow: 0 0 0 3px var(--rt-surface); }
.rich-content .rt-schedule li strong { display: inline-block; min-width: 64px; color: var(--rt-accent); font-variant-numeric: tabular-nums; }

.rich-content .rt-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin: 1.4em 0; }
.rich-content .rt-column > :last-child { margin-bottom: 0; }

.rich-content a.rt-button { display: inline-flex; align-items: center; gap: 6px; padding: .6rem 1.2rem; border-radius: 10px; background: var(--rt-accent); color: #fff; text-decoration: none; }
.rich-content a.rt-button:hover { filter: brightness(.92); color: #fff; }
.rich-content a.rt-button::after { content: "\F138"; font-family: "bootstrap-icons"; font-weight: 400; }
