@layer cms-base, widget, cms-theme;
@layer cms-base {
/* Core fallback for editorial column blocks; themes can override it. */
:where(.cms-columns){display:grid;grid-template-columns:minmax(0,1fr);gap:24px;margin-block:24px}
:where(.cms-columns-50-50){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
:where(.cms-columns-33-66){grid-template-columns:minmax(0,1fr) minmax(0,2fr)}
:where(.cms-columns-66-33){grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
:where(.cms-column){min-width:0;overflow-wrap:anywhere}
:where(.cms-column)>:first-child{margin-top:0}
:where(.cms-column)>:last-child{margin-bottom:0}
@media(max-width:700px){:where(.cms-columns){grid-template-columns:minmax(0,1fr)}}

:where(img.image){max-width:100%;height:auto}
:where(.cms-align-left){text-align:left}
:where(.cms-align-center){text-align:center}
:where(.cms-align-right){text-align:right}
:where(.cms-align-justify){text-align:justify}
:where(img.cms-image-center){display:block;margin-inline:auto}
:where(img.cms-image-wrap-left){float:left;margin:0 1rem 1rem 0;max-width:45%;height:auto}
:where(img.cms-image-wrap-right){float:right;margin:0 0 1rem 1rem;max-width:45%;height:auto}
:where(.page-content,.cms-editor-surface){display:flow-root}
:where(.cms-image-missing){display:inline-block;padding:.35rem .5rem;border:1px dashed #a16207;background:#fff7ed;color:#7c2d12}
/* Liens-boutons permanents : la couche du theme et custom.css peuvent tout surcharger. */
:where(a.cms-button){display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;max-width:100%;min-height:44px;padding:.65em 1.15em;gap:.4em;border:2px solid var(--color-primary,#334155);border-radius:8px;font:inherit;font-weight:600;line-height:1.3;text-align:center;text-decoration:none;overflow-wrap:anywhere;vertical-align:middle;cursor:pointer}
:where(a.cms-button--solid){background:var(--color-primary,#334155);color:#fff}
:where(a.cms-button--outline){background:transparent;color:var(--color-primary,#334155)}
:where(a.cms-button--solid:visited){color:#fff}
:where(a.cms-button--outline:visited){color:var(--color-primary,#334155)}
:where(a.cms-button--solid:hover){border-color:var(--color-secondary,#1e293b);background:var(--color-secondary,#1e293b);color:#fff;text-decoration:none}
:where(a.cms-button--outline:hover){background:var(--color-primary,#334155);color:#fff;text-decoration:none}
:where(a.cms-button:focus-visible){outline:3px solid var(--color-primary,#334155);outline-offset:3px}
@media(max-width:700px){:where(img.cms-image-wrap-left,img.cms-image-wrap-right){float:none;display:block;max-width:100%;margin:1rem auto}}

}

/* Front-only table frames; vertical height stays natural. */
.cms-table-scroll{display:block;max-width:100%;width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain}
.page-content .cms-table-scroll>table{width:max-content;min-width:100%;max-width:none;table-layout:auto}
.cms-table-scroll th,.cms-table-scroll td{min-width:9rem;overflow-wrap:normal}
.cms-table-scroll:focus-visible{outline:2px solid var(--color-primary,#334155);outline-offset:2px}
.cms-table-scroll-hint{display:block;margin:4px 0 12px;font-size:0.875rem;color:inherit;opacity:.8}
.cms-table-scroll-hint[hidden]{display:none!important}
@media print{.cms-table-scroll{overflow:visible}.page-content .cms-table-scroll>table{width:100%;min-width:0;table-layout:auto}.cms-table-scroll th,.cms-table-scroll td{min-width:0;overflow-wrap:anywhere}.cms-table-scroll-hint{display:none}}
