/* ═══════════════════════════════════════════════════════════════════
   AMXBans default2k26 — Nostalgic 2026 Refresh
   Classic colors. Modern comfort. Same soul.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Custom Properties (original palette preserved) ── */
:root {
	--bg-body: #111111;
	--bg-card: #181818;
	--bg-elevated: #1a1a1a;
	--bg-gradient: linear-gradient(180deg, #1f1f1f 0%, #151515 100%);
	--border: #333333;
	--border-light: #444444;

	--text-primary: #e0e0e0;
	--text-secondary: #aaaaaa;
	--text-amber: #e74c3c;
	--text-gold: #ffffff;
	--text-white: #ffffff;

	--accent: #e74c3c;
	--accent-hover: #c0392b;
	--success: #27ae60;
	--success-bg: linear-gradient(180deg, #27ae60, #1e8449);
	--error: #e74c3c;
	--error-bg: linear-gradient(180deg, #8b2020, #5a1515);
	--warning: #f39c12;

	--radius-sm: 4px;
	--radius-md: 6px;
	--radius-lg: 8px;

	--font-main: 'Inter', 'Segoe UI', Tahoma, Geneva, sans-serif;
	--font-mono: 'Cascadia Code', 'Fira Code', Consolas, monospace;
	--font-size: 14px;

	--transition: all 0.15s ease;
}

/* ── Reset ── */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
del,
em,
img,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
tr,
th,
td,
textarea,
input,
select {
	margin: 0;
	padding: 0;
	border: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	font-family: inherit;
	vertical-align: baseline;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

caption,
th,
td {
	text-align: left;
	font-weight: normal;
}

table,
td,
th {
	vertical-align: middle;
}

a img {
	border: none;
}

:focus {
	outline: 0;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* ── Base ── */
html {
	height: 100%;
}

body {
	background: var(--bg-body);
	color: var(--text-primary);
	font: var(--font-size) var(--font-main);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--text-white);
	font-weight: 600;
	line-height: 1.2;
	margin-bottom: 0.3em;
}

h1 {
	font-size: 24px;
	font-weight: 700;
	text-shadow: 0 0 12px rgba(227, 204, 154, 0.3);
	cursor: pointer;
}

h2 {
	font-size: 1.6em;
}

h3 {
	font-size: 1.3em;
}

h4 {
	font-size: 1.15em;
	font-weight: 700;
}

h5 {
	font-size: 1.05em;
	font-weight: 700;
}

h6 {
	font-size: 1em;
	font-weight: 700;
}

/* ── Links ── */
a {
	color: var(--accent);
	text-decoration: none;
	transition: var(--transition);
}

a:hover,
a:focus {
	color: var(--accent-hover);
}

/* ── Text elements ── */
p {
	margin-bottom: 1em;
}

strong,
dfn {
	font-weight: bold;
}

pre,
code,
tt {
	font: 0.95em var(--font-mono);
	line-height: 1.5;
}

/* ── Lists ── */
li ul,
li ol {
	margin-left: 1.5em;
}

ul,
ol {
	margin: 0 0 1.5em 1.5em;
}

ul {
	list-style-type: disc;
}

ol {
	list-style-type: decimal;
}

ul.plain-list li,
ul.nice-list li,
ul.tabbed li {
	list-style: none;
}

ul.tabbed {
	display: inline;
	margin: 0;
}

ul.tabbed li {
	float: left;
}

ul.plain-list {
	margin: 0;
}

ul.nice-list {
	margin-left: 0;
}

ul.nice-list li {
	list-style: none;
	border-top: 1px solid var(--border);
	padding: 6px 0;
	font-size: 11px;
}

ul.nice-list li:first-child {
	border-top: none;
}

ul.nice-list li .right {
	color: var(--text-secondary);
}

/* ── Tables ── */
table {
	margin-bottom: 1.4em;
	width: 100%;
}

th {
	font-weight: bold;
}

th,
td,
caption {
	padding: 5px 10px 5px 6px;
}

tfoot {
	font-style: italic;
}

.admin_list tr {
	border-bottom: solid 1px var(--border);
}

/* ── Messages ── */
.error,
.notice,
.success {
	border-radius: var(--radius-md);
	margin-bottom: 1em;
	padding: 8px 14px;
	font-weight: 600;
	font-size: 11px;
	border: 1px solid;
}

.error {
	background: var(--error-bg);
	color: #ffaaaa;
	border-color: #662222;
	text-shadow: 0 0 6px rgba(204, 51, 51, 0.4);
}

.notice {
	background: linear-gradient(180deg, #5a4a20, #3d3315);
	color: #f0dbb0;
	border-color: #665520;
}

.success {
	background: #177C17;
	color: #ffffff;
	border: 1px solid #0d510d;
	border-radius: 6px;
	font-size: 14px;
	padding: 12px 18px;
	margin-bottom: 20px;
}

/* ── Forms ── */
label {
	font-weight: bold;
	cursor: pointer;
}

fieldset {
	padding: 1.2em;
	margin: 0 0 1.5em 0;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
}

legend {
	font-weight: bold;
	font-size: 1.1em;
	color: var(--text-secondary);
	padding: 0 6px;
}

textarea {
	overflow: auto;
}

input.text,
textarea,
select,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"] {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text-primary);
	margin: 0.4em 0;
	padding: 6px 8px;
	font-family: var(--font-main);
	font-size: inherit;
	transition: var(--transition);
}

input.text:focus,
textarea:focus,
select:focus,
input[type="text"]:focus,
input[type="password"]:focus {
	background: #2f2f2f;
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(227, 204, 154, 0.15);
}

select {
	background: var(--bg-elevated);
	color: var(--text-primary);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 4px 6px;
}

input.button,
button,
input[type="submit"] {
	background: var(--accent);
	border: 1px solid var(--accent);
	border-radius: var(--radius-sm);
	color: var(--text-white);
	padding: 4px 12px;
	cursor: pointer;
	font-weight: 600;
	font-size: inherit;
	font-family: var(--font-main);
	transition: var(--transition);
}

input.button:hover,
button:hover,
input[type="submit"]:hover {
	background: var(--accent-hover);
	border-color: var(--accent-hover);
	color: var(--text-white);
}

input.button:active,
button:active,
input[type="submit"]:active {
	transform: translateY(1px);
}

button:disabled,
input[type="submit"]:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.biginput {
	font-size: 160%;
	text-align: center;
	height: 36px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-elevated);
	color: var(--text-primary);
}

/* ── Alignment & Floats ── */
.center,
.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.left,
.alignleft {
	float: left;
}

.right,
.alignright {
	float: right;
}

.clear,
.clearer {
	clear: both;
}

.clearer {
	display: block;
	font-size: 0;
	line-height: 0;
	height: 0;
}

.text-left {
	text-align: left;
}

.text-right {
	text-align: right;
}

.text-center {
	text-align: center;
}

.text-separator {
	padding: 0 5px;
}

/* ── Misc text ── */
.small {
	font-size: 0.9em;
}

.smaller {
	font-size: 0.8em;
}

.smallest {
	font-size: 0.7em;
}

.large {
	font-size: 1.15em;
}

.larger {
	font-size: 1.25em;
}

.largest {
	font-size: 1.35em;
}

.hidden {
	display: none;
}

.quiet {
	color: var(--text-secondary);
}

.highlight {
	background: rgba(227, 204, 154, 0.2);
	color: var(--text-amber);
}

.smallfont {
	font-size: 10px;
}

.fat {
	font-weight: bold;
	color: var(--accent);
}

td.b {
	font-weight: bold;
}

.errored {
	font-weight: bold;
	color: var(--error);
}

/* ═════════════════════════════════
   LAYOUT
   ═════════════════════════════════ */

.center-wrapper {
	margin: 0 auto;
	width: 95%;
	max-width: 1600px;
}

.spacer {
	height: 16px;
}

.img_input {
	border: none;
	outline: none;
}

/* ── Network Bar (Top Navigation) - Custom Screen Layout ── */
#top-header {
	padding: 20px 0;
	margin-bottom: 20px;
}

.header-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.login-container {
	margin-top: 5px;
}

.login-inputs {
	display: flex;
	gap: 15px;
	margin-bottom: 8px;
}

.login-inputs input {
	background: #161616 !important;
	border: 1px solid #2a2a2a !important;
	padding: 10px 12px !important;
	color: #fff !important;
	border-radius: 3px !important;
	width: 200px;
}

.login-inputs input:focus {
	border-color: #555 !important;
	box-shadow: none !important;
}

.btn-login {
	width: 100%;
	background: #e74c3c !important;
	color: #fff !important;
	padding: 10px !important;
	border: none !important;
	border-radius: 3px !important;
	font-weight: bold;
	text-transform: uppercase;
	transition: background 0.2s;
}

.btn-login:hover {
	background: #c0392b !important;
}

.logged-in-panel {
	display: flex;
	gap: 10px;
}

#main-nav-bar {
	margin-bottom: 25px;
}

.nav-card {
	background: #131313;
	border: 1px solid #1f1f1f;
	border-radius: 6px;
	padding: 18px 0;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.main-menu-centered {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 30px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-menu-centered li a {
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.2s;
}

.main-menu-centered li a:hover {
	color: var(--accent);
}

.social-trap {
	display: flex;
	justify-content: center;
	gap: 15px;
	background: #151515;
	width: max-content;
	margin: 0 auto;
	padding: 10px 30px;
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
	border: 1px solid #1f1f1f;
	border-top: none;
	clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
}

.social-icon {
	color: #fff;
	font-size: 16px;
	cursor: pointer;
	opacity: 0.8;
	transition: opacity 0.2s;
}

.social-icon:hover {
	opacity: 1;
}

/* ── Admin Navigation ── */
#navigation {
	margin-bottom: 20px;
}

#navigation a {
	display: block;
	text-decoration: none;
}

#main-nav a {
	color: var(--text-secondary);
	font-size: 1.3em;
	padding: 10px 14px;
	transition: var(--transition);
}

