/* 
  BCNantes.fr - Base Styles 
  =============================
  Reset CSS moderne et styles d'éléments de base (balises nues).
*/

/* 1. Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* 3. Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul,
ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

/* 4. Set core root defaults */
html {
  scroll-behavior: smooth;
  accent-color: var(--color-accent);
  overflow-x: hidden;
}

/* 5. Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  line-height: var(--leading-normal);
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: var(--color-bg-page);
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* 6. A elements */
a {
  text-decoration-skip-ink: auto;
  color: var(--color-primary);
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
}

a:hover {
  color: var(--color-accent);
}

/* 7. Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
  height: auto;
  border-radius: inherit; /* Inherit from wrapper */
}

/* 8. Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
  border-radius: var(--radius-sm);
}

/* 9. Typography Base */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-primary-dark);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-4);
  font-family: var(--font-serif);
}

h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-6);
}
h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-6);
}
h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}
h4 {
  font-size: var(--text-xl);
}

p {
  margin-bottom: var(--space-6);
  max-width: 65ch; /* Limit width for better readability (Senior friendly) */
}

p:last-child {
  margin-bottom: 0;
}

strong,
b {
  font-weight: var(--weight-bold);
  color: var(--color-primary-dark);
}

/* 10. Focus Rings for Accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px rgba(213, 63, 140, 0.2);
}
