/* === Général === */
body {
    background-color: black;
    font-family: 'Roboto', sans-serif;
}

h1 {
    color: white;
    text-align: center;
    font-size: 30px;
    font-weight: 100;
}

/* === Layout principal === */
.container {
    display: flex;
    flex-direction: column;
}

.logo {
    align-self: center;
    width: 300px;
    padding: 12px;
}

/* === Barre de recherche === */
.search-bar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.filter-category {
    background: linear-gradient(145deg, #ffd700, #ff9900);
    border: 2px solid #ff4500;
    box-shadow: 0 0 10px #ff8c00, 0 0 20px #ffa500 inset;
    color: #000;
    font-size: 18px;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.filter-category:focus {
    outline: none;
    box-shadow: 0 0 15px #ffcc00, 0 0 30px #ff9900 inset;
    transform: scale(1.05);
}

/* === Liens externes === */
.source-link {
    display: block;
    margin: 30px auto 10px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    background-color: #ff4500;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    width: fit-content;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}

.source-link:hover {
    background-color: #e03d00;
}

/* === Sections & Catégories === */
.section-title {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding: 10px;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

.category-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 10px;
}

.category {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f1f1;
    color: black;
    cursor: pointer;
    padding: 12px 16px 12px 16px;
    padding-right: 44px;
    border-radius: 20px;
    font-size: 15px;
    text-align: center;
    flex: 0 0 100%;
    max-width: 80%;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
    transition: background-color 0.3s;

}


.category:hover {
    background-color: #ddd;
}

.category-new::after {
    content: 'NEW';
    font-size: 11px;
    font-weight: bold;
    background-color: #ff4081;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
    animation: badgePop 0.4s ease;
}

/* === Couleurs de catégories === */
.orange   { background-color: #f57c00; }
.green    { background-color: #388e3c; }
.yellow   { background-color: #fbc02d; color: #000; }
.cyan     { background-color: #00acc1; }
.blue     { background-color: #1976d2; }
.purple   { background-color: #7b1fa2; }
.pink     { background-color: #d81b60; }
.darkblue { background-color: #1a237e; }

/* === Favoris === */
.fav-star {
    border-radius: 60%;
    position: absolute;
    right: 30px;
    top: 50%;
    margin-right: 3px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

.fav-star.favorited {
    opacity: 1;
}

.fav-star.favorited:hover {
    opacity: 1;
}

.favorites-section {
    margin-bottom: 30px;
}

.favorites-section .section-title {
    font-size: 1.2em;
}

/* === Bouton Contact === */
.contact-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background-color: #4caf50;
    color: white;
    padding: 12px 16px;
    font-size: 14px;
    border: none;
    border-radius: 50px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.contact-button:hover {
    background-color: #43a047;
    transform: scale(1.05);
}

/* === Modale Contact === */
.modal-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 10000;
    display: none; /* Ne pas l'animer avec transition */
}

.modal-overlay.fading-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 75%;
    color: white;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
    position: relative;
}

.modal-content h2 {
    margin-top: 0;
    text-align: center;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: #2c2c2c;
    color: white;
}

.modal-content button[type="submit"] {
    background-color: #f57c00;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    width: 100%;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
}

.modal-content button:hover {
    background-color: #43a047;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
}

.contact-intro {
    font-size: 14px;
    color: #ccc;
    text-align: center;
    margin: 10px 0 20px;
    line-height: 1.5;
}

/* === Leader Icons === */

.leader-icons-wrapper {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    max-width: 100px;
    z-index: 10;
}

.leader-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    box-shadow: 0 0 4px rgba(0,0,0,0.6);
}

/* --- Bouton Info --- */
.info-btn {
    position: absolute;
    right: 6px;
    margin-left: 6px;
    top: 7px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    font-family: sans-serif;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    color: black;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    opacity: 0.6;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
}

.info-btn:hover {
    opacity: 1;
    transform: scale(1.15);
    box-shadow: 0 0 6px #ffd700, 0 0 10px #ff9900;
}

/* --- Modale Leaders spécifique --- */
.leaders-modal{
    max-width:600px;          /* un peu plus large que la modale Contact */
}
.leaders-grid{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    justify-content:center;
    margin-top:10px;
}
.leaders-grid img{
    width:64px;height:64px;
    border-radius:6px;
    box-shadow:0 0 6px rgba(0,0,0,.6);
}
.close-leaders{
    position:absolute;top:12px;right:16px;
    font-size:24px;cursor:pointer;
}


/* === Toastr Notifications === */
#toast-container > .toast {
    border-radius: 12px;
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    font-size: 15px;
    padding: 16px 20px;
    opacity: 0.95;
    border-left: 8px solid #fff;
    backdrop-filter: blur(4px);
}

#toast-container > .toast {
    background-image: none !important;
}

#toast-container > .toast-success {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    border-left-color: #c8e6c9;
}

#toast-container > .toast-error {
    background: linear-gradient(135deg, #f44336, #b71c1c);
    border-left-color: #ffcdd2;
}

#toast-container > .toast-info {
    background: linear-gradient(135deg, #2196f3, #1565c0);
    border-left-color: #bbdefb;
}

#toast-container > .toast-warning {
    background: linear-gradient(135deg, #ffeb3b, #fbc02d);
    border-left-color: #fff9c4;
    color: #000;
}

#toast-container > div {
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    animation: slideInUp 0.4s ease-out;
}

/* === Animations === */
@keyframes badgePop {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Responsive Design === */
@media (min-width: 600px) {
    .category {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

@media (min-width: 992px) {
    .category {
        flex: 0 0 calc(20% - 20px);
        max-width: calc(20% - 20px);
    }
}
