/* Frontend styling for Galerie Accordéon Spéciale */

:root {
    --gas-primary-blue: #00A3E0;
    --gas-dark-blue: #00A3E0;
    --gas-light-blue: #e0f7fa;
    --gas-text-color: #333;
    --gas-border-color: #e0e0e0;
    --gas-bg-color: #ffffff;
    --gas-font-family: 'Outfit', sans-serif;
}

.gas-gallery-wrapper {
    font-family: var(--gas-font-family);
    max-width: 10000px;
    margin: 20px 0;
    color: var(--gas-text-color);
}

/* Search Bar */
.gas-search-container {
    position: relative;
    margin-bottom: 30px;
}

.gas-search-input {
    width: 100%;
    padding: 15px 45px 15px 20px;
    border: 1px solid var(--gas-border-color);
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.gas-search-input:focus {
    outline: none;
    border-color: var(--gas-primary-blue);
    box-shadow: 0 4px 15px rgba(0,86,179,0.1);
}

.gas-search-container .dashicons-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Accordion Hierarchical */
.gas-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gas-folder-item {
    background: var(--gas-bg-color);
    border: 1px solid var(--gas-border-color);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gas-folder-item[open] {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.gas-folder-header {
    display: flex;
    align-items: center;
    padding: 0;
    cursor: pointer;
    list-style: none; /* Hide default arrow */
    position: relative;
    min-height: 50px;
    background: #fff;
    user-select: none;
}

.gas-folder-header::-webkit-details-marker {
    display: none;
}

.gas-folder-left-bar {
    width: 30px;
    align-self: stretch;
    background: var(--gas-primary-blue);
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.gas-folder-left-bar .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.gas-folder-title {
    flex-grow: 1;
    font-weight: 600;
    font-size: 18px;
    color: var(--gas-dark-blue);
}

/* Custom Plus/Minus Toggle */
.gas-folder-toggle {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gas-plus-minus {
    position: relative;
    width: 20px;
    height: 2px;
    background: var(--gas-primary-blue);
    transition: transform 0.3s ease;
}

.gas-plus-minus::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 20px;
    background: var(--gas-primary-blue);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.gas-folder-item[open] > .gas-folder-header .gas-plus-minus::after {
    opacity: 0;
}

/* Indentation for nested items */
.gas-folder-item.level-1 { margin-left: 20px; }
.gas-folder-item.level-2 { margin-left: 40px; }
.gas-folder-item.level-3 { margin-left: 60px; }

/* Content Animation */
.gas-folder-content {
    padding: 15px 15px 15px 25px;
    border-top: 1px solid #f5f5f5;
    animation: gas-slide-down 0.3s ease-out;
}

@keyframes gas-slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Files Table */
.gas-files-table {
    width: 100%;
    border-collapse: collapse;
}

.gas-file-row {
    border: none;
    transition: background 0.2s ease;
}

.gas-file-row:hover {
    background: #f8f9fa;
}

.gas-file-row td {
    padding: 10px 15px;
    vertical-align: middle;
}

.gas-file-icon {
    width: 40px;
}

.gas-file-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.gas-file-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.gas-icon-pdf { color: #f44336; }
.gas-icon-word { color: #2196f3; }
.gas-icon-excel { color: #4caf50; }
.gas-icon-powerpoint { color: #ff9800; }
.gas-icon-archive { color: #607d8b; }
.gas-icon-script { color: #9c27b0; }

.gas-file-info {
    flex-grow: 1;
}

.gas-file-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.gas-file-legend {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

.gas-file-actions {
    text-align: right;
    width: 50px;
}

.gas-download-btn {
    color: var(--gas-primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.gas-download-btn:hover {
    color: var(--gas-dark-blue);
}

/* Lightbox Simple Style */
#gas-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    cursor: zoom-out;
}

#gas-lightbox img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.gas-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}
