/* Reset & Base */
@import url('cursor.css');
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
}

#menu, #content {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    /*border-radius: 12px;*/
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    word-wrap: break-word; /* Casse les mots trop longs */
    overflow-wrap: break-word;
}

.hidden { display: none ; }

h1 {
    color: #2c3e50;
}
.filter-zone {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#searchInput {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

#searchInput:focus {
    border-color: #3498db;
}

#tagFilters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.module-count {
    margin: 10px 0 15px 0;
    padding: 8px 12px;
    /*background: #e8f4f8;
    border-left: 4px solid #3498db;*/
    background: #fce7ba;
    border-left: 4px solid #dba134;
    border-radius: 4px;
    font-size: 14px;
    color: #2c3e50;
}

.module-count .count-number {
    font-weight: bold;
    font-size: 16px;
    color: #db9334;
}

.tag-btn {
    padding: 6px 12px;
    border: 1px solid #3498db;
    background: transparent;
    color: #3498db;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.tag-btn:hover {
    background: #ebf5fb;
}

.tag-btn.active {
    background: #3498db;
    color: white;
}

.strict-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    margin-top: 5px;
}

.strict-filter input[type="checkbox"] {
    cursor: pointer;
}
#moduleList {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.module-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.module-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    border-color: #3498db;
}

.module-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.module-item .version {
    font-size: 11px;
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    color: #666;
}

.module-item .tags small {
    color: #999;
    margin-right: 5px;
    font-style: italic;
}
#module {
    box-sizing: border-box;
}
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #3498db;
}

#themeToggle {
    background: transparent;
    border: 1px solid #3498db;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

#themeToggle:hover {
    background: #ebf5fb;
}

/* --- MODE SOMBRE --- */
body.dark-mode {
    background-color: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode #menu,
body.dark-mode #content {
    background: #16213e;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

body.dark-mode h1 {
    color: #3498db;
    border-bottom-color: #4a90d9;
}

body.dark-mode h2 {
    color: #7fb3d5;
}

body.dark-mode #searchInput {
    background: #0f3460;
    border-color: #1a5fb4;
    color: #e0e0e0;
}

body.dark-mode #searchInput:focus {
    border-color: #4a90d9;
}

body.dark-mode .tag-btn {
    border-color: #4a90d9;
    color: #7fb3d5;
}

body.dark-mode .tag-btn:hover {
    background: #0f3460;
}

body.dark-mode .tag-btn.active {
    background: #4a90d9;
    color: white;
}

body.dark-mode .strict-filter {
    color: #a0a0a0;
}

body.dark-mode .module-item {
    background: #0f3460;
    border-color: #1a5fb4;
}

body.dark-mode .module-item:hover {
    border-color: #4a90d9;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

body.dark-mode .module-item .version {
    background: #1a5fb4;
    color: #ccc;
}

body.dark-mode #themeToggle {
    border-color: #4a90d9;
}

body.dark-mode #themeToggle:hover {
    background: #0f3460;
}

@media (max-width: 480px) {

#menu, #content {
    margin: 0;
}
body {
margin: 0;
}
}