#main-nav li {
	border-left: 1px solid var(--border);
}

#main-nav li:first-child {
	border-left: none;
}

#main-nav li.current-tab a,
#main-nav a:hover {
	color: var(--text-white);
}

#sub-nav {
	background: var(--bg-gradient);
	font: bold 10pt var(--font-main);
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	color: var(--accent);
	border-radius: var(--radius-sm);
}

#sub-nav a {
	color: var(--accent);
	font: bold 1.1em var(--font-main);
	padding: 8px 12px;
	transition: var(--transition);
}

#sub-nav li a:hover {
	background: rgba(255, 255, 255, 0.08);
}

/* ── Main Content ── */
.main {
	margin-bottom: 18px;
}

.main#main-two-columns .sidebar {
	width: 260px;
}

.main#main-two-columns #main-left {
	width: 70%;
}

.sidebar a {
	text-decoration: none;
}

.sidebar a:hover {
	text-decoration: underline;
}

/* ── Table Rows ── */
tr.title {
	background: #151515;
	font: bold 14px var(--font-main);
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	color: var(--text-white);
}

tr.title td {
	padding: 15px 10px;
}

.main thead th {
	padding: 10px;
	background: #111111;
	color: #fff;
	font-weight: 600;
	border-bottom: 1px solid var(--border);
}

