
/* ===========================
   RESET SIMPLE
   =========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f5f5f5;
    color: #222;
}

/* Liens */
a {
    color: #1976d2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===========================
   HEADER + NAV
   =========================== */
header {
    background: #222;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}

nav.admin-nav a {
    color: #fff;
    margin-left: 15px;
    font-size: 14px;
}

nav.admin-nav a:hover {
    text-decoration: underline;
}

/* ===========================
   LAYOUT ADMIN
   =========================== */
.container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Titres */
h1, h2, h3 {
    margin-bottom: 10px;
    font-weight: 500;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 20px;
    margin-top: 20px;
}

h3 {
    font-size: 18px;
    margin-top: 15px;
}

/* Texte secondaire */
.small {
    font-size: 12px;
    color: #777;
}

/* ===========================
   CARTES (DASHBOARD, PANELS, ETC.)
   =========================== */
.cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.card {
    background: #fff;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    flex: 1 1 240px;
}

.card h2 {
    margin-top: 0;
    font-size: 18px;
    margin-bottom: 10px;
}

/* ===========================
   TABLES
   =========================== */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    margin-top: 10px;
}

th, td {
    padding: 8px 10px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

th {
    background: #f0f0f0;
    text-align: left;
    font-weight: 500;
}

tr:last-child td {
    border-bottom: none;
}

/* Badges état */
.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #fff;
    font-weight: 500;
}

.badge-ok {
    background: #2e7d32;
}

.badge-off {
    background: #c62828;
}

/* Exemples d'URL / codes */
.url-example {
    font-family: Consolas, "Courier New", monospace;
    background: #eee;
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 12px;
}

/* ===========================
   FORMULAIRES
   =========================== */
form {
    margin-top: 10px;
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 1px rgba(25,118,210,0.2);
}

/* Checkbox / radio inline */
input[type="checkbox"],
input[type="radio"] {
    margin-right: 5px;
}

/* Boutons */
button,
.btn {
    display: inline-block;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: #1976d2;
    color: #fff;
    font-weight: 500;
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

button:hover,
.btn:hover {
    background: #1565c0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-secondary {
    background: #555;
}

.btn-secondary:hover {
    background: #444;
}

/* Messages d'erreur / succès */
.alert {
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.alert-error {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
}

.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

/* ===========================
   PAGE DE LOGIN
   =========================== */
body.login-body {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrapper {
    width: 100%;
    max-width: 360px;
    padding: 20px;
}

.auth-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px 20px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.auth-card h1 {
    font-size: 20px;
    margin-bottom: 15px;
    text-align: center;
}

.auth-card p.subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
}

.auth-card form {
    margin-top: 10px;
}

.auth-card button {
    width: 100%;
    margin-top: 5px;
}

.auth-footer {
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    color: #eee;
}

/* ===========================
   UTILITAIRES
   =========================== */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: #777; font-size: 13px; }
