* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e6ed;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    color: #ffd700;
    font-size: 2.5em;
    text-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
    font-weight: 300;
}

.legend {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 30px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.1);
    overflow: hidden;
}

.legend-header {
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legend-header:hover {
    background: rgba(255, 215, 0, 0.1);
}

.legend h3 {
    color: #ffd700;
    font-size: 1.4em;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    font-weight: 500;
    margin: 0;
}

.legend-toggle {
    color: #ffd700;
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.legend-toggle.open {
    transform: rotate(180deg);
}

.legend-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}

.legend-content.open {
    max-height: 1000px;
    opacity: 1;
    padding: 25px 25px 25px 25px;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.legend-item:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

.legend-stars {
    margin-right: 20px;
    min-width: 130px;
    color: #ffd700;
    text-shadow: 0 0 0px rgba(255, 215, 0, 0.6);
    font-size: 1.3em;
    display: flex;
    align-items: center;
}

.legend-description {
    font-size: 1em;
    line-height: 1.4;
    color: #e0e6ed;
    font-weight: 500;
}

@media (max-width: 768px) {
    .legend-grid {
        grid-template-columns: 1fr;
    }
    
    .legend-item {
        padding: 12px 16px;
    }
    
    .legend-stars {
        font-size: 1.2em;
        min-width: 110px;
        margin-right: 15px;
    }
}

.rating-section {
    margin-bottom: 40px;
}

.rating-title {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1));
    border-radius: 12px;
    border: 2px solid #ffd700;
    
}

.rating-title-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-title h2 {
    color: #ffd700;
    margin-left: 15px;
    font-weight: 500;
    
}

.rating-description {
    font-size: 0.9em;
    color: #ffd700;
    font-style: italic;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(255, 215, 0, 0.2);
    opacity: 0.9;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.work-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 250px; /* Ajoutez cette ligne pour définir la hauteur */
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
}

.work-card::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #4ecdc4, #45b7d1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover::before {
    opacity: 1;
}

.work-card.highlight {
    animation: highlightPulse 2s ease-in-out;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

@keyframes highlightPulse {
    0%, 100% { 
        border-color: #ffd700; 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); 
    }
    50% { 
        border-color: #ff6b6b; 
        box-shadow: 0 0 30px rgba(255, 107, 107, 0.6); 
    }
}

.work-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
}