.list {
	border-bottom: 1px solid var(--border);
	transition: var(--transition);
	background: #1a1a1a;
}

.list td {
	padding: 12px 10px;
	border-left: 1px solid #222;
	border-right: 1px solid #222;
}

.list:hover {
	background: #222222;
}

.info {
	border-bottom: 1px solid var(--border);
}

tr.settings_line {
	background-color: transparent;
	border-bottom: 1px solid var(--border);
}

tr.htable,
tr.htabletop,
tr.htablebottom {
	background: var(--bg-elevated);
	font: 11px var(--font-main);
	font-weight: bold;
}

tr.htable {
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

tr.htabletop {
	border-top: 1px solid var(--border);
}

tr.htablebottom {
	border-bottom: 1px solid var(--border);
}

/* ── Section Panels (Sidebar) ── */
.section {
	margin-bottom: 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.section-title {
	background: var(--bg-gradient);
	font: bold 10pt var(--font-main);
	border-bottom: 1px solid var(--border);
	color: var(--accent);
	margin: 0;
	padding: 6px 10px;
	overflow: hidden;
	clear: left;
}

.section-content {
	padding: 6px 10px;
}

/* ── Server Info ── */
td.server-info {
	padding: 12px 24px;
}

td.server-info table {
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding-left: 5px;
}

/* ── Mouse over effects ── */
.m_over {
	background-color: var(--bg-elevated);
	color: var(--text-amber);
	cursor: pointer;
}

.m_out {
	background-color: transparent;
	color: var(--text-primary);
	cursor: pointer;
}

.offline {
	background: rgba(204, 51, 51, 0.15);
	color: #ffaaaa;
}

.vtop {
	vertical-align: top;
}

.details {
	width: 100%;
	text-align: left;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: var(--bg-card);
}

.details tr.title {
	background: #111111;
}

.details tr.title td {
	font-weight: 700;
	font-size: 15px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--border);
}

.details td {
	padding: 14px 20px;
}

._right {
	text-align: right;
}

._left {
	text-align: left;
}

._center {
	text-align: center;
}

td.enter {
	width: 5%;
}

/* ── RCON Box ── */
.rcon_box {
	color: #00ff00;
	background: #0a0a0a;
	padding: 8px;
	font-family: var(--font-mono);
	font-size: 11px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}

/* ── Icon sprites ── */
.icons-stats {
	display: inline-block;
	background-image: url('../../../images/stats.png');
	background-repeat: no-repeat;
	width: 16px;
	height: 16px;
	margin: 0;
}

.icon-stats {
	background-position: 0 0;
}

.icon-clock {
	background-position: -16px 0;
}

.icon-kicks {
	background-position: -32px 0;
}

.icons-func {
	display: inline-block;
	background-image: url('../../../images/functions.png');
	background-repeat: no-repeat;
	width: 15px;
	height: 17px;
	cursor: pointer;
	margin: 0;
}

/* ── Footer ── */
#footer {
	padding: 10px 0;
}

