/* ============================================= */
/* GALERIE-KISS - STYLES MINIMALISTES          */
/* ============================================= */

.kiss-gallery-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-sm);
}

.kiss-gallery-empty {
    text-align: center;
    padding: var(--space-md);
    color: #666;
}

.kiss-gallery-links {
    text-align: center;
    margin-bottom: var(--space-sm);
    opacity: 0.7;
}

.kiss-gallery-links a { color: var(--primary); }
.kiss-gallery-links a + a::before { content: " | "; color: #999; }

.kiss-gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.kiss-gallery-item {
    flex: 0 0 clamp(120px, 16.66%, 220px);
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.kiss-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.kiss-gallery-trigger {
    all: unset;
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    box-sizing: border-box;
}

.kiss-gallery-item img,
.kiss-gallery-item video { width: 100%; height: 100%; object-fit: cover; }

.kiss-gallery-item[data-type="video"]::after {
    content: "▶";
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.kiss-delete-media {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(220,53,69,0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    opacity: 1;
    z-index: 10;
}

.kiss-gallery-item:hover .kiss-delete-media {
    transform: scale(1.1);
    background: rgba(220,53,69,1);
}

.kiss-gallery-filters input { position: absolute; opacity: 0; pointer-events: none; }

.kiss-gallery-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: var(--space-sm) 0;
}

.kiss-gallery-btn {
    width: 40px;
    height: 8px;
    border: 3px solid #ccc;
    background: transparent;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.15s;
}

.kiss-gallery-btn:hover { border-color: var(--primary); }
.kiss-gallery-btn.selected { background: var(--primary); border-color: var(--primary); }

.kiss-gallery-album { display: none; }
.kiss-gallery-album[data-album-index="0"] { display: block; }

.kiss-gallery-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.kiss-gallery-overlay[hidden] { display: none; }

.kiss-gallery-overlay figure {
    position: relative;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 95vh;
}

.kiss-gallery-full,
.kiss-gallery-video {
    display: none;
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
}

.kiss-gallery-full.loaded,
.kiss-gallery-video.loaded { display: block; }

.kiss-gallery-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: 1px solid #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.5rem;
}

.kiss-gallery-close:hover { background: rgba(0,0,0,0.8); }

.kiss-admin-form {
    background: #fff;
    padding: var(--space-md);
    border: 1px solid #ddd;
    margin-top: var(--space-md);
    border-radius: 8px;
    max-width: 50rem;
    margin-left: auto;
    margin-right: auto;
}

.kiss-tabs {
    display: flex;
    margin-bottom: var(--space-sm);
    border-bottom: 1px solid #ddd;
}

.kiss-tab-button {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.kiss-tab-button:hover { background: #f5f5f5; color: #333; }
.kiss-tab-button--active { color: var(--primary); font-weight: 600; border-bottom: 2px solid var(--primary); }

.kiss-form { display: none; }
.kiss-form--active { display: block; }

.kiss-form-group { margin-bottom: var(--space-xs); }
.kiss-form-group label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 0.9rem; }
.kiss-form-group small { display: block; font-size: 0.75rem; color: #666; margin-top: 4px; }

.kiss-form-group input,
.kiss-form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.kiss-form-group input:focus { border-color: var(--primary); }

.kiss-link-group { display: flex; gap: 4px; }
.kiss-link-group input { flex: 1; }

button[type="submit"] {
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

button[type="submit"]:hover { background: #5a0505; }

button[type="submit"]:disabled {
    background: #999;
    cursor: not-allowed;
    opacity: 0.8;
}

.kiss-feedback { margin-top: var(--space-xs); padding: 0.75rem; border-radius: 4px; display: none; }
.kiss-feedback--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; display: block; }
.kiss-feedback--error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; display: block; }

.kiss-delete-album {
    display: block;
    margin: var(--space-sm) auto;
    padding: 0.5rem 1rem;
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.kiss-delete-album:hover { background: #dc3545; color: #fff; }
