/* ══════════════════════════════════════════════════════════════════════════════
   Ars — Front CSS
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────────────────── */
.ars-front-wrap {
    --ars-gap-h:      12px;
    --ars-gap-v:      12px;
    --ars-radius:     3px;
    --ars-transition: .3s ease;
    --ars-mark-bg:    #ffe066;
    --ars-mark-color: #1d2327;
    --ars-pill-bg:    #f0f0f1;
    --ars-pill-color: #50575e;
    --ars-pill-active:#1d2327;
}

.ars-front-wrap { width: 100%; }
.ars-front-vide { color: #646970; font-style: italic; }

/* ══════════════════════════════════════════════════════════════════════════════
   AUTOCOMPLETE
   ══════════════════════════════════════════════════════════════════════════════ */
.ars-search-wrap {
    position: relative;
    max-width: 420px;
    margin-bottom: 20px;
}
.ars-search {
    width: 100%;
    padding: 10px 16px;
    font-size: 15px;
    border: 1px solid #c3c4c7;
    border-radius: 24px;
    outline: none;
    box-sizing: border-box;
    transition: border-color var(--ars-transition), box-shadow var(--ars-transition);
}
.ars-search:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,.15);
}
.ars-autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    list-style: none;
    margin: 0; padding: 4px 0;
    z-index: 9000;
    max-height: 300px;
    overflow-y: auto;
    list-style: none!important;
    padding: 0!important;
    line-height: 1.7!important;
}
.ars-autocomplete-list[hidden] { display: none; }
.ars-autocomplete-list li {
    padding: 9px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #1d2327;
    transition: background .12s;
}
.ars-autocomplete-list li:hover,
.ars-autocomplete-list .ars-ac-active { background: #f0f6ff; }
.ars-mark {
    background: var(--ars-mark-bg);
    color: var(--ars-mark-color);
    border-radius: 2px;
    padding: 0 1px;
    font-style: normal;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PILLS
   ══════════════════════════════════════════════════════════════════════════════ */
.ars-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.ars-pill {
    background: var(--ars-pill-bg);
    color: var(--ars-pill-color);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--ars-transition), color var(--ars-transition);
    line-height: 1.4;
}
.ars-pill:hover { background: #e0e0e1; color: #1d2327; }
.ars-pill--active {
    background: var(--ars-pill-active);
    color: #fff;
    border-color: var(--ars-pill-active);
}

/* ══════════════════════════════════════════════════════════════════════════════
   GRILLE — commune
   ══════════════════════════════════════════════════════════════════════════════ */
.ars-item-lien { display: block; text-decoration: none; }
.ars-item-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--ars-radius);
    background: #f0f0f1;
}
.ars-item-img-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ars-transition);
}
.ars-item-lien:hover .ars-item-img-wrap img { transform: scale(1.04); }
.ars-item-no-img { width: 100%; min-height: 160px; background: #e0e0e1; }

/* Titre sous */
.ars-item-titre {
    margin: 6px 0 0;
    font-size: 13px;
    color: #1d2327;
    line-height: 1.4;
}
.ars-align--gauche { text-align: left; }
.ars-align--centre { text-align: center; }
.ars-align--droite { text-align: right; }

/* Titre survol */
.ars-item-survol {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 10px 12px;
    background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--ars-transition);
}
.ars-item-lien:hover .ars-item-survol { opacity: 1; }
.ars-item-survol span { color: #fff; font-size: 13px; font-weight: 500; line-height: 1.3; }

/* ── Grille uniforme ──────────────────────────────────────────────────────── */
.ars-grille--grille { display: grid; column-gap: var(--ars-gap-h); row-gap: var(--ars-gap-v); }
.ars-grille--grille.ars-grille--col2 { grid-template-columns: repeat(2, 1fr); }
.ars-grille--grille.ars-grille--col3 { grid-template-columns: repeat(3, 1fr); }
.ars-grille--grille.ars-grille--col4 { grid-template-columns: repeat(4, 1fr); }

/* ratio libre */
.ars-grille--grille .ars-item-img-wrap:not([style*="aspect-ratio"]) img {
    height: auto;
    object-fit: initial;
}

/* ── Masonry ──────────────────────────────────────────────────────────────── */
.ars-grille--masonry { display: flex; flex-wrap: wrap; gap: 0; /* gaps gérés par JS */ }
.ars-grille--masonry .ars-item { overflow: hidden; }
.ars-grille--masonry .ars-item-img-wrap { aspect-ratio: auto; }
.ars-grille--masonry .ars-item-img-wrap img { height: auto; min-height: 60px; }

/* ── Justified ────────────────────────────────────────────────────────────── */
.ars-grille--justified img { transition: transform var(--ars-transition); }
.ars-grille--justified .ars-item-lien:hover img { transform: scale(1.04); }

/* ══════════════════════════════════════════════════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════════════════════════════════════════════════ */
.ars-lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.ars-lb-overlay[hidden] { display: none; }

.ars-lb--blanc { background: rgba(255,255,255,.97); }
.ars-lb--blanc .ars-lb-close              { color: #1d2327; }
.ars-lb--blanc .ars-lb-prev,
.ars-lb--blanc .ars-lb-next               { background: rgba(0,0,0,.08); border-color: rgba(0,0,0,.15); color: #1d2327; }
.ars-lb--blanc .ars-lb-prev:hover,
.ars-lb--blanc .ars-lb-next:hover         { background: rgba(0,0,0,.18); }
.ars-lb--blanc .ars-lb-infos              { color: #1d2327; }
.ars-lb--blanc .ars-lb-sep               { color: #a7aaad; }

.ars-lb--noir  { background: rgba(0,0,0,.95); }
.ars-lb--noir .ars-lb-close               { color: rgba(255,255,255,.75); }
.ars-lb--noir .ars-lb-prev,
.ars-lb--noir .ars-lb-next                { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.ars-lb--noir .ars-lb-prev:hover,
.ars-lb--noir .ars-lb-next:hover          { background: rgba(255,255,255,.25); }
.ars-lb--noir .ars-lb-infos              { color: rgba(255,255,255,.85); }
.ars-lb--noir .ars-lb-sep               { color: rgba(255,255,255,.35); }

.ars-lb-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 92vh;
}
.ars-lb-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 2px;
    display: block;
}
.ars-lb-infos {
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
    max-width: 640px;
}
.ars-lb-titre  { font-style: italic; font-weight: 500; }
.ars-lb-sep    { }

.ars-lb-close {
    position: absolute;
    top: 18px; right: 22px;
    background: none; border: none;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    transition: opacity .15s;
    z-index: 1;
}
.ars-lb-close:hover { opacity: .7; }

.ars-lb-prev,
.ars-lb-next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    border: 1px solid;
    font-size: 20px;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 1;
}
.ars-lb-prev[hidden],
.ars-lb-next[hidden] { display: none; }
.ars-lb-prev { left: 20px; }
.ars-lb-next { right: 20px; }

/* Full Screen */
.ars-lb-fullscreen {
    position: absolute;
    top: 18px; left: 22px;
    background: none; border: none;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    transition: opacity .15s;
    z-index: 1;
}
.ars-lb-fullscreen:hover { opacity: .7; }
.ars-lb--blanc .ars-lb-fullscreen { color: #1d2327; }
.ars-lb--noir  .ars-lb-fullscreen { color: rgba(255,255,255,.75); }

body.ars-no-scroll { overflow: hidden; }

/* Iframe vidéo dans la lightbox */
.ars-lb-iframe {
    display: block;
    width: min(85vw, 1200px);
    height: min(78vh, 675px);   /* ratio 16/9 approximatif sur la largeur max */
    border: none;
    border-radius: 2px;
}
 
/* Bouton ▶ sur la vignette */
.ars-item-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;      /* le clic passe à travers vers le lien parent */
}
.ars-item-play svg {
    background: rgba(0,0,0,.45);
    color: #fff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 14px;
    box-sizing: border-box;
    transition: background var(--ars-transition), transform var(--ars-transition);
}
.ars-item-lien:hover .ars-item-play svg {
    background: rgba(0,0,0,.7);
    transform: scale(1.1);
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .ars-grille--grille.ars-grille--col4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .ars-grille--grille.ars-grille--col3,
    .ars-grille--grille.ars-grille--col4 { grid-template-columns: repeat(2, 1fr); }
    .ars-lb-prev { left: 8px; }
    .ars-lb-next { right: 8px; }
    .ars-lb-infos { font-size: 12px; }
}
@media (max-width: 480px) {
    .ars-grille--grille.ars-grille--col2,
    .ars-grille--grille.ars-grille--col3,
    .ars-grille--grille.ars-grille--col4 { grid-template-columns: 1fr; }
    .ars-search-wrap { max-width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   EXPOSITIONS
   ══════════════════════════════════════════════════════════════════════════════ */
.ars-expositions {
    list-style: none;
    margin: 0;
    padding: 0!important;
    width: 100%;
}

.ars-expo {
    display: grid;
    grid-template-columns: 80px 110px 1fr 160px;
    /* date | type | titre | lieu */
    gap: 0 20px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid #e0e0e0;
}

.ars-expositions li:first-child {
    border-top: 1px solid #e0e0e0;
}

.ars-expo__date {
    font-variant-numeric: tabular-nums;
    color: #888;
    white-space: nowrap;
}

.ars-expo__type {
    font-size: .85em;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.ars-expo__titre {
    font-weight: 500;
}

.ars-expo__titre a {
    color: inherit;
    text-decoration: none;
}

.ars-expo__titre a:hover {
    text-decoration: underline;
}

.ars-expo__lieu {
    color: #666;
    /* font-style: italic; */
    text-align: right;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FICHE ŒUVRE — [ars_oeuvre]
   ══════════════════════════════════════════════════════════════════════════════ */
.ars-single-wrap {
    width: 100%;
}

.ars-single-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 48px;
    align-items: start;
}

/* ── Vignette ── */
.ars-single-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    background: #f0f0f1;
    cursor: pointer;
}
.ars-single-img-wrap img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .3s ease;
}
.ars-lb-trigger:hover .ars-single-img-wrap img {
    transform: scale(1.03);
}

/* ── Infos ── */
.ars-single-titre {
    margin: 0 0 8px;
    font-size: 1.6em;
    line-height: 1.2;
}

.ars-single-meta {
    margin: 0 0 20px;
    font-size: 14px;
    color: #646970;
    letter-spacing: .03em;
}

.ars-single-description {
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.7;
    color: #1d2327;
}
.ars-single-description p { margin: 0 0 1em; }

.ars-single-note {
    border-left: 3px solid #e0e0e1;
    padding-left: 16px;
}
.ars-single-note-label {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #a7aaad;
}
.ars-single-note p {
    margin: 0 0 .8em;
    font-size: 14px;
    line-height: 1.7;
    color: #50575e;
    font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .ars-single-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}