.v24-editor{border:1px solid #d8e1ed;border-radius:12px;overflow:hidden;background:white}.v24-toolbar{display:flex;gap:6px;flex-wrap:wrap;padding:10px;background:#f4f7fb;border-bottom:1px solid #d8e1ed}.v24-toolbar button{padding:7px 10px;border:1px solid #cbd6e5;background:#fff;border-radius:6px;cursor:pointer;color:#12223e}.v24-content{min-height:220px;padding:20px;outline:none;line-height:1.7;overflow-wrap:anywhere}.v24-content:focus{box-shadow:inset 0 0 0 2px #93c5fd}.v24-content img,.project-body img{display:block;max-width:100%;height:auto;border-radius:10px;margin:18px auto}.v24-content table,.project-body table{border-collapse:collapse;width:100%;margin:20px 0}.v24-content td,.v24-content th,.project-body td,.project-body th{border:1px solid #d8e1ed;padding:10px;text-align:left}.v24-content th,.project-body th{background:#eef3fa}.v24-hint{font-size:12px;color:#60738e;padding:0 12px 10px}.project-body{line-height:1.75}.project-body h2,.project-body h3{margin-top:1.4em}.project-body figure{margin:20px 0}.project-body blockquote{border-left:4px solid #2563eb;padding-left:15px;color:#52637c}

/* V2.4.1 : mise en page des figures */
.v24-content figure,.project-body figure{display:block;box-sizing:border-box;max-width:100%;margin:20px auto;text-align:center}
.v24-content figure img,.project-body figure img{display:block;width:100%;height:auto;margin:0 auto}
.v24-content figure.v241-small,.project-body figure.v241-small{width:min(100%,320px)}
.v24-content figure.v241-medium,.project-body figure.v241-medium{width:min(100%,600px)}
.v24-content figure.v241-large,.project-body figure.v241-large{width:100%}
.v24-content figure.v241-left,.project-body figure.v241-left{margin-left:0;margin-right:auto}
.v24-content figure.v241-right,.project-body figure.v241-right{margin-left:auto;margin-right:0}
.v24-content figure.v241-center,.project-body figure.v241-center{margin-left:auto;margin-right:auto}
.v24-content figcaption,.project-body figcaption{font-size:.88rem;color:#60738e;margin-top:9px;line-height:1.45}
.v24-content figure.v241-selected{outline:2px solid #2563eb;outline-offset:5px}
.v24-toolbar button:focus-visible{outline:2px solid #2563eb}
@media(max-width:650px){.v24-toolbar{gap:4px}.v24-toolbar button{font-size:12px;padding:6px 8px}}

/* V2.4.2 — Aperçu non destructif */
.v242-preview-button{cursor:pointer}
.v242-preview-overlay{position:fixed;inset:0;z-index:99999;background:rgba(8,20,40,.72);display:flex;align-items:center;justify-content:center;padding:20px}
.v242-preview-panel{width:min(1100px,96vw);height:min(850px,92vh);background:white;border-radius:14px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 65px #0005}
.v242-preview-header{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 20px;border-bottom:1px solid #e0e6ee;color:#102446}
.v242-preview-close{border:1px solid #b8c7d9;border-radius:7px;padding:8px 15px;background:#f5f8fc;color:#102446;cursor:pointer}
.v242-preview-frame{width:100%;flex:1;border:0;background:white}

/* V2.5 : galerie responsive dans la fiche publique et l'éditeur. */
.project-body .v25-gallery,.v24-content .v25-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:18px;margin:24px 0;align-items:start}
.project-body .v25-gallery figure,.v24-content .v25-gallery figure{margin:0;max-width:none!important;width:100%;min-width:0}
.project-body .v25-gallery img,.v24-content .v25-gallery img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:contain;background:#f2f5fa;border-radius:10px}
.project-body .v25-gallery figcaption,.v24-content .v25-gallery figcaption{font-size:.86rem;line-height:1.45;margin-top:8px;overflow-wrap:anywhere}
@media(max-width:620px){.project-body .v25-gallery,.v24-content .v25-gallery{grid-template-columns:1fr}}
/* Valmis V2.5 — Correction affichage des galeries */

.project-body .v25-gallery img,
.v24-content .v25-gallery img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    background: transparent;
    border-radius: 10px;
}

.project-body .v25-gallery figure,
.v24-content .v25-gallery figure {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}