/* =========================================================
   CIAO ADMIN — BASE (reset, typography, layouts globaux)
   ========================================================= */

/* Inter self-hosted (à fournir en /assets/fonts/Inter-Variable.woff2) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/Inter-Variable.woff2') format('woff2-variations');
}

/* Reset minimal */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + var(--space-4));
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-surface);
  background: var(--bg);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; display: block; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
ul, ol { padding-left: var(--space-6); }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-8) 0; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip link a11y */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary);
  color: var(--on-primary);
  padding: var(--space-3) var(--space-4);
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { top: 0; color: var(--on-primary); text-decoration: none; }

/* Typographie ============================================= */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
  color: var(--on-surface);
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); line-height: 1.1; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 2vw + 0.8rem, 2.25rem); line-height: 1.2; }
h3 { font-size: clamp(1.25rem, 1vw + 0.8rem, 1.5rem); line-height: 1.25; font-weight: 600; }
h4 { font-size: 1.125rem; line-height: 1.3; font-weight: 600; }
h5 { font-size: 1rem; line-height: 1.4; font-weight: 600; }
h6 { font-size: 0.9rem; line-height: 1.4; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-surface-muted); }
p { margin: 0 0 var(--space-4); color: var(--on-surface-secondary); }
p:last-child { margin-bottom: 0; }
small, .caption { font-size: 0.8125rem; color: var(--on-surface-muted); }
.overline {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-2);
  display: block;
}
.text-secondary { color: var(--on-surface-secondary); }
.text-muted     { color: var(--on-surface-muted); }
.text-center    { text-align: center; }
.tabular        { font-variant-numeric: tabular-nums; }

/* Container / Layout ====================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
@media (min-width: 1440px) {
  .container { max-width: var(--container-wide); }
}

main { display: block; }
section { padding-block: var(--space-20); position: relative; }
section.section--sm { padding-block: var(--space-12); }
section.alt-bg { background: var(--bg-alt); }
section.brand-bg { background: var(--primary); color: var(--on-primary); }
section.brand-bg h1, section.brand-bg h2, section.brand-bg h3, section.brand-bg p { color: var(--on-primary); }

.section-head {
  margin-bottom: var(--space-12);
  max-width: 760px;
}
.section-head .overline { color: var(--primary); margin-bottom: var(--space-2); }
.section-head h2 {
  font-size: clamp(1.75rem, 2vw + 0.8rem, 2.5rem);
  line-height: 1.15;
  margin-bottom: var(--space-4);
}
.section-head p {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--on-surface-secondary);
}
.section-head--center { margin-inline: auto; text-align: center; }

/* Grid utilities ========================================== */
.grid { display: grid; gap: var(--space-6); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1023px) {
  .cols-3, .cols-4, .cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .cols-2, .cols-3, .cols-4, .cols-5 { grid-template-columns: 1fr; }
}
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.row--between { justify-content: space-between; }
.row--center { justify-content: center; }

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

/* Print =================================================== */
@media print {
  .navbar, .footer, .cta-band, .consent-banner { display: none !important; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}
