@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Marcellus&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

body {
    margin: 0;
    padding: 0;
    background-color: #0d0a07;
    background-image: url('https://www.transparenttextures.com/patterns/dark-leather.png');
    color: #e0d0b5;
    font-family: Arial, sans-serif;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* CONTENT WRAPPER (Fond global sombre et contour) */
.content-wrapper {
    width: 95%;
    max-width: 1400px;
    margin: 200px auto 50px auto; 
    background: rgba(15, 12, 10, 0.75);
    border: 2px solid #5a4520; /* Contour principal */
    border-radius: 5px;
    box-shadow: 0 0 50px rgba(0,0,0,1), inset 0 0 30px rgba(0,0,0,0.8);
    padding: 30px; 
    position: relative; /* Indispensable pour positionner le logo par rapport à ce cadre */
}

/* LOGO INCRUSTE SUR LA GAUCHE (BREAKOUT) */
.hero-logo {
    position: absolute;
    top: -180px; /* Sort vers le haut */
    left: -20px; /* Aligné sur la gauche */
    z-index: 15;
    pointer-events: none;
}
.hero-logo img {
    max-width: 450px;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.9));
}

/* MAIN LAYOUT */
.main-container {
    display: flex;
    gap: 30px;
    position: relative;
    z-index: 5;
}