@keyframes textGlow {
    0% { text-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    100% { text-shadow: 0 0 15px rgba(255, 107, 107, 0.8); }
}

/* Remplacez le CSS des étoiles par celui-ci */

.stars {
    display: flex;
    margin-bottom: 10px;
}

.star {
    font-size: 1.2em;
    margin-right: 2px;
    transition: all 0.2s ease;
    position: relative;
}

.star.filled {
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700,
}

.star.half {
    color: #555; /* Couleur de base (étoile vide) */
    position: relative;
}

.star.half::before {
    content: "★";
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.star.empty {
    color: #555;
    text-shadow: 0 0 2px #000;
}

/* Alternative plus compatible si la première version ne fonctionne pas */
.star.half-alt {
    background: linear-gradient(90deg, #ffd700 50%, #555 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Fallback pour les navigateurs qui ne supportent pas background-clip */
}

/* Fallback pour les navigateurs sans support de background-clip */
@supports not (-webkit-background-clip: text) {
    .star.half-alt {
        color: #ffd700;
        position: relative;
    }
    
    .star.half-alt::after {
        content: "★";
        position: absolute;
        left: 50%;
        top: 0;
        width: 50%;
        overflow: hidden;
        color: #555;
    }
}

.star.empty {
    color: #555;
}

.progress {
    color: #a0a0a0;
    font-size: 0.9em;
    margin-bottom: 8px;
    min-height: 1.2em;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.finished {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
}

.status.finished::after {
    content: "Terminé";
}

.status.ongoing {
    background: linear-gradient(45deg, #ffd700, #ffb347);
    color: white;
}

.status.upcoming {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.filter-container {
    margin-bottom: 30px;
    text-align: center;
}

.filter-btn {
    display: inline-block;
    margin: 0 10px 10px 0;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #e0e6ed;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(45deg, #ffd700, #ffb347);
    color: #333;
    transform: translateY(-2px);
}

/* Styles de la barre de recherche */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    opacity: 0;
    transform: translateY(-20px);
    animation: slideInDown 0.8s ease-out 0.3s forwards;
}

@keyframes slideInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-input-container {
    position: relative;
    overflow: hidden;
    border-radius: 25px;
}

.search-input {
    width: 300px;
    padding: 12px 20px;
    font-size: 1em;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #e0e6ed;
    outline: none;
    transition: all 0.4s ease;
}

.search-input::placeholder {
    color: rgba(224, 230, 237, 0.6);
    font-style: italic;
}

.search-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.15);
}

.search-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left 0.6s ease;
    border-radius: 25px;
}

.search-input:focus + .search-input-container::before,
.search-input-container:hover::before {
    left: 100%;
}

.search-btn {
    padding: 12px 24px;
    font-size: 1em;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #ffd700, #ffb347);
    color: #333;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    background: linear-gradient(45deg, #ffb347, #ffd700);
}

.search-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.search-btn:active::before {
    width: 300px;
    height: 300px;
}

.search-results-info {
    margin: 10px 0;
    padding: 10px 20px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    text-align: center;
    font-size: 0.9em;
    color: #ffd700;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
}

.search-results-info.show {
    opacity: 1;
    transform: translateY(0);
}

.clear-search-btn {
    padding: 8px 16px;
    font-size: 0.85em;
    border: 1px solid rgba(255, 107, 107, 0.5);
    border-radius: 20px;
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.clear-search-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2em;
    }

    .search-input {
        width: 250px;
    }

    .search-container {
        flex-direction: column;
        gap: 10px;
    }
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
}

.stat-label {
    font-size: 0.8em;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* Styles pour améliorer la lisibilité sur les images */
.work-title,
.progress,
.status,
.stars {
    color: #fff; /* Texte blanc */
    text-shadow: 
        -1px -1px 0 #000000,  
         2px 2px 4px rgba(0, 0, 0, 0.6); /* Ajout d'une ombre douce */
}



/* ombre mots doré notation */

.rating-title-header h2,
.rating-description {
    text-shadow: 
    -1px  -1px 0 #000;
}
/* Remplacez votre CSS des filtres par celui-ci */

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.filter-btn {
    position: relative;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e6ed;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-btn.active {
    background: linear-gradient(45deg, #ffd700, #ffb347);
    color: #333;
    transform: translateY(-2px);
}

.filter-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

/* Boutons d'étoiles spéciaux */
.filter-btn.star-filter {
    width: 120px;
    padding: 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stars-display {
    display: flex;
    gap: 2px;
    font-size: 18px;
}

.star-full {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.star-half {
    position: relative;
    color: #555;
}

.star-half::before {
    content: "★";
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.star-empty {
    color: #555;
    text-shadow: -1px -1px 0 #000;
}

/* Animation pour les étoiles actives */
.filter-btn.active .star-full,
.filter-btn.active .star-half::before {
    animation: starGlow 1.5s ease-in-out infinite alternate;
}

@keyframes starGlow {
    0% { text-shadow: 0 0 8px rgba(255, 215, 0, 0.6); }
    100% { text-shadow: 0 0 15px rgba(255, 215, 0, 1); }
}
/* Supprime le rectangle bleu par défaut et le remplace par un surlignage arrondi */
.filter-btn:focus,
.filter-btn:active {
    outline: none; /* retire le focus par défaut */
    -webkit-tap-highlight-color: transparent; /* iOS/Android */
    box-shadow: inset 0 0 0 1000px rgba(255, 215, 0, 0.2); /* bleu contenu dans l’ovale */
    border-radius: 25px; /* même rayon que le bouton */
}
.work-card[onclick] { cursor: pointer; }
