/* ===========================================================================
   styles.css — commun à toutes les pages. Mobile d'abord.
   =========================================================================== */

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --border: #e6e1d8;
  --accent: #a13d3d;
  --accent-contrast: #ffffff;
  --radius: 12px;
  --maxw: 30rem;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.15rem 3rem;
}

h1 { font-size: 1.4rem; margin: 0 0 .2rem; }
p  { margin: .4rem 0; }

.muted  { color: var(--muted); }
.center { text-align: center; }

/* ---- Formulaires ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-top: 1.25rem;
}

label {
  display: block;
  font-size: .9rem;
  color: var(--muted);
  margin: .85rem 0 .3rem;
}

input {
  width: 100%;
  font-size: 1rem;
  padding: .7rem .8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  padding: .8rem 1rem;
  margin-top: 1.15rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
}

button:disabled { opacity: .55; cursor: default; }

.erreur {
  color: var(--accent);
  font-size: .9rem;
  min-height: 1.2em;
  margin: .7rem 0 0;
}

/* ---- Barre du haut (pages privées) ---- */

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.lien-deco {
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: .85rem;
  text-decoration: underline;
  cursor: pointer;
}

/* ---- Menu de navigation ---- */

nav.menu {
  margin-top: 1.4rem;
  display: grid;
  gap: .6rem;
}

nav.menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .95rem 1rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

nav.menu a:active { background: var(--bg); }

nav.menu .tag {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .15rem .55rem;
}

/* ---- Écrans plus larges ---- */

@media (min-width: 40rem) {
  .wrap { padding-top: 2.5rem; }
  h1 { font-size: 1.6rem; }
}