#footer a {
	color: var(--accent);
	text-decoration: none;
}

#footer .right,
#footer .right a {
	color: var(--text-secondary);
	text-decoration: none;
}

#footer .text-separator {
	padding: 0 3px;
	color: var(--border);
}

#footer a:hover {
	color: var(--accent-hover);
}

/* ── Borders override ── */
.noborder {
	border: 0;
}

.notborder {
	border-top: 0;
}

.norborder {
	border-right: 0;
}

.nobborder {
	border-bottom: 0;
}

.nolborder {
	border-left: 0;
}

/* ── Margin override ── */
.nomargin {
	margin: 0;
}

.notmargin {
	margin-top: 0;
}

.normargin {
	margin-right: 0;
}

.nobmargin {
	margin-bottom: 0;
}

.nolmargin {
	margin-left: 0;
}

/* ── Padding override ── */
.nopadding {
	padding: 0;
}

.notpadding {
	padding-top: 0;
}

.norpadding {
	padding-right: 0;
}

.nobpadding {
	padding-bottom: 0;
}

.nolpadding {
	padding-left: 0;
}

/* ═════════════════════════════════
   SMOOTH SCROLLBAR (Webkit)
   ═════════════════════════════════ */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--text-secondary);
}

/* ═════════════════════════════════
   SUBTLE ANIMATIONS
   ═════════════════════════════════ */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}

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

.main,
#navigation,
.section {
	animation: fadeIn 0.2s ease;
}

/* ── 2026 Badge ── */
.badge-2k26 {
	display: inline-block;
	background: linear-gradient(135deg, var(--accent), var(--accent-hover));
	color: #ffffff;
	font-size: 9px;
	font-weight: 800;
	padding: 1px 6px;
	border-radius: 3px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	vertical-align: middle;
	margin-left: 4px;
}

/* ── Custom Full-Width Footer ── */
#footer-red {
	background: #111111;
	border-top: 1px solid #1f1f1f;
	padding: 25px 0;
	margin-top: 50px;
	width: 100%;
}

.footer-content {
	font-size: 13px;
	color: #999;
}

.footer-content a,
.footer-content strong {
	color: #fff;
	text-decoration: none;
}

