/* Realisation view — layout Filament (Tailwind non chargé dans le panel) */

.fi-in-entry.realisation-entry-full {
    display: block !important;
    grid-column: 1 / -1;
    width: 100%;
}

.fi-in-entry.realisation-entry-full .fi-in-entry-label-col {
    display: none !important;
}

.fi-in-entry.realisation-entry-full .fi-in-entry-content-col {
    width: 100% !important;
    max-width: 100% !important;
}

.fi-in-entry.realisation-entry-full .fi-in-entry-content {
    width: 100% !important;
}

/* Informations + couverture */
.realisation-info-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .realisation-info-layout {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
        align-items: start;
    }
}

.realisation-info-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
}

@media (min-width: 640px) {
    .realisation-info-fields {
        grid-template-columns: 1fr 1fr;
    }
}

.realisation-info-fields .field-full {
    grid-column: 1 / -1;
}

.realisation-info-fields dt {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgb(107 114 128);
}

.realisation-info-fields dd {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: rgb(3 7 18);
}

.dark .realisation-info-fields dt {
    color: rgb(156 163 175);
}

.dark .realisation-info-fields dd {
    color: rgb(255 255 255);
}

.realisation-info-fields .field-nom dd {
    font-weight: 600;
}

.realisation-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 0.375rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.realisation-badge--published {
    background: rgb(220 252 231);
    color: rgb(21 128 61);
}

.realisation-badge--draft {
    background: rgb(243 244 246);
    color: rgb(75 85 99);
}

.dark .realisation-badge--published {
    background: rgb(20 83 45 / 0.2);
    color: rgb(74 222 128);
}

.dark .realisation-badge--draft {
    background: rgb(55 65 81 / 0.4);
    color: rgb(156 163 175);
}

.realisation-cover-block {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.realisation-cover-label {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgb(107 114 128);
}

.dark .realisation-cover-label {
    color: rgb(156 163 175);
}

.realisation-cover-image,
.realisation-cover-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0.75rem;
    overflow: hidden;
}

.realisation-cover-image {
    object-fit: cover;
    border: 1px solid rgb(229 231 235);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.realisation-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgb(209 213 219);
    background: rgb(249 250 251);
    color: rgb(107 114 128);
    font-size: 0.875rem;
}

.dark .realisation-cover-image {
    border-color: rgb(55 65 81);
}

.dark .realisation-cover-placeholder {
    border-color: rgb(75 85 99);
    background: rgb(31 41 55);
    color: rgb(156 163 175);
}

/* Galerie */
.realisation-gallery {
    width: 100%;
}

.realisation-gallery-empty {
    font-size: 0.875rem;
    color: rgb(107 114 128);
}

.dark .realisation-gallery-empty {
    color: rgb(156 163 175);
}

.realisation-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
}

@media (min-width: 640px) {
    .realisation-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .realisation-gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .realisation-gallery-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.realisation-gallery-item {
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    padding: 0;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgb(243 244 246);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.realisation-gallery-item:hover {
    border-color: rgb(245 158 11);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.realisation-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.realisation-gallery-item:hover img {
    transform: scale(1.05);
}

.dark .realisation-gallery-item {
    border-color: rgb(55 65 81);
    background: rgb(31 41 55);
}

/* Lightbox */
.realisation-lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgb(0 0 0 / 0.9);
}

.realisation-lightbox-inner {
    position: relative;
    display: flex;
    height: 100%;
    width: 100%;
    max-width: 72rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.realisation-lightbox-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    border: none;
    border-radius: 9999px;
    padding: 0.5rem;
    background: rgb(0 0 0 / 0.5);
    color: white;
    cursor: pointer;
}

.realisation-lightbox-image {
    max-height: 75vh;
    max-width: 100%;
    border-radius: 0.5rem;
    object-fit: contain;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.realisation-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    border-radius: 9999px;
    padding: 0.75rem;
    background: rgb(0 0 0 / 0.5);
    color: white;
    cursor: pointer;
}

.realisation-lightbox-nav--prev {
    left: 0.5rem;
}

.realisation-lightbox-nav--next {
    right: 0.5rem;
}

.realisation-lightbox-footer {
    position: absolute;
    bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.realisation-lightbox-counter {
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    background: rgb(0 0 0 / 0.5);
    color: white;
    font-size: 0.875rem;
}

.realisation-lightbox-delete {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgb(220 38 38);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.realisation-lightbox-delete:hover {
    background: rgb(239 68 68);
}

[x-cloak] {
    display: none !important;
}
