/* ==========================================================================
   Reset, typographie, RTL global
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  direction: rtl;
  text-align: right;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.7;
  background: var(--color-bg-body);
  color: var(--color-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text-primary);
}

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

p {
  color: var(--color-text-secondary);
}

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

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

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

input {
  font-family: inherit;
}

svg {
  display: block;
  fill: currentColor;
}

/* Miroir des icônes directionnelles en RTL */
[data-mirror-rtl] {
  transform: scaleX(-1);
}

/* Conteneur global */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* Section titre commun */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.section-title h2 {
  position: relative;
  padding-inline-start: var(--space-md);
  border-inline-start: 4px solid var(--color-accent);
}

.section-title .see-all {
  color: var(--color-accent);
  font-size: var(--font-size-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: color var(--transition-fast);
}

.section-title .see-all:hover {
  color: var(--color-accent-light);
}

section {
  padding: var(--space-2xl) 0;
}

/* Scrollbar sobre pour le contexte sombre */
::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
