/* ============================================================
   AMH Sport — Interface d'administration
   ============================================================ */

:root {
  --or:      #B8960C;
  --or-c:    #D4AE20;
  --or-f:    #8A6F08;
  --vert:    #3DB882;
  --vert-c:  #4ECF95;
  --vert-f:  #2A9068;
  --fond:    #1A2E24;
  --sidebar-w: 230px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; background: #f0f2f0; color: #222; }
a { color: inherit; text-decoration: none; }

/* LOGIN */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--fond); }
.login-box { background: #fff; border-radius: 10px; padding: 40px 36px; width: 360px; box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .lnm { font-size: 28px; font-weight: 700; color: var(--fond); }
.login-logo .lsp { font-size: 14px; color: var(--vert); letter-spacing: 2px; margin-left: 3px; }
.login-logo p { font-size: 12px; color: #888; margin-top: 4px; }
.login-box label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.login-box input { width: 100%; border: 1px solid #ddd; border-radius: 5px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; transition: border-color 0.2s; }
.login-box input:focus { outline: none; border-color: var(--vert); }
.login-box .btn-login { width: 100%; background: var(--fond); color: #fff; border: none; padding: 12px; border-radius: 5px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.login-box .btn-login:hover { background: var(--vert); }
.login-err { background: #fdecea; border: 1px solid #e74c3c; color: #c0392b; padding: 10px 12px; border-radius: 5px; margin-bottom: 16px; font-size: 13px; }

/* LAYOUT ADMIN */
.admin-wrap { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); background: var(--fond);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 10;
}
.sidebar-logo { padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-logo .snm { font-size: 18px; font-weight: 700; color: #fff; }
.sidebar-logo .ssp { font-size: 11px; color: var(--vert); letter-spacing: 2px; }
.sidebar-logo .sadmin { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 3px; }
.sidebar nav { flex: 1; padding: 16px 10px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.75);
  padding: 10px 12px; border-radius: 6px;
  font-size: 13px; margin-bottom: 4px;
  transition: background 0.15s, color 0.15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar nav a.active { background: var(--vert); color: #fff; }
.sidebar nav a .icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer { padding: 14px 10px; border-top: 1px solid rgba(255,255,255,0.1); }
.sidebar-footer a { display: block; color: rgba(255,255,255,0.5); font-size: 12px; padding: 8px 12px; border-radius: 5px; }
.sidebar-footer a:hover { color: #fff; background: rgba(255,255,255,0.08); }

.admin-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
.admin-topbar {
  background: #fff; border-bottom: 1px solid #e0e0d8;
  padding: 0 28px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-topbar h1 { font-size: 17px; font-weight: 600; color: #333; }
.topbar-user { font-size: 12px; color: #888; }

.admin-content { padding: 28px; flex: 1; }

/* CARTES STAT DASHBOARD */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-c { background: #fff; border-radius: 8px; padding: 20px; border: 1px solid #e8e8e2; }
.stat-c .num { font-size: 32px; font-weight: 700; color: var(--fond); }
.stat-c .lbl { font-size: 12px; color: #888; margin-top: 4px; }

/* TABLES */
.admin-table-wrap { background: #fff; border-radius: 8px; border: 1px solid #e8e8e2; overflow: hidden; }
.admin-table-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e8e8e2; }
.admin-table-head h2 { font-size: 15px; font-weight: 600; color: #333; }
table { width: 100%; border-collapse: collapse; }
th { background: #f8f8f5; font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.8px; padding: 10px 16px; text-align: left; border-bottom: 1px solid #e8e8e2; }
td { padding: 12px 16px; border-bottom: 1px solid #f0f0ea; font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafaf7; }

/* BADGES */
.badge-actif   { background: #eaf5e0; color: var(--fond); font-size: 10px; padding: 3px 8px; border-radius: 3px; font-weight: 600; }
.badge-inactif { background: #f5f5f2; color: #999; font-size: 10px; padding: 3px 8px; border-radius: 3px; font-weight: 600; }

/* BOUTONS */
.btn-admin { display: inline-block; padding: 8px 16px; border-radius: 5px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: background 0.15s; }
.btn-vert-admin { background: var(--fond); color: #fff; }
.btn-vert-admin:hover { background: var(--vert); }
.btn-rouge { background: #fdecea; color: #c0392b; }
.btn-rouge:hover { background: #e74c3c; color: #fff; }
.btn-gris { background: #f0f0ea; color: #555; }
.btn-gris:hover { background: #e0e0da; }

/* FORMULAIRES ADMIN */
.admin-form { background: #fff; border-radius: 8px; border: 1px solid #e8e8e2; padding: 28px; max-width: 680px; }
.admin-form .field { margin-bottom: 18px; }
.admin-form label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-form input[type=text],
.admin-form input[type=date],
.admin-form input[type=file],
.admin-form textarea,
.admin-form select {
  width: 100%; border: 1px solid #ddd; border-radius: 5px;
  padding: 9px 12px; font-size: 14px; font-family: inherit;
  background: #fafaf8; color: #222; transition: border-color 0.2s;
}
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus { outline: none; border-color: var(--vert); }
.admin-form textarea { height: 90px; resize: vertical; }
.admin-form .hint { font-size: 11px; color: #aaa; margin-top: 4px; }
.admin-form .form-btns { display: flex; gap: 10px; margin-top: 22px; }
.admin-form input[type=checkbox] { width: auto; margin-right: 6px; }

.flash-ok  { background: #eaf5e0; border:1px solid var(--vert); color:var(--fond); padding:10px 16px; border-radius:5px; margin-bottom:18px; font-size:13px; }
.flash-err { background: #fdecea; border:1px solid #e74c3c; color:#c0392b; padding:10px 16px; border-radius:5px; margin-bottom:18px; font-size:13px; }
