/* ============================================
   BEYENI — assets/css/base.css
   Reset + styles globaux + typographie
   ============================================ */

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

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

body {
  font-family: var(--byn-font);
  font-size: var(--byn-font-size-base);
  line-height: var(--byn-line-height);
  color: var(--byn-dark);
  background: var(--byn-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  outline: none;
}
button { cursor: pointer; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--byn-primary); border-radius: 4px; }

/* ── CONTAINER ──────────────────────────────── */
.byn-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5%;
}

/* ── TYPOGRAPHIE ────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--byn-dark);
}
h1 { font-size: clamp(36px, 5vw, 72px); }
h2 { font-size: clamp(26px, 3.5vw, 44px); }
h3 { font-size: clamp(18px, 2vw, 26px); }
h4 { font-size: 18px; }
h5 { font-size: 15px; }
h6 { font-size: 13px; }

p { line-height: 1.7; }

.byn-text-gradient {
  background: linear-gradient(135deg, var(--byn-primary-3), var(--byn-primary), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── SECTIONS ───────────────────────────────── */
.byn-section { padding: var(--byn-space-3xl) 0; }
.byn-section--soft { background: var(--byn-soft); }
.byn-section--dark { background: var(--byn-dark); }

.byn-section__head { margin-bottom: 52px; }
.byn-section__head--center { text-align: center; }
.byn-section__head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.byn-stag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--byn-primary-light);
  color: var(--byn-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
  padding: 5px 14px;
  border-radius: var(--byn-radius-full);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.byn-stag.dark {
  background: rgba(93,65,255,.15);
  color: var(--byn-primary-3);
}

.byn-sh { color: var(--byn-dark); }
.byn-sh span { color: var(--byn-primary); }
.byn-sh.w { color: #fff; }
.byn-sh.w span {
  background: linear-gradient(135deg, var(--byn-primary-3), var(--byn-primary-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.byn-sp {
  color: var(--byn-gray);
  font-size: 16px;
  line-height: 1.7;
  margin-top: 12px;
}
.byn-sp.w { color: #4B5563; }

/* ── GRILLE DE BASE ─────────────────────────── */
.byn-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.byn-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.byn-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── UTILITAIRES ────────────────────────────── */
.byn-text-center  { text-align: center; }
.byn-text-left    { text-align: left; }
.byn-text-right   { text-align: right; }
.byn-hidden       { display: none !important; }
.byn-visible      { display: block !important; }
.byn-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;
}
.byn-flex         { display: flex; align-items: center; }
.byn-flex-center  { display: flex; align-items: center; justify-content: center; }
.byn-gap-sm       { gap: var(--byn-space-sm); }
.byn-gap-md       { gap: var(--byn-space-md); }
.byn-gap-lg       { gap: var(--byn-space-lg); }
.byn-mt-sm        { margin-top: var(--byn-space-sm); }
.byn-mt-md        { margin-top: var(--byn-space-md); }
.byn-mt-lg        { margin-top: var(--byn-space-lg); }
.byn-mb-sm        { margin-bottom: var(--byn-space-sm); }
.byn-mb-md        { margin-bottom: var(--byn-space-md); }
.byn-mb-lg        { margin-bottom: var(--byn-space-lg); }

/* ── BADGES STATUT ──────────────────────────── */
.byn-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--byn-radius-full);
  white-space: nowrap;
}
.byn-badge--success { background: #F0FDF4; color: #16a34a; border: 1px solid #bbf7d0; }
.byn-badge--warning { background: #FFFBEB; color: #d97706; border: 1px solid #fde68a; }
.byn-badge--danger  { background: #FEF2F2; color: #dc2626; border: 1px solid #fecaca; }
.byn-badge--info    { background: #EFF6FF; color: #2563eb; border: 1px solid #bfdbfe; }
.byn-badge--primary { background: #EEF2FF; color: var(--byn-primary); border: 1px solid #c7d2fe; }
.byn-badge--gray    { background: #F9FAFB; color: var(--byn-gray); border: 1px solid var(--byn-gray-light); }

/* ── EMPTY STATE ────────────────────────────── */
.byn-empty-state {
  text-align: center;
  padding: 80px 24px;
  grid-column: 1 / -1;
}
.byn-empty-state .byn-empty-icon { font-size: 56px; margin-bottom: 16px; }
.byn-empty-state h2 { font-size: 22px; margin-bottom: 10px; }
.byn-empty-state p  { color: var(--byn-gray); margin-bottom: 24px; }

/* ── ANIMATIONS ─────────────────────────────── */
@keyframes byn-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes byn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(93,65,255,.5); }
  50%       { box-shadow: 0 0 0 8px rgba(93,65,255,0); }
}
@keyframes byn-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes byn-spin {
  to { transform: rotate(360deg); }
}
.byn-animate-fade { animation: byn-fade-in .4s ease forwards; }
.byn-animate-float { animation: byn-float 5s ease-in-out infinite; }

/* ── LOADING SPINNER ────────────────────────── */
.byn-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--byn-gray-light);
  border-top-color: var(--byn-primary);
  border-radius: 50%;
  animation: byn-spin .7s linear infinite;
  display: inline-block;
}

/* ── TOAST NOTIFICATIONS ────────────────────── */
.byn-toast-wrap {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: var(--byn-z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.byn-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--byn-dark);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--byn-radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  min-width: 280px;
  animation: byn-fade-in .3s ease;
  border-left: 3px solid var(--byn-primary);
}
.byn-toast--success { border-left-color: var(--byn-success); }
.byn-toast--error   { border-left-color: var(--byn-danger); }
.byn-toast--warning { border-left-color: var(--byn-warning); }

/* ── MODAL ──────────────────────────────────── */
.byn-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,19,33,.7);
  backdrop-filter: blur(6px);
  z-index: var(--byn-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--byn-transition);
}
.byn-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.byn-modal {
  background: #fff;
  border-radius: var(--byn-radius-xl);
  padding: 36px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--byn-transition);
  position: relative;
}
.byn-modal-overlay.active .byn-modal { transform: translateY(0); }
.byn-modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--byn-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--byn-transition);
}
.byn-modal__close:hover { background: var(--byn-gray-light); }
.byn-modal__title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
  padding-right: 40px;
}