/**
 * Entity Kit — fiche single (gas-entity-single).
 * BEM + tokens --gas-* uniquement. Markup en parité avec l'Astro.
 */

.gas-entity-single-wrap {
    max-width: var(--gas-container-default, 720px);
    margin-inline: auto;
    padding: var(--gas-space-l, 20px) var(--gas-space-m, 10px);
}

.gas-entity-single__header {
    margin-bottom: var(--gas-space-l, 20px);
}

.gas-entity-single__category {
    margin: 0 0 var(--gas-space-xs, 2.5px);
    color: var(--gas-color-primary, #5b3df5);
    font-size: var(--gas-text-s, 8.75px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gas-entity-single__title {
    margin: 0;
    font-size: var(--gas-text-xl, 22.5px);
    line-height: 1.1;
    color: var(--gas-color-text, #15151a);
}

.gas-entity-single__media {
    margin: 0 0 var(--gas-space-l, 20px);
}

.gas-entity-single__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--gas-radius-l, 10px);
    object-fit: cover;
}

.gas-entity-single__body {
    display: grid;
    gap: var(--gas-space-m, 10px);
    margin-bottom: var(--gas-space-l, 20px);
}

.gas-entity-single__field {
    display: grid;
    gap: var(--gas-space-xs, 2.5px);
}

.gas-entity-single__field-label {
    font-size: var(--gas-text-s, 8.75px);
    font-weight: 600;
    color: var(--gas-color-text-muted, #6b6b78);
}

.gas-entity-single__field-value {
    color: var(--gas-color-text, #15151a);
    font-size: var(--gas-text-m, 10px);
}

.gas-entity-single__field-value img {
    max-width: 100%;
    height: auto;
    border-radius: var(--gas-radius-m, 5px);
}

.gas-entity-single__relations {
    margin-top: var(--gas-space-l, 20px);
    padding-top: var(--gas-space-m, 10px);
    border-top: 1px solid var(--gas-color-border, #e4e4ec);
}

.gas-entity-single__relations-title {
    margin: 0 0 var(--gas-space-s, 5px);
    font-size: var(--gas-text-l, 15px);
    color: var(--gas-color-text, #15151a);
}

.gas-entity-single__relation-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--gas-space-s, 5px);
}

.gas-entity-single__relation {
    display: inline-flex;
    align-items: baseline;
    gap: var(--gas-space-xs, 2.5px);
    padding: var(--gas-space-xs, 2.5px) var(--gas-space-s, 5px);
    border-radius: var(--gas-radius-m, 5px);
    background: var(--gas-color-surface-alt, #f4f4f8);
}

.gas-entity-single__relation-link {
    color: var(--gas-color-primary, #5b3df5);
    font-weight: 600;
    text-decoration: none;
}

.gas-entity-single__relation-link:hover {
    text-decoration: underline;
}

.gas-entity-single__relation-meta {
    color: var(--gas-color-text-muted, #6b6b78);
    font-size: var(--gas-text-s, 8.75px);
}

/* Repeater / group (sous-champs structurés — lot 2/3 plan v2) */

.gas-entity-single__repeater {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--gas-space-s, 5px);
}

.gas-entity-single__repeater-item {
    padding: var(--gas-space-s, 5px) var(--gas-space-m, 7.5px);
    border-radius: var(--gas-radius-m, 5px);
    background: var(--gas-color-surface-alt, #f4f4f8);
}

.gas-entity-single__group {
    display: grid;
    gap: var(--gas-space-xs, 2.5px);
}

.gas-entity-single__subfield {
    display: flex;
    align-items: baseline;
    gap: var(--gas-space-s, 5px);
}

.gas-entity-single__subfield-label {
    color: var(--gas-color-text-muted, #6b6b78);
    font-size: var(--gas-text-s, 8.75px);
    min-width: 80px;
}

.gas-entity-single__subfield-value img {
    max-width: 120px;
    height: auto;
    border-radius: var(--gas-radius-m, 5px);
}

/* Types de champs lot 4 */

.gas-entity-single__multiline {
    white-space: pre-line;
}

.gas-entity-single__gallery {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gas-space-s, 5px);
}

.gas-entity-single__gallery-image {
    max-width: 100px;
    height: auto;
    border-radius: var(--gas-radius-m, 5px);
}

/* Bandeau de prévisualisation (lot 13) */

.gas-entity-preview-banner {
    position: sticky;
    top: 0;
    z-index: 99;
    padding: var(--gas-space-s, 5px) var(--gas-space-m, 7.5px);
    background: var(--gas-color-warning-soft, #fff7e6);
    border-bottom: 1px solid var(--gas-color-warning, #f5c97a);
    color: var(--gas-color-text, #333);
    font-size: var(--gas-text-s, 8.75px);
    text-align: center;
}