/* COLUMNS */
.col-left {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.col-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.col-right {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Fix Breakout Logo */
.widget-first {
    margin-top: 100px;
}

.widget-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* CPANEL STYLE ACCORDIONS (Boutons Catégories) */
.accordion-btn {
    background: linear-gradient(to bottom, #1f180d, #0a0805);
    border: 1px solid #4a3614;
    color: #d4b572;
    cursor: pointer;
    padding: 18px 20px;
    width: 100%;
    text-align: left;
    outline: none;
    font-size: 16px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    transition: 0.3s;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
    margin-bottom: 5px;
    border-radius: 3px;
}

.accordion-btn:hover, .accordion-btn.active {
    background: linear-gradient(to bottom, #302410, #171105);
    border-color: #d4b572;
    box-shadow: inset 0 0 20px rgba(212, 181, 114, 0.3);
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.accordion-btn::after {
    content: '\25BC'; /* Flèche bas */
    font-size: 13px;
    color: #a3957a;
    transition: transform 0.3s;
}

.accordion-btn.active::after {
    transform: rotate(180deg);
}

.accordion-content {
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid #3d3119;
    border-top: none;
    padding: 0 20px;
    max-height: 0; /* Fermé par défaut */
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    margin-bottom: 10px;
    border-radius: 0 0 3px 3px;
}

.accordion-content.show {
    padding: 20px;
    /* Le max-height sera géré dynamiquement par JS pour l'animation */
}

/* WIDGET STANDARD */
.widget-first {
    margin-top: 100px; /* Pousse le premier widget vers le bas pour ne pas être caché par le grand logo */
}

.widget {
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid #3d3119;
    box-shadow: inset 0 0 20px rgba(0,0,0,1), 0 5px 15px rgba(0,0,0,0.8);
}

.widget-title {
    background: linear-gradient(to right, #2a2010, #110d06);
    color: #d4b572;
    font-family: 'Cinzel', serif;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 1px solid #5a4520;
    border-top: 1px solid #5a4520;
}

.widget-content {
    padding: 15px;
}

/* SERVER STATUS WIDGET */
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #2a2010;
}

.status-row:last-child {
    border-bottom: none;
}

.status-on {
    color: #4CAF50;
    font-weight: bold;
    text-shadow: 0 0 5px #4CAF50;
}

.status-off {
    color: #F44336;
    font-weight: bold;
    text-shadow: 0 0 5px #F44336;
}

/* TOP PLAYERS WIDGET */
.top-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}

.top-list li span:first-child {
    color: #fff;
}

.top-list li span:last-child {
    color: #d4b572;
}

/* RIGHT COLUMN (CONTENT / NEWS / FORMS) */
.content-box {
    background: rgba(15, 12, 10, 0.85);
    border: 1px solid #4a3a1f;
    box-shadow: inset 0 0 30px rgba(0,0,0,1), 0 5px 20px rgba(0,0,0,0.9);
    position: relative;
}

.content-box::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border: 1px solid rgba(212, 181, 114, 0.2);
    pointer-events: none;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #1f180d, #0a0805);
    border-bottom: 1px solid #755a29;
    padding: 12px 20px;
}

.content-header h3 {
    margin: 0;
    color: #e5ce98;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    letter-spacing: 1px;
}

.content-body {
    padding: 20px;
}

/* FORMS (ADMIN PANEL SPECIFIC) */
.form-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    border-bottom: 1px dashed rgba(117, 90, 41, 0.3);
}

.form-group:last-child {
    border-bottom: none;
}

.form-group label {
    font-size: 13px;
    font-weight: bold;
    color: #d4b572;
    flex: 1;
    min-width: 150px;
}

/* CTA BUTTONS */
.cta-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}
.btn-cta {
    display: inline-block;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    color: #fff;
    background: linear-gradient(to bottom, #5a1010, #2c0505);
    border: 2px solid #801818;
    border-radius: 3px;
    transition: all 0.3s ease;
}
.btn-cta:hover {
    background: linear-gradient(to bottom, #801818, #5a1010);
    transform: scale(1.05);
}
.btn-cta-gold {
    background: linear-gradient(to bottom, #8c7341, #3d3119);
    border: 2px solid #d4b572;
    color: #fff;
}
.btn-cta-gold:hover {
    background: linear-gradient(to bottom, #d4b572, #8c7341);
}

/* RATES BADGES */
.rates-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #5a4520;
    padding: 15px;
    margin: 20px 0;
}
.rate-badge {
    text-align: center;
}
.rate-val {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #d4b572;
    text-shadow: 0 0 10px rgba(212, 181, 114, 0.5);
}
.rate-label {
    display: block;
    font-size: 12px;
    color: #a3957a;
    text-transform: uppercase;
    margin-top: 5px;
}

/* DASHBOARD & WIKI */
.table-dark {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.table-dark th {
    background: rgba(90, 69, 32, 0.5);
    color: #d4b572;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #5a4520;
}
.table-dark td {
    padding: 10px;
    border-bottom: 1px solid #3d3119;
    color: #ccc;
}
.table-dark tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}
.char-online { color: #4CAF50; font-weight: bold; }
.char-offline { color: #f44336; font-weight: bold; }

/* GUIDE SECTIONS */
.guide-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #5a4520;
}
.guide-section h4 {
    color: #d4b572;
    margin-top: 0;
    font-size: 18px;
}
.guide-section ul {
    list-style-type: square;
    color: #a3957a;
    margin-left: 20px;
}
.guide-section li {
    margin-bottom: 8px;
}

.input-container {
    flex: 1;
    text-align: right;
}

input[type="text"], input[type="number"], select {
    background: #050505;
    border: 1px solid #5a4520;
    color: #fff;
    padding: 8px 12px;
    font-family: inherit;
    width: 250px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.8);
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #d4b572;
}

/* BUTTONS */
.btn-gold {
    display: inline-block;
    background: linear-gradient(to bottom, #8a6c32, #473615);
    border: 1px solid #d4b572;
    color: #fff;
    padding: 10px 25px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s;
}

.btn-gold:hover {
    background: linear-gradient(to bottom, #a68440, #5c471d);
    text-shadow: 0 0 5px #fff;
    box-shadow: 0 0 15px rgba(212, 181, 114, 0.4);
}

.submit-wrap {
    text-align: right;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #3d3119;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 20px;
    color: #5a4520;
    font-size: 12px;
    margin-top: auto; /* Pousse le footer tout en bas grâce au flex column du body */
    border-top: 1px solid #1a1510;
}

/* MODAL DE CONFIRMATION */
.alert-msg {
    position: absolute;
    top: 45px;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    border-radius: 3px;
    z-index: 50;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: none; /* Masqué par défaut */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background: #0d0a07;
    border: 2px solid #803838;
    box-shadow: 0 0 50px rgba(128, 56, 56, 0.4);
    padding: 30px;
    border-radius: 5px;
    width: 500px;
    max-width: 90%;
}

.modal-title {
    color: #f44336;
    font-family: 'Cinzel', serif;
    font-size: 20px;
    margin-top: 0;
    text-align: center;
    border-bottom: 1px solid #451c1c;
    padding-bottom: 15px;
}

.modal-diff-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    background: #050505;
    border: 1px solid #1a1510;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
}

.modal-diff-list li {
    margin-bottom: 8px;
    font-size: 14px;
    border-bottom: 1px solid #111;
    padding-bottom: 5px;
}

.modal-diff-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-warning {
    color: #e0d0b5;
    font-size: 13px;
    text-align: center;
    margin-bottom: 20px;
    background: rgba(244, 67, 54, 0.1);
    padding: 10px;
    border-radius: 3px;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.modal-actions button {
    flex: 1;
}

/* NEWS ENTRY (PUBLIC SITE) */
.news-entry {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed rgba(117, 90, 41, 0.3);
}

.news-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-icon {
    width: 40px;
    height: 40px;
    background: url('https://i.imgur.com/8QeJ8gN.png') no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

.news-content h4 {
    margin: 0 0 5px 0;
    color: #e5ce98;
    font-size: 16px;
}

.news-content p {
    margin: 0;
    line-height: 1.5;
    color: #a3957a;
}

/* TOGGLE BUTTONS (UI/UX ADMIN PANEL) */
.toggle-group {
    display: inline-flex;
    gap: 0;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #5a4520;
}

.toggle-group input[type="radio"] {
    display: none;
}

.toggle-group label {
    padding: 8px 25px;
    background: #050505;
    color: #a3957a;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s;
    margin: 0;
    border: none;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.8);
}

.toggle-group input[type="radio"]:checked + label {
    background: linear-gradient(to bottom, #8a6c32, #473615);
    color: #fff;
    text-shadow: 0 0 5px #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 0 15px rgba(212, 181, 114, 0.4);
}

/* FOOTER */
.footer {
    background: #050505;
    border-top: 1px solid #3d3119;
    color: #8a7a5a;
    text-align: center;
    padding: 20px;
    font-size: 12px;
    line-height: 1.6;
    margin-top: auto;
    box-sizing: border-box;
    width: 100%;
}
