:root {
    --bg: #0d1117;
    --panel: #121821;
    --panel-2: #1a1d22;
    --line: #2d333b;
    --text: #f1f5f9;
    --muted: #9aa6b2;
    --primary: #000000;
    --primary-soft: #1b4d3e;
    --green: #22c55e;
    --red: #d93025;
    --blue: #4ea1ff;
    --shadow: rgba(0, 0, 0, 0.2);
}

html, body {
    height: 100%;
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0; 
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background-color: #f4f6f9;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/public/images_body/terrain.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #333;
}

* {
    box-sizing: border-box;
}

.page-content {
    flex: 1 0 auto;
}

.container,
.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page {
    background: #121821;
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 30px var(--shadow);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

h1 {
    color: #000000;
    text-align: center;
    margin-bottom: 30px;
}

.page h1 {
    color: #ffffff;
    text-align: left;
    margin-bottom: 0;
}

h2 {
    color: #2c3e50;
    font-size: 1.2rem;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 8px;
    margin-top: 0;
}

.page h2 {
    color: #dfeaf6;
    border-color: rgba(255,255,255,0.08);
}

.form-card,
.table-card {
    background: #fafbfc;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.page .form-card,
.page .filters,
.page .table-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text);
}

label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    color: #555;
}

.page label {
    color: #dfeaf6;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 10px 12px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    box-sizing: border-box;
    background: #ffffff;
    color: #111111;
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
    font-size: 1rem;
}

.page input[type="text"],
.page input[type="email"],
.page input[type="password"],
.page input[type="date"],
.page select {
    background: #ffffff;
    border: 1px solid #d0d7de;
    color: #111111;
}

select,
select option {
    background: #ffffff;
    color: #111111;
}

.page select,
.page select option {
    background: #ffffff;
    color: #111111;
    border-color: #d0d7de;
    color-scheme: light;
}

button {
    background-color: #000000;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

button:hover {
    background-color: #333333;
}

.alerte,
.msg {
    background-color: #e2e3e5;
    color: #383d41;
    padding: 12px;
    border: 1px solid #d6d8db;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.msg.error {
    background: rgba(217, 48, 37, 0.12);
    color: #ff9c9c;
    border-color: rgba(217, 48, 37, 0.5);
}

.msg.success {
    background: rgba(34, 197, 94, 0.12);
    color: #7ef0ba;
    border-color: rgba(34, 197, 94, 0.5);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e4e8;
}

th {
    background-color: #000000;
    color: #ffffff;
}

.page th {
    background: rgba(17, 21, 26, 0.95);
    color: #dfeaf6;
}

tr:hover {
    background-color: #f1f1f1;
}

.page tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.page td {
    color: var(--text);
}

.site-menu {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background-color: #000000;
    color: white;
    padding: 10px 20px;
    margin-bottom: 25px;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.menu-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.menu-brand {
    font-weight: bold;
    font-size: 1.1rem;
    color: #ffffff;
}

.menu-list {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 0;
    padding: 0;
    flex: 1;
    flex-wrap: wrap;
}

.menu-list-left,
.menu-list-right {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.menu-item a {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.3s;
}

.menu-item a:hover {
    background-color: #333333;
    color: #ffffff;
}

.menu-dropdown {
    position: relative;
}

.menu-dropdown-toggle {
    background: none;
    border: none;
    color: white;
    font: inherit;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.3s;
}

.menu-dropdown-toggle:hover {
    background-color: #333333;
}

.menu-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: #1a1a1a;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    display: none;
    z-index: 1001;
}

.menu-dropdown.open .menu-dropdown-list {
    display: block;
}

.menu-dropdown-list li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    white-space: nowrap;
}

.menu-dropdown-list li a:hover {
    background-color: #333333;
}

#menu-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    padding: 0;
}

#menu-hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .menu-container {
        justify-content: space-between;
    }

    #menu-hamburger {
        display: flex;
    }

    .menu-list {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 4px;
        margin-top: 12px;
    }

    .menu-list-left,
    .menu-list-right {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 4px;
    }

    .menu-list.show {
        display: flex;
    }

    .menu-item a {
        display: block;
        padding: 10px 12px;
    }

    .menu-dropdown-toggle {
        display: block;
        width: 100%;
        text-align: left;
    }

    .menu-dropdown-list {
        position: static;
        display: none;
        box-shadow: none;
        background-color: #262626;
        padding-left: 12px;
    }

    .menu-dropdown.open .menu-dropdown-list {
        display: block;
    }
}

.badge {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(78, 161, 255, 0.12);
    color: #8ec6ff;
    border: 1px solid rgba(78, 161, 255, 0.3);
    font-size: 0.85rem;
    font-weight: 700;
}

.filters {
    background: rgba(167, 20, 20, 0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
}

.filters form {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(180deg, #2cc36b, #1ea956);
    color: white;
}

.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: #dfeaf6;
    border: 1px solid rgba(255,255,255,0.08);
}

.action-link,
.delete-link {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
}

.action-link {
    background: rgba(255,255,255,0.06);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.08);
}

.delete-link {
    margin-left: 8px;
    background: #d93025;
    color: #fff;
}

.delete-link:hover {
    filter: brightness(1.05);
}

.tag {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(78, 161, 255, 0.12);
    border: 1px solid rgba(78, 161, 255, 0.3);
    color: #8ec6ff;
    font-weight: 700;
    font-size: 0.8rem;
}

.warning {
    display: block;
    margin-top: 6px;
    color: #ff8a8a;
    font-weight: 700;
    font-size: 0.78rem;
}

.strength-meter {
    height: 6px;
    width: 100%;
    background-color: #e1e4e8;
    border-radius: 3px;
    margin-top: 5px;
    margin-bottom: 5px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-weight: bold;
}

@media (max-width: 760px) {
    body {
        padding: 12px;
    }

    .page,
    .container {
        padding: 16px;
    }

    .topbar,
    .filters form,
    .menu-container {
        display: block;
    }

    .filters form {
        width: 100%;
    }

    select,
    input,
    button {
        width: 100%;
    }

    table, thead, tbody, tr, th, td {
        display: block;
        width: 100%;
    }

    thead {
        display: none;
    }

    tbody tr {
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding: 12px 8px;
    }

    td {
        border: none;
        padding: 8px 0;
    }
}

.site-footer {
    margin-top: auto;
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 18px 20px 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    width: 100%;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
    gap: 30px;
    align-items: start;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    height: 60px;
    width: 60px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    padding: 3px;
}

.footer-brand-text h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #fff;
}

.footer-brand-text p {
    margin: 0;
    font-size: 0.8rem;
    color: #bbb;
}

.footer-col h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 6px;
}

.footer-col p {
    margin: 0 0 6px 0;
    font-size: 0.8rem;
    color: #ddd;
    line-height: 1.4;
}

.footer-copy {
    text-align: center;
    border-top: 1px solid #222;
    margin-top: 20px;
    padding-top: 15px;
    font-size: 0.8rem;
    color: #ddd;
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}