.footer-content a:hover {
	color: var(--accent);
}
/* Icônes sociales */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0 4px;
    color: #7770c9;
    font-size: 18px;
    transition: color .2s ease, transform .2s ease;
}

.social-icon:hover {
    color: #ef4b3f;
    transform: translateY(-2px);
}

/* Icônes du tableau des serveurs */
.server-icon-header,
.server-icon {
    text-align: center;
    width: 48px;
    font-size: 18px;
}

.server-icon-header i {
    color: #ef4b3f;
    font-size: 16px;
}

.server-icon i {
    color: #c9c9c9;
    font-size: 19px;
}

.server-icon.vac-icon i {
    color: #ef4b3f;
}

.server-icon:hover i,
.server-icon-header:hover i {
    color: #ffffff;
}

/* =====================================================
   Palette rouge AMXBans unifiée
   ===================================================== */

:root {
    --theme-red: #ef4b3f;
    --theme-red-dark: #c0392b;
    --theme-red-light: #ff6257;
}

/* Liens */
a,
a:visited {
    color: var(--theme-red);
}

a:hover {
    color: var(--theme-red-light);
}

/* Boutons et boutons administrateur */
button,
input[type="submit"],
input[type="button"],
.button,
.btn,
.btn-login,
input[name="submit"] {
    background-color: var(--theme-red) !important;
    border-color: var(--theme-red) !important;
    color: #ffffff !important;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.button:hover,
.btn:hover,
.btn-login:hover {
    background-color: var(--theme-red-dark) !important;
    border-color: var(--theme-red-dark) !important;
}

/* Titres, sections et éléments importants */
.section-title,
.title,
h1,
h2,
h3,
h4 {
    border-color: var(--theme-red);
}

.section-title,
.section-title a {
    color: var(--theme-red);
}

/* Remplacement visuel des classes souvent utilisées pour le vert */
.success,
.ok,
.online,
.active,
.valid,
.green,
.status-online,
.text-success {
    color: var(--theme-red) !important;
    border-color: var(--theme-red) !important;
}

.bg-success,
.bg-green,
.badge-success {
    background-color: var(--theme-red) !important;
}

/* Icônes */
.server-icon.vac-icon i,
.server-icon-header i,
.social-icon:hover {
    color: var(--theme-red) !important;
}

/* Message d'information : remplacement du vert par le rouge du thème */
.success,
.ok,
.info,
.notice,
.message,
.alert,
.warning,
.error,
#message,
#notice,
#info {
    background: #8f1515 !important;
    background-color: #8f1515 !important;
    border-color: #ef4b3f !important;
    color: #ffffff !important;
}

.success *,
.ok *,
.info *,
.notice *,
.message *,
.alert *,
.warning *,
.error *,
#message *,
#notice *,
#info * {
    color: #ffffff !important;
}

/* =====================================================
   Tous les boutons : rouge AMXBans
   ===================================================== */

button,
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="file"],
.button,
.btn,
.btn-login,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-default,
a.button,
a.btn,
.action,
.admin-button,
input[name="submit"],
input[value="Enregistrer"],
input[value="Sauvegarder"],
input[value="Save"] {
    background: transparent !important;
    background-color: #ef4b3f !important;
    border: 1px solid #ef4b3f !important;
    color: #ffffff !important;
    border-radius: 3px;
    box-shadow: none !important;
    text-shadow: none !important;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
.button:hover,
.btn:hover,
.btn-login:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-info:hover,
.btn-default:hover,
a.button:hover,
a.btn:hover,
.action:hover,
.admin-button:hover {
    background: rgba(239, 75, 63, 0.15) !important;
    background-color: #c9362e !important;
    border-color: #c9362e !important;
    color: #ffffff !important;
    cursor: pointer;
}

/* Boutons désactivés */
button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled,
.btn:disabled {
    background: #66332f !important;
    border-color: #66332f !important;
    color: #c9c9c9 !important;
    cursor: not-allowed;
    opacity: .7;
}

/* Liens d'action qui ressemblent à des boutons */
a[class*="button"],
a[class*="btn"],
a[class*="action"] {
    background: transparent !important;
    border-color: #ef4b3f !important;
    color: #ffffff !important;
}

a[class*="button"]:hover,
a[class*="btn"]:hover,
a[class*="action"]:hover {
    background: rgba(239, 75, 63, 0.15) !important;
    border-color: #c9362e !important;
    color: #ffffff !important;
}

/* Logo centré dans l'en-tête */
#top-header .center-wrapper.header-flex {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

#top-header .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

#top-header .logo-container img {
    display: block;
    max-width: 620px;
    max-height: 170px;
    width: auto;
    height: auto;
}

