/* ==========================================
   STYLES POUR LES FAVORIS
   À ajouter dans votre fichier CSS principal
   ========================================== */

/* Bouton étoile dans le header du panel */
.favorite-star {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    transition: all 0.2s ease;
    outline: none;
    position: relative;
    border-radius: 6px;
}

.favorite-star:hover {
    transform: scale(1.15);
    background: rgba(255, 215, 0, 0.1);
}

/* Tooltip pour le bouton étoile */
.favorite-star::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 130%;
    left: 0;
    transform: translateY(-50%);
    background: #ffd700;
    color: #4b4b4b;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 10000;
    pointer-events: none;
}

.favorite-star:hover::after {
    opacity: 1;
    visibility: visible;
}

.favorite-star:not([data-tooltip]):hover::after {
    opacity: 0;
    visibility: hidden;
}

.favorite-star.is-favorite {
    color: #FFD700;
}

.favorite-star.not-favorite {
    color: #ccc;
}

.favorite-star.not-favorite:hover {
    color: #FFD700;
}

/* Animation au clic */
.favorite-star.star-clicked {
    animation: starPulse 0.3s ease;
}

@keyframes starPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.4) rotate(15deg);
    }
    100% {
        transform: scale(1);
    }
}

/* Étoile dans les tooltips Leaflet */
.leaflet-tooltip .tooltip-star {
    font-size: 16px;
    margin-left: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.leaflet-tooltip .tooltip-star:hover {
    transform: scale(1.2);
}

/* Container des toasters */
.toaster-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Toaster */
.toaster {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: auto;
    border-left: 4px solid #2196F3;
}

.toaster.show {
    opacity: 1;
    transform: translateX(0);
}

/* Types de toasters */
.toaster-success {
    border-left-color: #4CAF50;
}

.toaster-error {
    border-left-color: #f44336;
}

.toaster-warning {
    border-left-color: #ff9800;
}

.toaster-info {
    border-left-color: #2196F3;
}

/* Message du toaster */
.toaster-message {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

/* Bouton de fermeture du toaster */
.toaster-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toaster-close:hover {
    color: #333;
}

/* Onglet Favoris dans la modale Account */
.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.favorites-count {
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.favorites-count .count {
    font-weight: 700;
    color: var(--primary-color);
}

.favorites-count .limit {
    color: #999;
    font-size: 14px;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.favorite-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    cursor: pointer;
}

.favorite-item:hover {
    background: #ffffff;
    border-color: var(--primary-color);
}

.favorite-item-score {
    background: var(--primary-color);
    color: white;
    font-size: 32px;
    font-weight: bold;
    padding: 12px 16px;
    border-radius: 12px;
    min-width: 85px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.favorite-item-score span {
    font-size: 13px;
    font-weight: normal;
    opacity: 0.95;
    margin-top: 3px;
}

.favorite-item-info {
    flex: 1;
}

.favorite-item-name {
    font-size: 19px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-item-name i {
    color: var(--primary-color);
    font-size: 18px;
}

.favorite-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #666;
}

.favorite-item-detail {
    display: flex;
    align-items: center;
    gap: 4px;
}

.favorite-item-detail strong {
    color: #333;
}

.favorite-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.favorite-item-remove {
    background: transparent;
    color: #f44336;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
}

.favorite-item-remove:hover {
    color: #d32f2f;
    background: rgba(244, 67, 54, 0.1);
    transform: scale(1.1);
}

/* Pagination des favoris */
.favorites-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.pagination-button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination-button:hover:not(:disabled) {
    background: #e0e0e0;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

/* État vide */
.favorites-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.favorites-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.favorites-empty-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.favorites-empty-hint {
    font-size: 14px;
    color: #bbb;
}

/* Loading state */
.favorites-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.favorites-loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Responsive */
@media (max-width: 600px) {
    .toaster-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .toaster {
        min-width: auto;
        max-width: 100%;
    }

    .favorite-item {
        flex-wrap: wrap;
        padding: 12px;
        gap: 12px;
    }

    .favorite-item-score {
        font-size: 20px;
        padding: 8px 12px;
        min-width: 60px;
    }

    .favorite-item-score span {
        font-size: 11px;
    }

    .favorite-item-info {
        flex: 1;
        min-width: 0;
    }

    .favorite-item-name {
        font-size: 16px;
    }

    .favorite-item-name i {
        font-size: 15px;
    }

    .favorite-item-actions {
        margin-top: 8px;
        justify-content: flex-end;
    }

    .favorite-item-details {
        flex-direction: column;
        gap: 6px;
    }
}

/* ==========================================
   MODE SOMBRE
   ========================================== */

/* Toasters */
[data-theme="dark"] .toaster {
    background: #2b2b2b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .toaster-message {
    color: #e0e0e0;
}

[data-theme="dark"] .toaster-close {
    color: #999;
}

[data-theme="dark"] .toaster-close:hover {
    color: #e0e0e0;
}

/* Favoris */
[data-theme="dark"] .favorite-item {
    background: #2b2b2b;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .favorite-item:hover {
    background: #333;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .favorite-item-name {
    color: #f0f0f0;
}

[data-theme="dark"] .favorite-item-details {
    color: #aaa;
}

[data-theme="dark"] .favorite-item-detail strong {
    color: #e0e0e0;
}

[data-theme="dark"] .favorites-count {
    background: #2b2b2b;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .favorites-count .limit {
    color: #888;
}

[data-theme="dark"] .favorites-header {
    border-bottom-color: #444;
}

[data-theme="dark"] .favorites-empty {
    color: #666;
}

[data-theme="dark"] .favorites-loading {
    color: #666;
}

[data-theme="dark"] .favorites-pagination {
    border-top-color: #444;
}

[data-theme="dark"] .pagination-button {
    background: #2b2b2b;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .pagination-button:hover:not(:disabled) {
    background: #333;
}

[data-theme="dark"] .pagination-info {
    color: #aaa;
}
