/* Base : reset, typographie, mise en page mobile avec zones sûres iOS. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--fond);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 800; }

a { color: var(--accent); font-weight: 700; text-decoration: none; }
a:hover { color: var(--accent-fort); }

button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.contenu {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding:
    calc(env(safe-area-inset-top) + 24px)
    calc(env(safe-area-inset-right) + 16px)
    calc(env(safe-area-inset-bottom) + 24px)
    calc(env(safe-area-inset-left) + 16px);
}

/* Réserve la place de la barre d'onglets fixe */
.page-app .contenu {
  padding-bottom: calc(env(safe-area-inset-bottom) + 100px);
}

.page-publique .contenu {
  min-height: 100dvh;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
