/* ============================================================
   JBS — Base
   ============================================================ */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: var(--rdc-blue-medium);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

a:hover {
  color: var(--rdc-blue);
}

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

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section {
  position: relative;
}

/* Lien d'évitement */
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--rdc-blue-deep);
  color: var(--white);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  transition: top var(--t-fast) var(--ease);
}

.skip-link:focus {
  top: 0;
  color: var(--white);
}

/* Focus visible */
:focus-visible {
  outline: 3px solid var(--rdc-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Sélection */
::selection {
  background: var(--rdc-gold-soft);
  color: var(--rdc-blue-deep);
}

/* Titres de section */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rdc-gold-text);
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: linear-gradient(90deg, var(--rdc-gold), transparent);
}

.section-title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  color: var(--rdc-blue-deep);
  max-width: 20ch;
}

.section-title .accent {
  font-style: italic;
  color: var(--rdc-blue-medium);
}

.section-intro {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 60ch;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

/* Boutons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease),
    background-color var(--t-med) var(--ease),
    color var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease);
}

.btn svg {
  flex: none;
  transition: transform var(--t-med) var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-primary {
  background: var(--rdc-blue-deep);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(8, 42, 74, 0.24);
}

.btn-primary:hover {
  background: var(--rdc-blue);
  color: var(--white);
  box-shadow: 0 14px 34px rgba(8, 42, 74, 0.32);
}

.btn-gold {
  background: var(--rdc-gold);
  color: var(--rdc-blue-deep);
  box-shadow: 0 10px 24px rgba(200, 154, 61, 0.28);
}

.btn-gold:hover {
  background: var(--rdc-gold-soft);
  color: var(--rdc-blue-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--rdc-blue-deep);
  border-color: rgba(8, 42, 74, 0.28);
}

.btn-ghost:hover {
  border-color: var(--rdc-blue-deep);
  color: var(--rdc-blue-deep);
}

.btn-light {
  background: var(--white);
  color: var(--rdc-blue-deep);
}

.btn-light:hover {
  background: var(--ivory);
  color: var(--rdc-blue-deep);
}

.btn-accent {
  background: var(--rdc-red);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(185, 66, 71, 0.24);
}

.btn-accent:hover {
  background: var(--rdc-red-deep);
  color: var(--white);
}

/* Étiquettes / tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--rdc-blue-soft);
  color: var(--rdc-blue);
}

.tag-gold {
  background: var(--rdc-gold-pale);
  color: var(--rdc-gold-text);
}

.tag-draft {
  background: var(--rdc-red-soft);
  color: var(--rdc-red-deep);
}

.tag-line {
  background: transparent;
  border: 1px solid rgba(246, 242, 233, 0.35);
  color: var(--ivory);
}

/* Mention à valider */
.note-to-validate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px dashed var(--rdc-gold);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--rdc-gold-text);
  background: var(--rdc-gold-pale);
}

.note-to-validate::before {
  content: "✱";
  font-weight: 700;
}

/* Bandeau de démonstration */
.demo-banner {
  position: relative;
  z-index: 5;
  background: var(--rdc-blue-deep);
  color: var(--ivory);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 9px 16px;
}

.demo-banner span {
  color: var(--rdc-gold-soft);
  font-weight: 700;
}

/* Motif de fond */
.pattern-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("../images/pattern-rdc.svg");
  background-size: 240px 240px;
  background-repeat: repeat;
  opacity: 0.35;
}

/* Barre de progression de défilement */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 1200;
  background: linear-gradient(90deg, var(--rdc-blue-medium), var(--rdc-gold));
}

/* Bouton retour en haut */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--rdc-blue-deep);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity var(--t-med) var(--ease),
    transform var(--t-med) var(--ease),
    visibility var(--t-med) var(--ease),
    background-color var(--t-med) var(--ease);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--rdc-blue);
  color: var(--white);
}

/* Visuellement caché mais accessible */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
