/* Reset minimal + primitives partagées (boutons, focus, champs, en-tête app). */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-14);
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface-alt);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a {
  color: var(--samsung-blue);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

/* Focus clavier visible partout — jamais retiré, seulement déplacé. */
:focus-visible {
  outline: 2px solid var(--samsung-blue);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- Boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font-family: var(--font-body);
  font-size: var(--fs-14);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  background: none;
  color: var(--ink);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.btn--primary {
  background: var(--samsung-blue);
  color: var(--surface);
}

.btn--primary:hover:not(:disabled) { background: var(--samsung-blue-dk); }

.btn--outline {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn--outline:hover:not(:disabled) { border-color: var(--ink-muted); }

.btn--ghost {
  color: var(--ink-muted);
  padding: 0 10px;
}

.btn--ghost:hover:not(:disabled) {
  background: var(--surface-alt);
  color: var(--ink);
}

/* Bouton icône — cible 32×32 minimum. */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  background: none;
  color: var(--ink-muted);
  cursor: pointer;
}

.btn-icon:hover {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ---------------------------------------------------------------- Champs */

.input,
.textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: var(--fs-14);
  color: var(--ink);
}

.input:focus,
.textarea:focus {
  outline: 2px solid var(--samsung-blue);
  outline-offset: -1px;
  border-color: var(--samsung-blue);
}

.textarea {
  resize: none;
  line-height: 1.5;
}

/* ------------------------------------------------------------ En-tête app */

.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.app-header__brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--ink);
}

.app-header__brand span {
  font-family: var(--font-body);
  font-size: var(--fs-13);
  font-weight: 400;
  color: var(--ink-muted);
}

.app-header__spacer { flex: 1; }

.app-header__nav {
  display: flex;
  gap: 4px;
}

.app-header__link {
  padding: 6px 10px;
  border-radius: var(--r-control);
  font-size: var(--fs-13);
  color: var(--ink-muted);
}

.app-header__link:hover {
  background: var(--surface-alt);
  color: var(--ink);
  text-decoration: none;
}

.app-header__link[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

.app-header__user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-13);
  color: var(--ink-muted);
}

/* --------------------------------------------------------------- Bandeau */

.banner {
  display: none;
  padding: 8px 20px;
  background: var(--state-review-bg);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-13);
  color: var(--ink);
  flex: 0 0 auto;
}

.banner[data-visible="true"] { display: block; }
