/* ============================================================
   ARTEKIOS — Base CSS
   Reset, typographie globale, éléments HTML sémantiques
   ============================================================ */

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

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--navy);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Titres ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, var(--text-5xl)); }
h2 { font-size: clamp(1.5rem, 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(1.2rem, 2.5vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

/* ── Texte ── */
p {
  line-height: 1.7;
  color: var(--gray-700);
}

p + p { margin-top: var(--space-4); }

strong { font-weight: 600; color: var(--navy); }

/* ── Liens ── */
a {
  color: var(--teal);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* Compense la hauteur du header sticky sur les ancres */
[id] { scroll-margin-top: 90px; }

/* ── Listes ── */
ul, ol {
  padding-left: var(--space-6);
}

li { line-height: 1.65; }

/* ── Images ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Formulaires ── */
input, textarea, select, button {
  font-family: var(--font-body);
  font-size: var(--text-base);
}

button { cursor: pointer; }

/* ── HR ── */
hr {
  border: none;
  border-top: 1px solid var(--gray-200);
}

/* ── Focus accessible ── */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Utilitaires texte ── */
.text-teal    { color: var(--teal); }
.text-muted   { color: var(--gray-500); }
.text-center  { text-align: center; }
.text-sm      { font-size: var(--text-sm); }
.text-lg      { font-size: var(--text-lg); }

/* ── Utilitaires layout ── */
.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}

@media (max-width: 640px) {
  .container {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
  }
}

/* ── Section spacing ── */
.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

.section-sm {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

@media (max-width: 1400px) {
  .section    { padding-top: var(--space-14); padding-bottom: var(--space-14); }
  .section-sm { padding-top: var(--space-8);  padding-bottom: var(--space-8); }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.2rem; }
}

/* ── Laptop 14" — garde la mise en page desktop, réduit proportionnellement ── */
@media (max-width: 1366px) {
  html { font-size: 15px; }

  .section    { padding-top: var(--space-12); padding-bottom: var(--space-12); }
  .section-sm { padding-top: var(--space-6);  padding-bottom: var(--space-6); }

  .section-header { margin-bottom: var(--space-8); }

  .grid-3 { gap: var(--space-5); }
  .grid-2 { gap: var(--space-6); }
}

@media (max-width: 768px) {
  .section { padding-top: var(--space-10); padding-bottom: var(--space-10); }
  .section-sm { padding-top: var(--space-6); padding-bottom: var(--space-6); }
}

/* ── Fonds alternés ── */
.bg-white      { background: var(--white); }
.bg-gray       { background: var(--gray-50); }
.bg-teal-light { background: var(--teal-light); }
.bg-navy       { background: var(--navy); color: var(--white); }
.bg-gradient   { background: linear-gradient(160deg, var(--teal-subtle) 0%, var(--white) 60%); }

/* ── En-têtes de section ── */
.section-header {
  margin-bottom: var(--space-12);
}

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-3);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--text-lg);
  max-width: 640px;
}

.section-header.centered {
  text-align: center;
}

.section-header.centered p {
  margin-left: auto;
  margin-right: auto;
}

/* ── Grilles ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Visually hidden (accessibilité) ── */
.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;
}