/* Charte Amikanin, alignée sur admin.amikanin.fr et espace.amikanin.fr */
:root {
  --bg-top: #F9FAF7; --bg-bottom: #E8ECE8;
  --ink: #4D5C4E; --body: #666;
  --gold: #C97B5C; --gold-deep: #B8916D; --honey: #D9A95C; --clay: #E8DCC8;
  --sage: #617462; --sage-light: #9FA89F;
  --card: #FFFFFF; --line: rgba(97, 116, 98, .12);
  --ok: #4F8A5B; --ko: #D96B6B; --unknown: #C4CAC4;
  --shadow: 0 1px 2px rgba(77, 92, 78, .04), 0 8px 24px rgba(77, 92, 78, .06);
  --shadow-lift: 0 4px 12px rgba(77, 92, 78, .08), 0 16px 40px rgba(77, 92, 78, .10);
  --radius: 18px; --radius-lg: 26px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Manrope', system-ui, sans-serif; color: var(--body); line-height: 1.5;
  background: linear-gradient(165deg, var(--bg-top) 0%, var(--bg-bottom) 100%) fixed;
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(201, 123, 92, .55); outline-offset: 2px; }

/* ---------- Barre du haut ---------- */
.topbar { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(12px);
  background: rgba(249, 250, 247, .78); border-bottom: 1px solid var(--line); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.05rem; letter-spacing: -.01em; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.brand .sub { font-weight: 600; color: var(--sage-light); }
.nav-right { display: flex; align-items: center; gap: 14px; font-size: .82rem; font-weight: 600; color: var(--sage); }
.link-btn { background: none; border: none; font: inherit; color: var(--sage); cursor: pointer; padding: 8px 12px; border-radius: 10px; }
.link-btn:hover { color: var(--ink); background: rgba(97, 116, 98, .07); }

/* ---------- En-tête ---------- */
.hero { padding: 38px 0 4px; }
.greeting { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sage-light); margin-bottom: 6px; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; }
.hero h1 .name { color: var(--gold); }
.hero .summary { margin-top: 10px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }

/* ---------- Recherche ---------- */
.searchbar { position: relative; margin: 26px 0 8px; }
.searchbar svg { position: absolute; left: 16px; top: 50%; width: 19px; height: 19px; margin-top: -9.5px; stroke: var(--sage-light); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.searchbar input { width: 100%; height: 52px; padding: 0 52px 0 46px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--card); font: inherit; font-size: 1rem; color: var(--ink); box-shadow: var(--shadow); }
.searchbar input::placeholder { color: var(--sage-light); }
.searchbar .kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: .75rem; font-weight: 700;
  color: var(--sage-light); border: 1px solid var(--line); border-radius: 7px; padding: 2px 8px; background: var(--bg-top); }

/* ---------- Groupes & cartes ---------- */
.group { margin-top: 30px; }
.group h2 { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sage); margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.card { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--card);
  border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.card:hover, .card.first { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card.first { outline: 2px solid rgba(201, 123, 92, .4); }
.card .ic { flex: none; width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  background: rgba(201, 123, 92, .12); color: var(--gold); }
.card .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card .txt { min-width: 0; flex: 1; }
.card .name { font-size: 1rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.card .desc { font-size: .85rem; margin-top: 3px; color: var(--body); }
/* Ligne « Utilisés souvent » : toujours trois cartes côte à côte, plus grandes */
.grid.featured { grid-template-columns: repeat(3, 1fr); }
.featured .card { padding: 22px; box-shadow: var(--shadow-lift); }
.featured .card .ic { width: 50px; height: 50px; }
.featured .card .name { font-size: 1.08rem; }
/* Section « Côté client » : compacte et discrète */
.group.muted h2 { color: var(--sage-light); }
.grid.muted { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.muted .card { padding: 12px 14px; gap: 11px; align-items: center; box-shadow: none; background: rgba(255, 255, 255, .55); }
.muted .card .ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(97, 116, 98, .1); color: var(--sage); }
.muted .card .ic svg { width: 17px; height: 17px; }
.muted .card .name { font-size: .9rem; font-weight: 700; }
.muted .card .desc { font-size: .78rem; margin-top: 0; }
.muted .card .status { top: 12px; right: 12px; width: 8px; height: 8px; }
.status { width: 10px; height: 10px; border-radius: 50%; background: var(--unknown); flex: none; }
.status.up { background: var(--ok); box-shadow: 0 0 0 3px rgba(79, 138, 91, .16); }
.status.down { background: var(--ko); box-shadow: 0 0 0 3px rgba(217, 107, 107, .2); }
.card .status { position: absolute; top: 18px; right: 18px; }
.summary .status { margin-top: 1px; }
.empty { margin-top: 40px; text-align: center; color: var(--sage-light); font-weight: 600; }
.foot { margin: 48px 0 40px; text-align: center; font-size: .78rem; color: var(--sage-light); }

/* ---------- Connexion ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; background: var(--card); border-radius: var(--radius-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-lift); padding: 34px 30px 30px; }
.login-card .brand { margin-bottom: 22px; }
.login-card h1 { font-size: 1.5rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.login-card .lead { margin-top: 4px; font-size: .9rem; }
.field { margin-top: 18px; }
.field label { display: block; font-size: .78rem; font-weight: 700; color: var(--sage); margin-bottom: 6px; }
.field input { width: 100%; height: 48px; padding: 0 14px; border-radius: 13px; border: 1px solid rgba(97, 116, 98, .25);
  background: var(--bg-top); font: inherit; font-size: 1rem; color: var(--ink); }
.field input:focus { outline: 3px solid rgba(201, 123, 92, .35); border-color: var(--gold); }
.btn { width: 100%; height: 50px; margin-top: 22px; border: none; border-radius: 14px; background: var(--ink); color: #fff;
  font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--sage); }
.error { margin-top: 16px; padding: 11px 14px; border-radius: 12px; background: rgba(217, 107, 107, .12); color: #a94444; font-size: .88rem; font-weight: 600; }

@media (max-width: 820px) { .grid.featured { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .grid, .grid.muted { grid-template-columns: 1fr; }
  .searchbar .kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover, .card.first { transform: none; } }
