/* Robocut Core — styles structurels. Les couleurs viennent du thème (variables WP). */
.rc-portfolio, .rc-gallery, .rc-news { --rc-red: var(--wp--preset--color--red, #ee2d2d); --rc-gap: 6px; }

/* Filtre */
.rc-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; margin: 0 0 2rem; }
.rc-filter button { background: none; border: 0; padding: .25rem 0; font: inherit; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; color: inherit; cursor: pointer; border-bottom: 2px solid transparent; }
.rc-filter button:hover, .rc-filter button.is-active { color: var(--rc-red); border-bottom-color: var(--rc-red); }

/* Grille de projets */
.rc-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--rc-gap); grid-template-columns: repeat(var(--rc-cols, 4), 1fr); }
.rc-grid__item[hidden] { display: none; }
.rc-card { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #f0f0f0; color: #fff; text-decoration: none; }
.rc-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.rc-card__body { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 1rem; background: color-mix(in srgb, var(--rc-red) 88%, transparent); opacity: 0; transition: opacity .25s ease; }
.rc-card__title { font-weight: 700; font-size: 1.2rem; text-transform: uppercase; line-height: 1.1; }
.rc-card__cats { font-size: .8rem; margin-top: .5rem; opacity: .9; }
.rc-card:hover .rc-card__body, .rc-card:focus-visible .rc-card__body { opacity: 1; }
.rc-card:hover img { transform: scale(1.04); }
@media (max-width: 1100px) { .rc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px)  { .rc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (hover: none) { .rc-card__body { opacity: 1; inset: auto 0 0 0; padding: .5rem; } .rc-card__title { font-size: .85rem; } .rc-card__cats { display: none; } }

/* Détails du projet */
.rc-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem 2rem; margin: 0 0 2rem; padding: 1.25rem 0; border-top: 2px solid var(--rc-red, #ee2d2d); border-bottom: 1px solid #e5e5e5; }
.rc-details dt { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--rc-red, #ee2d2d); font-weight: 700; }
.rc-details dd { margin: .25rem 0 0; }

/* Galerie */
.rc-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 var(--rc-gap); background: #000; }
.rc-video iframe, .rc-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rc-thumbs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--rc-gap); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.rc-thumbs a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #f0f0f0; }
.rc-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.rc-thumbs a:hover img { opacity: .85; }

/* Visionneuse */
.rc-lb { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.rc-lb[hidden] { display: none; }
.rc-lb img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.rc-lb button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.5rem; line-height: 1; padding: 1rem; cursor: pointer; }
.rc-lb .rc-lb__close { top: 0; right: 0; }
.rc-lb .rc-lb__prev { left: 0; top: 50%; transform: translateY(-50%); }
.rc-lb .rc-lb__next { right: 0; top: 50%; transform: translateY(-50%); }
.rc-lb button:hover { color: var(--wp--preset--color--red, #ee2d2d); }

/* Dernières nouvelles */
.rc-news { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.rc-news__img { display: block; aspect-ratio: 1; overflow: hidden; background: #f0f0f0; margin-bottom: .75rem; }
.rc-news__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-news time { font-size: .8rem; color: #878787; text-transform: uppercase; letter-spacing: .05em; }
.rc-news h3 { font-size: 1.2rem; margin: .25rem 0 .5rem; text-transform: uppercase; line-height: 1.15; }
.rc-news h3 a { color: inherit; text-decoration: none; }
.rc-news h3 a:hover { color: var(--rc-red); }
.rc-news p { margin: 0 0 .5rem; font-size: .95rem; }
.rc-more { font-weight: 700; font-size: .85rem; text-transform: uppercase; color: var(--rc-red); text-decoration: none; }

/* Mini-galerie : mosaïque */
.rc-mosaic { list-style: none; margin: 0; padding: 0; columns: 4 220px; column-gap: 6px; }
.rc-mosaic li { break-inside: avoid; margin: 0 0 6px; }
.rc-mosaic a { display: block; }
.rc-mosaic img { width: 100%; height: auto; display: block; transition: opacity .2s; }
.rc-mosaic a:hover img { opacity: .85; }