#top-header .login-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Adaptation mobile */
@media screen and (max-width: 800px) {
    #top-header .center-wrapper.header-flex {
        flex-direction: column;
        min-height: auto;
        padding: 20px 10px;
    }

    #top-header .logo-container img {
        max-width: 90%;
        max-height: 130px;
    }

    #top-header .login-container {
        position: static;
        transform: none;
        margin-top: 15px;
        width: 100%;
    }
}

/* Logo central agrandi */
#top-header .center-wrapper.header-flex {
    min-height: 190px !important;
    justify-content: center !important;
}

#top-header .logo-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
    width: auto;
}

#top-header .logo-container img {
    display: block;
    width: auto;
    max-width: 900px !important;
    max-height: 190px !important;
    height: auto;
}

/* Les boutons de connexion restent à droite uniquement quand on n'est pas connecté */
#top-header .login-container {
    right: 0;
}

/* Lien Section administrateur dans la barre */
#main-nav-bar a[href="admin.php"] {
    color: #ffffff !important;
    background: transparent !important;
    border: 1px solid #ef4b3f !important;
    border-radius: 3px;
    padding: 6px 9px;
}

#main-nav-bar a[href="admin.php"]:hover {
    background: rgba(239, 75, 63, 0.15) !important;
    border-color: #c9362e !important;
}

/* Logo central agrandi */
#top-header .center-wrapper.header-flex {
    min-height: 190px !important;
    justify-content: center !important;
}

#top-header .logo-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
    width: auto;
}

#top-header .logo-container img {
    display: block;
    width: auto;
    max-width: 900px !important;
    max-height: 190px !important;
    height: auto;
}

/* Les boutons de connexion restent à droite uniquement quand on n'est pas connecté */
#top-header .login-container {
    right: 0;
}

/* Lien Section administrateur dans la barre */
#main-nav-bar a[href="admin.php"] {
    color: #ffffff !important;
    background: transparent !important;
    border: 1px solid #ef4b3f !important;
    border-radius: 3px;
    padding: 6px 9px;
}

#main-nav-bar a[href="admin.php"]:hover {
    background: rgba(239, 75, 63, 0.15) !important;
    border-color: #c9362e !important;
}

/* Masquer la barre des icônes sociales */
#main-nav-bar .social-trap {
    display: none !important;
}

/* Correction du chevauchement logo / formulaire déconnecté */
#top-header {
    position: relative;
}

#top-header .center-wrapper.header-flex {
    position: relative;
    min-height: 190px;
}

/* Logo centré sans dépasser la zone disponible */
#top-header .logo-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    max-width: calc(100% - 500px);
}

#top-header .logo-container img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 180px;
    height: auto;
}

/* Formulaire de connexion placé au-dessus du logo */
#top-header .login-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 415px;
}

/* Écrans moyens et mobiles : logo au-dessus, connexion en dessous */
@media screen and (max-width: 1000px) {
    #top-header .center-wrapper.header-flex {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: auto;
        padding: 20px 10px;
    }

    #top-header .logo-container {
        position: static;
        transform: none;
        max-width: 100%;
        order: 1;
        margin: 0 auto 20px !important;
    }

    #top-header .logo-container img {
        max-width: min(90vw, 650px);
        max-height: 150px;
    }

    #top-header .login-container {
        position: static;
        transform: none;
        order: 2;
        width: min(100%, 415px);
        margin: 0 auto;
    }
}

/* Très petits écrans */
@media screen and (max-width: 600px) {
    #top-header .center-wrapper.header-flex {
        padding: 15px 10px 25px;
    }

    #top-header .logo-container img {
        max-width: 90vw;
        max-height: 120px;
    }

    #top-header .login-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #top-header .login-inputs {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    #top-header .login-inputs input,
    #top-header .btn-login {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Correction définitive : éviter le chevauchement du logo et du formulaire */
