/* ==========================================================================
   WalliSend Base Styles
   Reset, typographie et styles de base
   ========================================================================== */

/* ===== CSS RESET ===== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-dark);
  background-color: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* ===== TYPOGRAPHIE ===== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-dark);
}

h1 {
  font-size: var(--font-size-2xl);
}

h2 {
  font-size: var(--font-size-xl);
}

h3 {
  font-size: var(--font-size-lg);
}

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-smooth);
}

a:hover {
  color: var(--color-primary-dark);
}

/* ===== IMAGES ===== */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== LISTES ===== */

ul, ol {
  list-style: none;
}

/* ===== FORMULAIRES ===== */

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== UTILITAIRES LAYOUT ===== */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  box-sizing: border-box;
}

.section {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  overflow-x: hidden;
  width: 100%;
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
}

/* ===== UTILITAIRES TEXTE ===== */

.text-center {
  text-align: center;
}

.text-white {
  color: var(--color-white);
}

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

/* ===== ACCESSIBILITÉ ===== */

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: var(--space-xs) var(--space-sm);
  z-index: var(--z-toast);
  transition: top var(--transition-smooth);
}

.skip-link:focus {
  top: 0;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 2px;
}

/* Visually hidden */
.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;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== UTILITAIRES FLEXBOX ===== */

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

/* ===== UTILITAIRES GRID ===== */

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 768px) {
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .md\:grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}
