/* ═══════════════════════════════════════════════
 * AME Custom Theme - base.css
 * Design system: reset, typography, buttons,
 * forms, highlights, accessibility, responsive.
 * ═══════════════════════════════════════════════ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: var(--ame-blanc);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

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

/* ── Typography ──────────────────────────────── */
h1 {
  font-size: 52px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
}

h2 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
}

h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

h4 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

p {
  font-size: 16px;
  line-height: 1.6;
}

small {
  font-size: 14px;
}

/* ── Highlight utilities ─────────────────────── */
.highlight {
  background: linear-gradient(transparent 50%, var(--ame-lime) 50%);
  padding: 0 2px;
}

.highlight-dark {
  background: linear-gradient(transparent 50%, rgba(193, 255, 114, 0.4) 50%);
  padding: 0 2px;
}

/* ── Section layout ──────────────────────────── */
.section {
  padding: var(--section-padding);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ame-lavande);
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 16px;
  color: #888;
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ── Buttons ─────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--ame-bleu-nuit);
  color: var(--ame-blanc);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.btn-primary:hover {
  background: #2a3060;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--ame-bleu-nuit);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--ame-lavande);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.btn-secondary:hover {
  background: var(--ame-lavande-clair);
  border-color: var(--ame-lavande-clair);
  transform: translateY(-1px);
}

.btn-lime {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--ame-lime);
  color: var(--ame-bleu-nuit);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.btn-lime:hover {
  background: #d4ff99;
  transform: translateY(-1px);
}

.btn-outline-w {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--ame-blanc);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--ame-lavande);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.btn-outline-w:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--ame-blanc);
  transform: translateY(-1px);
}

/* ── Form Inputs ─────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-stack);
  font-size: 14px;
  color: #1a1a1a;
  background: var(--ame-fond-card);
  border: 1px solid #e0e0dd;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  border-color: var(--ame-lime);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* ── Accessibility ───────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--ame-bleu-nuit);
  color: var(--ame-blanc);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}

a.skip-link:focus {
  top: 8px;
}

:focus-visible {
  outline: 2px solid var(--ame-lavande);
  outline-offset: 2px;
}

/* ── 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;
  }
}

/* ── Responsive (mobile-first breakpoint) ────── */
@media (max-width: 767px) {
  h1 {
    font-size: 28px;
    letter-spacing: -0.5px;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 18px;
  }

  .section {
    padding: 40px 16px;
  }

  .section-title {
    font-size: 24px;
  }

  .section-sub {
    font-size: 15px;
    margin-bottom: 32px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-lime,
  .btn-outline-w {
    padding: 12px 24px;
    font-size: 13px;
    width: 100%;
  }
}
