/*
 * Tokens de la marque e-tech / Onepoint.
 * Calqués sur themes-revealjs (light + dark).
 */

:root {
  /* Palette marque (immuable cross-thème) */
  --brand-primary: #006385;
  --brand-primary-light: #009EDC;
  --brand-secondary: #85004F;
  --brand-secondary-light: #DB00FF;
  --brand-tertiary: #720085;

  --brand-bg-light: #FFFFFF;
  --brand-bg-dark: #0C1113;
  --brand-bg-gray: #F0F0F0;
  --brand-text-light: #FFFFFF;
  --brand-text-dark: #0C1113;

  /* Couleurs sémantiques de statut (pas de variante dark : mode dark non activé dans l'app) */
  --theme-success: #1E8E3E;
  --theme-success-hover: #176B2F;
  --theme-danger: #B3261E;
  --theme-danger-hover: #8C1D17;

  /* Tailles de police */
  --theme-font-title: 48px;
  --theme-font-subtitle: 24px;
  --theme-font-heading: 28px;
  --theme-font-body: 16px;
  --theme-font-small: 14px;

  /* Famille de polices */
  --theme-font-heading-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --theme-font-body-family: 'Dosis', 'Segoe UI', system-ui, sans-serif;
  --theme-font-mono-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Frame décorative */
  --frame-primary: var(--brand-primary);
  --frame-secondary: var(--brand-secondary);
  --frame-tertiary: var(--brand-primary-light);
  --frame-paper: var(--brand-bg-light);
  --frame-ink: var(--brand-text-dark);
}

/* Mode light (par défaut) */
:root,
html.light,
.light {
  --theme-bg: var(--brand-bg-light);
  --theme-surface: var(--brand-bg-gray);
  --theme-text: var(--brand-text-dark);
  --theme-text-muted: #4a5860;
  --theme-border: rgba(12, 17, 19, 0.12);

  --theme-h1: var(--brand-primary);
  --theme-h2: var(--brand-secondary);
  --theme-h3: var(--brand-primary-light);
  --theme-accent: var(--brand-primary-light);
  --theme-link: var(--brand-primary);
  --theme-link-hover: var(--brand-secondary);
  --theme-progress: var(--brand-secondary-light);
}

/* Mode dark */
html.dark,
.dark {
  --theme-bg: var(--brand-bg-dark);
  --theme-surface: #161c1f;
  --theme-text: var(--brand-text-light);
  --theme-text-muted: #b0b8bc;
  --theme-border: rgba(255, 255, 255, 0.14);

  --theme-h1: var(--brand-primary-light);
  --theme-h2: var(--brand-secondary-light);
  --theme-h3: var(--brand-primary);
  --theme-accent: var(--brand-secondary-light);
  --theme-link: var(--brand-secondary-light);
  --theme-link-hover: var(--brand-primary-light);
  --theme-progress: var(--brand-primary-light);

  --frame-paper: var(--brand-bg-dark);
  --frame-ink: var(--brand-text-light);
}

/* Styles globaux */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--theme-font-body-family);
  background-color: var(--theme-bg);
  color: var(--theme-text);
}

body {
  font-family: var(--theme-font-body-family);
  font-size: var(--theme-font-body);
  background-color: var(--theme-bg);
  color: var(--theme-text);
  line-height: 1.6;
  max-width: 90%;
  margin: 2rem auto;
  padding: 0 1rem;
  transition: background-color 0.3s, color 0.3s;
}

header {
  display: flex;
  flex-direction: column;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  height: 40px;
  width: auto;
}

header h1,
header .page-subtitle {
  margin: 0;
}

.page-subtitle {
  font-size: var(--theme-font-subtitle);
  color: var(--theme-text-muted);
}

h1, h2, h3 {
  font-family: var(--theme-font-heading-family);
  margin: 1.5rem 0 1rem 0;
}

h1 {
  font-size: var(--theme-font-title);
  color: var(--theme-h1);
}

h2 {
  font-size: var(--theme-font-heading);
  color: var(--theme-h2);
}

h3 {
  font-size: var(--theme-font-subtitle);
  color: var(--theme-h3);
}

a {
  color: var(--theme-link);
  text-decoration: none;
  border-bottom: 1px solid var(--theme-link);
  transition: color 0.2s;
}

a:hover {
  color: var(--theme-link-hover);
  border-bottom-color: var(--theme-link-hover);
}

button, input[type="submit"] {
  font-family: var(--theme-font-body-family);
  padding: 0.5rem 1rem;
  border: 1px solid var(--theme-border);
  border-radius: 4px;
  background-color: var(--frame-primary);
  color: var(--brand-text-light);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  font-size: var(--theme-font-body);
}

button:hover, input[type="submit"]:hover {
  background-color: var(--theme-h1);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.btn-success {
  background-color: var(--theme-success);
}

.btn-success:hover {
  background-color: var(--theme-success-hover);
}

.btn-danger {
  background-color: var(--theme-danger);
}

.btn-danger:hover {
  background-color: var(--theme-danger-hover);
}

input[type="text"], input[type="password"] {
  font-family: var(--theme-font-body-family);
  padding: 0.5rem;
  border: 1px solid var(--theme-border);
  border-radius: 4px;
  background-color: var(--theme-surface);
  color: var(--theme-text);
  font-size: var(--theme-font-body);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--theme-border);
  text-align: left;
}

th {
  background-color: var(--theme-surface);
  color: var(--theme-h1);
  font-weight: 600;
}

tr.inactive {
  color: var(--theme-text-muted);
  opacity: 0.6;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--theme-border);
}

.member-name {
  flex: 1;
}

.member-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guest-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.guest-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: var(--theme-surface);
  border-radius: 999px;
  font-size: var(--theme-font-small);
}

.guest-tag button,
.guest-list > button {
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  line-height: 1;
  font-size: var(--theme-font-small);
  border: 1px solid var(--theme-border);
  border-radius: 50%;
  background: var(--theme-surface);
  color: var(--theme-text);
}

.guest-tag button:hover,
.guest-list > button:hover {
  background-color: var(--frame-primary);
  color: var(--brand-text-light);
}

#counter {
  margin-top: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--theme-surface), var(--theme-bg));
  border: 2px solid var(--theme-accent);
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--theme-h1);
}

#counter strong {
  color: var(--theme-h2);
  font-size: 1.3rem;
}

input[type="checkbox"] {
  cursor: pointer;
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--frame-primary);
}

form.inline {
  display: inline;
}

.nav {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--frame-border, #ccc);
  margin-bottom: 1rem;
}

.nav-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}

.nav-link:hover {
  text-decoration: underline;
}
