/* ==========================================================================
   ART.CSS - Styles pour la page d'accueil Art et ses composants
   ========================================================================== */

/* --------------------------------------------------------------------------
   Structure principale de la page Art
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

   .container {
    width: 60%;
    margin: 0 auto;
    padding: 20px;
}

/* --------------------------------------------------------------------------
   Section héro
   -------------------------------------------------------------------------- */
.hero {
    height: 300px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("/media/art_hero.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    margin-bottom: 20px;
    border-radius: 8px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   Navigation de section
   -------------------------------------------------------------------------- */
.section-nav {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.section-nav ul {
    display: flex;
    list-style: none;
    gap: 10px;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.section-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.3s;
    font-weight: bold;
}

.section-nav a:hover,
.section-nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: white;
}

.section-footer {
    margin-top: 15px;
    text-align: center;
}

.section-link {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
}

.section-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Section Musique
   -------------------------------------------------------------------------- */
.music-highlight {
    display: flex;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.music-cover {
    width: 200px;
    height: 200px;
    position: relative;
    flex-shrink: 0;
}

.music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.music-info {
    padding: 15px;
    flex-grow: 1;
}

.music-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.music-meta {
    color: #aaa;
    margin-bottom: 15px;
}

.music-description {
    color: #ddd;
    margin-bottom: 10px;
    line-height: 1.5;
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.music-card {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.music-card:hover {
    transform: translateY(-5px);
}

.music-card-cover {
    height: 180px;
    position: relative;
}

.music-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-card-info {
    padding: 15px;
}

.music-card-info h4 {
    margin-bottom: 5px;
}

.music-card-meta {
    color: #aaa;
    font-size: 0.9rem;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
}

.music-cover:hover .play-button,
.music-card-cover:hover .play-button,
.video-thumbnail:hover .play-button {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Section Photos
   -------------------------------------------------------------------------- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.photo-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    border-radius: 8px;
}

.photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-sizing: border-box;
}

.photo-card:hover .photo-info {
    transform: translateY(0);
}

.photo-info h4 {
    margin: 0 0 5px 0;
}

.photo-meta {
    color: #aaa;
    font-size: 0.9rem;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Section Vidéos
   -------------------------------------------------------------------------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.video-card {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    height: 180px;
    position: relative;
    background-color: #111;
    border-radius: 10px 10px 0px 0px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    padding: 15px;
}

.video-info h4 {
    margin-bottom: 5px;
}

.video-meta {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.video-description {
    color: #ddd;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* GALLERY CSS START */
.gallery-container {
    position: absolute;
    padding: 1rem;
    width: 80%;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.2);
    /*backdrop-filter: blur(1px);*/
    border-radius: 20px;
    overflow-y: auto;
    top: 15%;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Media Toggle */
.media-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 0.3rem;
    gap: 0.3rem;
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.toggle-btn img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.toggle-btn.active {
    background: rgba(255, 255, 255, 0.1);
}

.toggle-btn.active img {
    opacity: 1;
}

/* Upload Buttons */
.upload-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn img {
    width: 20px;
    height: 20px;
}

/* Collection Sections */
.gallery-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.collection-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.collection-header {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.collection-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.collection-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    opacity: 0.7;
}

.collection-section.expanded .toggle-icon {
    transform: rotate(180deg);
}

.collection-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.collection-section.expanded .collection-content {
    max-height: 100000px; /* Large value to accommodate any content */
}

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.collection-section.expanded .media-grid {
    opacity: 1;
    transform: translateY(0);
}

/* Media Items */
.media-item {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.media-item:hover {
    transform: scale(1.05) translateY(-5px);
}

.media-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.media-wrapper img,
.media-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 0 0 10px 10px;
}

.item-info h3 {
    margin: 0;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #ccc;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.collection-content.loading .media-grid {
    opacity: 0.5;
    pointer-events: none;
}

.loading-indicator {
    display: none;
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.collection-content.loading .loading-indicator {
    display: block;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    transition: opacity 0.3s ease;
}

.gallery-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Loader */
.loader {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
    display: none;
}

.loader.visible {
    display: block;
}

/* Add smooth transitions for media items */
.media-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.3s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* GALLERY CSS END */

/* --------------------------------------------------------------------------
   État vide
   -------------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    color: #aaa;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .container {
        width: 80%;
    }
}

@media (max-width: 992px) {
    .container {
        width: 90%;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .music-highlight {
        flex-direction: column;
    }
    
    .music-cover {
        width: 100%;
        height: 200px;
    }
    
    .photo-grid, 
    .video-grid, 
    .music-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .photo-grid, 
    .video-grid, 
    .music-grid {
        grid-template-columns: 1fr;
    }
    
    .section-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .hero {
        height: 200px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
}
