/* Styles spécifiques à la page Wiki */
.wiki-main {
    padding: 100px 0 50px;
    background-color: var(--prison-dark);
    min-height: 100vh;
}

.wiki-header {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 30px;
    text-align: center;
}

.wiki-header h1 {
    font-size: 3rem;
    color: var(--prison-orange);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
    background-color: var(--prison-darker);
    color: var(--prison-light);
}

.search-bar button {
    padding: 0 25px;
    background-color: var(--prison-orange);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #d35400;
}

.wiki-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    gap: 40px;
}

.wiki-sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    height: calc(100vh - 150px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 30px;
    background-color: var(--prison-darker);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.sidebar-section h3 {
    color: var(--prison-orange);
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(231, 126, 34, 0.3);
    padding-bottom: 10px;
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-link {
    display: block;
    padding: 10px 0;
    color: var(--prison-gray);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    padding-left: 20px;
}

.sidebar-link::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--prison-orange);
    opacity: 0;
    transition: all 0.3s;
}

.sidebar-link:hover {
    color: var(--prison-light);
    padding-left: 25px;
}

.sidebar-link:hover::before {
    opacity: 1;
    left: 5px;
}

.sidebar-link.active {
    color: var(--prison-orange);
    font-weight: bold;
}

.update-card {
    background-color: rgba(44, 62, 80, 0.5);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.update-date {
    font-size: 0.8rem;
    color: var(--prison-orange);
    display: block;
    margin-bottom: 5px;
}

.update-card p {
    color: var(--prison-light);
    font-size: 0.9rem;
}

.wiki-content {
    flex: 1;
}

.wiki-section {
    margin-bottom: 50px;
    background-color: var(--prison-darker);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.wiki-section h2 {
    color: var(--prison-orange);
    margin-bottom: 30px;
    font-size: 1.8rem;
    border-bottom: 1px solid rgba(231, 126, 34, 0.3);
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-card {
    background-color: rgba(44, 62, 80, 0.7);
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid var(--prison-orange);
}

.info-card h3 {
    color: var(--prison-light);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-card p, .info-card li {
    color: var(--prison-gray);
    line-height: 1.7;
    margin-bottom: 10px;
}

.info-card ul {
    padding-left: 20px;
}

.controls-table {
    width: 100%;
    border-collapse: collapse;
}

.controls-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(149, 165, 166, 0.2);
    color: var(--prison-gray);
}

.controls-table kbd {
    background-color: var(--prison-dark);
    padding: 3px 6px;
    border-radius: 3px;
    font-family: monospace;
    display: inline-block;
    margin-right: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background-color: rgba(44, 62, 80, 0.5);
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.stat-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background-color: var(--prison-orange);
    color: white;
}

.stat-item h4 {
    color: var(--prison-light);
    margin-bottom: 5px;
}

.stat-item p {
    color: var(--prison-gray);
    font-size: 0.9rem;
}

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

.rule-card {
    background-color: rgba(44, 62, 80, 0.7);
    padding: 20px;
    border-radius: 10px;
    border-top: 5px solid var(--prison-orange);
}

.rule-card.important {
    border-top-color: var(--prison-red);
    grid-column: 1 / -1;
}

.rule-card.warning {
    border-top-color: #f39c12;
}

.rule-card h3 {
    color: var(--prison-light);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.rule-card ol, .rule-card ul {
    padding-left: 20px;
    color: var(--prison-gray);
    line-height: 1.7;
}

.tabs-container {
    background-color: rgba(44, 62, 80, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid rgba(231, 126, 34, 0.3);
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    color: var(--prison-gray);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    text-align: center;
}

.tab-btn:hover {
    color: var(--prison-light);
    background-color: rgba(231, 126, 34, 0.1);
}

.tab-btn.active {
    color: var(--prison-orange);
    border-bottom: 3px solid var(--prison-orange);
}

.tabs-content {
    padding: 20px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

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

.role-card {
    background-color: rgba(44, 62, 80, 0.7);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

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

.role-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background-color: var(--prison-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.role-card h4 {
    color: var(--prison-light);
    margin-bottom: 10px;
}

.role-card p {
    color: var(--prison-gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.difficulty {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.difficulty.easy {
    background-color: #2ecc71;
    color: white;
}

.difficulty.medium {
    background-color: #f39c12;
    color: white;
}

.difficulty.hard {
    background-color: #e74c3c;
    color: white;
}

.wiki-help {
    text-align: center;
    padding: 40px;
    background-color: var(--prison-darker);
    border-radius: 10px;
    margin-top: 50px;
}

.wiki-help h2 {
    color: var(--prison-orange);
    margin-bottom: 20px;
    border: none;
}

.wiki-help p {
    color: var(--prison-gray);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-discord {
    background-color: #7289da;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-discord:hover {
    background-color: #677bc4;
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 992px) {
    .wiki-container {
        flex-direction: column;
    }
    
    .wiki-sidebar {
        position: static;
        height: auto;
        flex: 1;
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 0 50%;
    }
}

@media (max-width: 576px) {
    .stats-grid, .rules-container, .roles-grid {
        grid-template-columns: 1fr;
    }
    
    .wiki-header h1 {
        font-size: 2rem;
    }
    
    .wiki-section {
        padding: 20px;
    }
}

/* Styles pour les règles RP */
.rp-accordion {
    border-radius: 10px;
    overflow: hidden;
}

.rp-rule {
    margin-bottom: 10px;
    background-color: rgba(44, 62, 80, 0.7);
}

.rp-rule-header {
    width: 100%;
    padding: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--prison-darker);
    border: none;
    color: var(--prison-light);
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid rgba(231, 126, 34, 0.1);
}

.rp-rule-header:hover {
    background-color: rgba(231, 126, 34, 0.1);
}

.rp-rule-header h3 {
    margin: 0;
    flex: 1;
    font-size: 1.2rem;
}

.rp-rule-header i {
    transition: transform 0.3s;
}

.rp-rule-header.active i {
    transform: rotate(180deg);
}

.rp-rule-tag {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.rp-rule-tag.important {
    background-color: var(--prison-red);
}

.rp-rule-tag.warning {
    background-color: #f39c12;
}

.rp-rule-tag.info {
    background-color: var(--prison-blue);
}

.rp-rule-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
    background-color: rgba(26, 37, 47, 0.5);
}

.rp-rule-content.open {
    padding: 20px;
    max-height: 1000px;
}

.rp-rule-content p {
    margin-bottom: 15px;
    color: var(--prison-gray);
}

.rp-rule-examples {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.example {
    flex: 1;
    padding: 15px;
    border-radius: 5px;
}

.example h5 {
    margin-top: 0;
    font-size: 1rem;
}

.example.good {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 3px solid #2ecc71;
}

.example.bad {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
}

.rp-rule-sanctions {
    background-color: rgba(243, 156, 18, 0.1);
    padding: 15px;
    border-radius: 5px;
    border-left: 3px solid #f39c12;
}

/* Styles pour la recherche */
.search-results {
    background-color: var(--prison-darker);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.search-results h3 {
    color: var(--prison-orange);
    margin-top: 0;
}

.result-item {
    padding: 15px;
    margin-bottom: 10px;
    background-color: rgba(44, 62, 80, 0.5);
    border-radius: 5px;
    border-left: 3px solid var(--prison-orange);
}

.result-item h4 {
    margin-top: 0;
    color: var(--prison-light);
}

.result-item p {
    color: var(--prison-gray);
    margin-bottom: 0;
}

.highlight {
    background-color: rgba(231, 126, 34, 0.3);
    font-weight: bold;
}

/* Styles améliorés pour les rôles */
.role-card {
    position: relative;
    background-color: rgba(44, 62, 80, 0.7);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
    border: 1px solid rgba(231, 126, 34, 0.1);
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: rgba(231, 126, 34, 0.3);
}

.role-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    background-color: var(--prison-orange);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

.role-icon.guard {
    background-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.role-icon.warden {
    background-color: #9b59b6;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

.role-icon.medic {
    background-color: #2ecc71;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.role-icon.psychologist {
    background-color: #1abc9c;
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.4);
}

.role-icon.gang-leader {
    background-color: #e74c3c;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.role-icon.gang-member {
    background-color: #e67e22;
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

.role-desc {
    min-height: 180px;
}

.role-desc p {
    color: var(--prison-light);
    margin-bottom: 10px;
}

.role-desc ul {
    padding-left: 20px;
    color: var(--prison-gray);
    font-size: 0.9rem;
}

.role-desc li {
    margin-bottom: 5px;
}

.role-desc strong {
    color: var(--prison-light);
}

/* Masquage pendant la recherche */
.wiki-main.search-active > *:not(.wiki-header):not(.wiki-container) {
    display: none !important;
}

.wiki-main.search-active .wiki-container > *:not(#rp-rules) {
    display: none !important;
}

.wiki-main.search-active .wiki-container #rp-rules .rp-rule {
    display: none !important;
}

.wiki-main.search-active .wiki-container #rp-rules .rp-rule.matched {
    display: block !important;
}

/* Message pour aucune règle trouvée */
.no-results {
    padding: 15px;
    background-color: rgba(44, 62, 80, 0.5);
    border-radius: 5px;
    color: var(--prison-gray);
    text-align: center;
    margin: 20px 0;
}

/* Styles pour l’accordéon (déjà existants, mais vérifiés) */
.rp-accordion {
    border-radius: 10px;
    overflow: hidden;
}

.rp-rule {
    margin-bottom: 10px;
    background-color: rgba(44, 62, 80, 0.7);
}

.rp-rule-header {
    width: 100%;
    padding: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--prison-dark);
    border: none;
    color: var(--prison-light);
    cursor: pointer;
    transition: background-color 0.3s;
    border-bottom: 1px solid rgba(231, 126, 34, 0.1);
}

.rp-rule-header:hover {
    background-color: rgba(231, 126, 34, 0.1);
}

.rp-rule-header h3 {
    margin: 0;
    flex: 1;
    font-size: 1.2rem;
}

.rp-rule-header i {
    transition: transform 0.3s;
}

.rp-rule-header.active i {
    transform: rotate(180deg);
}

.rp-rule-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
    background-color: rgba(26, 37, 47, 0.5);
}

.rp-rule-content.open {
    padding: 20px;
    max-height: 1000px;
}

.search-results-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 30px;
    display: none; /* Caché par défaut */
}

.search-result-summary {
    background-color: var(--prison-darker);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: var(--prison-light);
}

.search-result-item {
    background-color: rgba(44, 62, 80, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 3px solid var(--prison-orange);
}

.search-result-item h4 {
    color: var(--prison-orange);
    margin-top: 0;
}

.search-result-item p {
    color: var(--prison-gray);
    margin-bottom: 0;
}

.rp-highlight {
    background-color: rgba(231, 126, 34, 0.3);
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 3px;
}

.search-results-top-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px 20px;
    display: none;
}

.search-result-summary {
    background-color: var(--prison-darker);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    color: var(--prison-light);
    font-weight: bold;
}

.search-result-top-item {
    background-color: rgba(44, 62, 80, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 3px solid var(--prison-orange);
}

.search-result-top-item h4 {
    color: var(--prison-orange);
    margin-top: 0;
    margin-bottom: 10px;
}

.search-result-top-item p {
    color: var(--prison-gray);
    margin-bottom: 15px;
}

.no-results {
    padding: 15px;
    background-color: rgba(44, 62, 80, 0.5);
    border-radius: 5px;
    color: var(--prison-gray);
    text-align: center;
}

/* Style minimaliste pour les résultats */
.search-result-summary-mini {
    color: var(--prison-orange);
    font-weight: bold;
    padding: 10px 15px;
    background-color: rgba(44, 62, 80, 0.7);
    border-radius: 5px;
    margin-bottom: 10px;
}

.search-result-mini {
    margin-bottom: 5px;
}

.mini-result-link {
    display: block;
    padding: 8px 15px;
    background-color: rgba(231, 126, 34, 0.1);
    border-radius: 5px;
    color: var(--prison-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.mini-result-link:hover {
    background-color: rgba(231, 126, 34, 0.3);
    transform: translateX(5px);
}

.mini-result-link i {
    margin-left: 5px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.mini-result-link:hover i {
    transform: translateX(3px);
}

.no-results-mini {
    color: var(--prison-gray);
    padding: 10px 15px;
    font-size: 0.9rem;
}

.search-results-mini-container {
    max-width: 600px;
    margin: 10px auto 0;
    padding: 0 15px;
    display: none;
}