/* Thème par défaut: clair */
:root{
  --bg: #f3f4f6;         /* gris clair */
  --surface: #ffffff;
  --text: #111827;       /* très lisible */
  --muted: #4b5563;
  --border: rgba(17, 24, 39, 0.12);

  --primary: #2563eb;   /* bleu */
  --primary-2: #1d4ed8;

  --danger: #dc2626;
  --warning: #f59e0b;
  --ok: #16a34a;

  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);

  --focus: rgba(37, 99, 235, 0.25);

  --meter-bg: rgba(17, 24, 39, 0.10);
  --meter-fill: #6b7280;

  color-scheme: light;
}

html[data-theme="dark"]{
  --bg: #0b1220;
  --surface: #0f172a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(229, 231, 235, 0.14);

  --primary: #60a5fa;
  --primary-2: #3b82f6;

  --shadow: 0 12px 35px rgba(0,0,0,0.35);

  --focus: rgba(96, 165, 250, 0.25);

  --meter-bg: rgba(229, 231, 235, 0.12);
  --meter-fill: #94a3b8;

  color-scheme: dark;
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.skip-link:focus{
  left: 10px;
  outline: none;
  box-shadow: 0 0 0 4px var(--focus);
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.logo{
  width: 70px;
  height: auto;
  border-radius: 90px;
  display: grid;
  place-items: center;
  display: block;
}

.brand{
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-title{
  font-weight: 800;
  letter-spacing: 0.2px;
}
.brand-subtitle{
  font-size: 12px;
  color: var(--muted);
}

.controls{
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-label{
  font-size: 13px;
  color: var(--muted);
}

.theme-select{
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 140px;
}

.container{
  width: min(1000px, 92vw);
  margin: 22px auto 34px;
  display: grid;
  gap: 18px;
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.card.small{
  padding: 16px;
}

h1{
  margin: 0 0 10px;
  font-size: 20px;
}

h2{
  margin: 0 0 10px;
  font-size: 15px;
}

p.muted, .muted{
  color: var(--muted);
}

.field label{
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14px;
}

.input-wrap{
  display: flex;
  gap: 10px;
  align-items: center;
}

input[type="password"], input[type="text"], input{
  width: 100%;
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 12px;
  outline: none;
  font-size: 15px;
}

input:focus{
  box-shadow: 0 0 0 4px var(--focus);
  border-color: color-mix(in oklab, var(--primary) 35%, var(--border));
}

.ghost-btn, .primary-btn, .secondary-btn{
  border-radius: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  font-weight: 800;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.ghost-btn{
  font-weight: 700;
}

.ghost-btn:hover{
  background: color-mix(in oklab, var(--surface) 85%, var(--primary) 10%);
}

.ghost-btn:active, .primary-btn:active, .secondary-btn:active{
  transform: translateY(1px);
}

.primary-btn{
  background: var(--primary);
  border-color: color-mix(in oklab, var(--primary) 70%, var(--border));
  color: white;
}
.primary-btn:hover{
  background: var(--primary-2);
}

.secondary-btn:hover{
  background: color-mix(in oklab, var(--surface) 85%, var(--primary) 10%);
}

.help{
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.score-row{
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.score-meta{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.score-title{
  font-weight: 800;
  color: var(--muted);
  font-size: 13px;
}

.score-value{
  font-weight: 900;
  letter-spacing: 0.2px;
}

.meter{
  height: 12px;
  border-radius: 999px;
  background: var(--meter-bg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.meter-bar{
  height: 100%;
  width: 0%;
  background: var(--meter-fill);
  transition: width 0.25s ease, background 0.25s ease;
}

.grid{
  margin-top: 16px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 820px){
  .grid{ grid-template-columns: 1fr; }
  .topbar{ flex-wrap: wrap; justify-content: center; }
}

.detail h2{
  margin-bottom: 10px;
}

.list{
  padding-left: 18px;
  margin: 0;
}
.list li{
  margin: 6px 0;
}
.list b{
  font-weight: 900;
}

.actions{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footnote{
  margin-top: 14px;
  font-size: 12px;
}
