:root {
  --bg: #f6f7f8;
  --card: #ffffff;
  --text: #111;
  --muted: #666;
  --border: #e2e2e2;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);

  /* Centre horizontal + un peu d’air en haut/bas */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
}

/* Ton wrapper */
.app {
  width: min(900px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

h1 {
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.muted {
  margin: 0 0 1rem;
  color: var(--muted);
}

/* Panels */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 1rem 0;
  background: #fafafa;
}

.group {
  margin: 0.75rem 0 1rem;
}

.label {
  font-weight: 750;
  margin-bottom: 0.6rem;
}

/* Toggle row */
.toggle-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* 50/50 split — utilisé pour le groupe Patron */
.toggle-row--split {
  flex-wrap: nowrap;
}
.toggle-row--split .pill {
  flex: 1;
}

/* Hide native radio/checkbox, keep accessible */
.toggle-row input[type="radio"],
.toggle-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  background: #fff;
  font-weight: 700;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease, border-color 120ms ease;
}

/* Selected */
.toggle-row input:checked+.pill {
  border-color: #111;
  background: #1a73e8;
  color: #fff;
}

/* Locked via URL param */
.toggle-row input:disabled+.pill {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.toggle-row input:disabled:checked+.pill {
  opacity: 0.75;
  cursor: not-allowed;
  background: #1a73e8;
  border-color: #111;
  color: #fff;
}

.pill:hover {
  transform: translateY(-1px);
  background: #155cb0;
  border-color: #111;
  color: #fff;
}

/* Actions */
.actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

button {
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-weight: 850;
  border: 1px solid #111;
  background: #1a73e8;
  color: #fff;
  border-radius: 12px;
  transition: transform 120ms ease, opacity 120ms ease;
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

button:hover {
  transform: translateY(-1px);
  background: #155cb0;
}

button:active {
  transform: translateY(0);
  opacity: 0.9;
}

/* Si tu veux un bouton secondaire (ex: Copier), donne-lui class="secondary" */
button.secondary {
  background: #fff;
  color: #111;
}

.pwd-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pwd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1.15rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  word-break: break-all;
  min-height: 1.6em;
  flex: 1;
}

.hiddentext {
	-webkit-text-security: disc;
  text-security: disc;
}

.hiddentext:hover {
  -webkit-text-security: none;
  text-security: none;
}

.status {
  color: #b00;
  margin-left: 0.25rem;
}

/* Petit polish mobile */
@media (max-width: 480px) {
  .app {
    padding: 1.1rem;
  }

  .logo {
    width: 100%;
    height: auto;
    border-radius: 0;
  }

  .pill {
    padding: 0.5rem 0.75rem;
  }

  .pwd-box {
    flex-direction: column;
    align-items: stretch;
  }

  .toggle-row--split {
    flex-direction: column;
  }

  .toggle-row--split .pill {
    width: 100%;
    text-align: center;
  }

  button {
    width: 100%;
    justify-content: center;
  }

  .actions {
    width: 100%;
  }

}

.url-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff8e1;
  border-bottom: 2px solid #f59e0b;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  color: #78350f;
  font-family: ui-monospace, monospace;
  text-align: center;
}

.advanced-panel > summary {
  cursor: pointer;
  font-weight: 750;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.advanced-panel > summary::before {
  content: '▶';
  font-size: 0.65rem;
  transition: transform 120ms ease;
  display: inline-block;
}

.advanced-panel[open] > summary::before {
  transform: rotate(90deg);
}

.advanced-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.github-link {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  transition: color 120ms ease;
}
.github-link:hover {
  color: var(--text);
}

.logo {
  max-width: 100%;
  height: 150px;
  border-radius: 0px 10px 10px 0px;
  object-fit: cover;
}