@media screen and (max-width: 1400px) {
    #top-header .center-wrapper.header-flex {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: auto !important;
        padding: 15px 10px 25px !important;
    }

    #top-header .logo-container {
        position: static !important;
        transform: none !important;
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 20px !important;
        text-align: center !important;
    }

    #top-header .logo-container img {
        display: inline-block !important;
        width: auto !important;
        max-width: 75vw !important;
        max-height: 160px !important;
        height: auto !important;
    }

    #top-header .login-container {
        position: static !important;
        order: 2 !important;
        transform: none !important;
        width: min(100%, 415px) !important;
        margin: 0 auto !important;
    }
}

/* Sur les très grands écrans, le logo reste centré à gauche du formulaire */
@media screen and (min-width: 1401px) {
    #top-header .logo-container img {
        max-width: 650px !important;
        max-height: 160px !important;
    }

    #top-header .logo-container {
        max-width: calc(100% - 470px) !important;
    }
}

/* Logo central agrandi */
#top-header .center-wrapper.header-flex {
    min-height: 190px !important;
    justify-content: center !important;
}

#top-header .logo-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
    width: auto;
}

#top-header .logo-container img {
    display: block;
    width: auto;
    max-width: 900px !important;
    max-height: 190px !important;
    height: auto;
}

/* Les boutons de connexion restent à droite uniquement quand on n'est pas connecté */
#top-header .login-container {
    right: 0;
}

/* Lien Section administrateur dans la barre */
#main-nav-bar a[href="admin.php"] {
    color: #ffffff !important;
    background: transparent !important;
    border: 1px solid #ef4b3f !important;
    border-radius: 3px;
    padding: 6px 9px;
}

#main-nav-bar a[href="admin.php"]:hover {
    background: rgba(239, 75, 63, 0.15) !important;
    border-color: #c9362e !important;
}

/* =====================================================
   Administration : fond sombre au lieu du rouge
   ===================================================== */

/* Lignes des tableaux d'administration */
#site table tr.info,
#site table tr.info td,
#site table tr.admin,
#site table tr.admin td {
    background: #1b1b1b !important;
    background-color: #1b1b1b !important;
    color: #eeeeee !important;
    border-color: #333333 !important;
}

/* Lignes de titre des tableaux admin */
#site table tr.title,
#site table tr.title td,
#site table tr.title th {
    background: #141414 !important;
    background-color: #141414 !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

/* Séparation entre les lignes */
#site table tr.info td,
#site table tr.admin td {
    border-bottom: 1px solid #333333 !important;
}

/* Valeurs et liens dans les tableaux */
#site table tr.info a,
#site table tr.admin a {
    color: #ef4b3f !important;
}

#site table tr.info a:hover,
#site table tr.admin a:hover {
    color: #ff6257 !important;
}

/* =====================================================
   Encadré IP compact placé à gauche du menu
   ===================================================== */

#main-nav-bar {
    position: relative;
}

/* La barre IP reste dans le flux mais devient compacte */
.ip-notice {
    position: absolute !important;
    z-index: 20;
    left: 35px;
    top: 29px;
    width: auto !important;
    max-width: 330px;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    background: #8f1515 !important;
    border: 1px solid #ef4b3f !important;
    color: #ffffff !important;
    font-size: 12px !important;
    line-height: 18px !important;
    white-space: nowrap;
}

/* Le texte à l'intérieur */
.ip-notice span {
    color: #ffffff !important;
    font-size: 12px !important;
    text-shadow: none !important;
}

/* Évite que la grande ancienne hauteur soit conservée */
.ip-notice + * {
    margin-top: 0;
}

/* Petit écran */
@media screen and (max-width: 900px) {
    .ip-notice {
        position: relative !important;
        left: auto;
        top: auto;
        display: block;
        width: calc(100% - 30px) !important;
        max-width: none;
        margin: 10px auto !important;
        white-space: normal;
        text-align: center;
    }
}

/* Encadré IP dans la barre de navigation, à gauche */
#main-nav-bar .main-menu-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

#main-nav-bar .ip-nav-item {
    list-style: none;
    margin-right: 8px;
}

#main-nav-bar .ip-nav-notice {
    display: inline-block;
    padding: 8px 11px;
    background: #8f1515;
    border: 1px solid #ef4b3f;
    border-radius: 4px;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    line-height: 18px;
    white-space: nowrap;
}

/* Sur petit écran, l'encart revient à la ligne */
@media screen and (max-width: 950px) {
    #main-nav-bar .main-menu-centered {
        flex-wrap: wrap;
        gap: 12px;
    }

    #main-nav-bar .ip-nav-item {
        flex-basis: 100%;
        text-align: center;
        margin-right: 0;
    }

    #main-nav-bar .ip-nav-notice {
        white-space: normal;
    }
}

/* Barre de navigation alignée à gauche */
#main-nav-bar .main-menu-centered {
    justify-content: flex-start !important;
    padding-left: 4px !important;
    gap: 24px !important;
}

#main-nav-bar .ip-nav-item {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

/* Encadré IP indépendant, à gauche de la barre */
#main-nav-bar .nav-card {
    position: relative !important;
}

/* On retire l'encart IP du positionnement du menu */
#main-nav-bar .main-menu-centered .ip-nav-item {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Le menu reprend son centrage d'origine */
#main-nav-bar .main-menu-centered {
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 24px !important;
    padding-left: 0 !important;
}

/* Taille de l'encart IP */
#main-nav-bar .ip-nav-notice {
    display: inline-block !important;
    padding: 8px 11px !important;
    background: #8f1515 !important;
    border: 1px solid #ef4b3f !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: bold !important;
    line-height: 18px !important;
    white-space: nowrap !important;
}

/* Sur petit écran, on évite le chevauchement */
@media screen and (max-width: 900px) {
    #main-nav-bar .main-menu-centered {
        flex-wrap: wrap !important;
        padding: 10px !important;
    }

    #main-nav-bar .main-menu-centered .ip-nav-item {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        text-align: left !important;
        margin-bottom: 8px !important;
    }
}

/* Boutons assortis à l'encadré IP */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.button,
.btn,
.btn-login,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-default,
a.button,
a.btn,
.action,
.admin-button {
    background: #8f1515 !important;
    background-color: #8f1515 !important;
    border: 1px solid #ef4b3f !important;
    color: #ffffff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Survol des boutons */
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
.button:hover,
.btn:hover,
.btn-login:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-info:hover,
.btn-default:hover,
a.button:hover,
a.btn:hover,
.action:hover,
.admin-button:hover {
    background: #a51b1b !important;
    background-color: #a51b1b !important;
    border-color: #ef4b3f !important;
    color: #ffffff !important;
}

/* Encadré IP : même teinte */
#main-nav-bar .ip-nav-notice {
    background: #8f1515 !important;
    background-color: #8f1515 !important;
    border: 1px solid #ef4b3f !important;
    color: #ffffff !important;
}

/* IP non bannie : vert */
#main-nav-bar .ip-nav-notice.ip-clear {
    display: inline-block;
    background: #20b85a !important;
    background-color: #20b85a !important;
    border: 1px solid #55df88 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* IP bannie : rouge */
#main-nav-bar .ip-nav-notice.ip-banned {
    display: inline-block;
    background: #8f1515 !important;
    background-color: #8f1515 !important;
    border: 1px solid #ef4b3f !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Survol du lien lorsque l'IP est bannie */
#main-nav-bar .ip-nav-notice.ip-banned:hover {
    background: #a51b1b !important;
    color: #ffffff !important;
}

/* IP non bannie : vert */
#main-nav-bar .ip-nav-notice.ip-clear {
    display: inline-block;
    background: #20b85a !important;
    border: 1px solid #55df88 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* IP bannie : rouge */
#main-nav-bar .ip-nav-notice.ip-banned {
    display: inline-block;
    background: #8f1515 !important;
    border: 1px solid #ef4b3f !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

#main-nav-bar .ip-nav-notice.ip-banned:hover {
    background: #a51b1b !important;
    color: #ffffff !important;
}
