/* =============================================================
   REBOOT PLAN — BASE
   Reset moderne minimal + globals + styles placeholders média.
   Charge tokens.css avant ce fichier.
   ============================================================= */

/* === Police Inter (Google Fonts) ============================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800;900&display=swap');

/* === Reset moderne minimal =================================== */

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

html, body, h1, h2, h3, h4, h5, h6,
p, blockquote, figure, ul, ol, dl, dd, form { margin: 0; }

ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--rp-noir);
  color: var(--rp-text-main);
  font-family: var(--rp-font-body);
  font-size: var(--rp-fs-body);
  font-weight: var(--rp-fw-body);
  line-height: var(--rp-lh-body);
  letter-spacing: var(--rp-ls-body);
}

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

input, button, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: 0; padding: 0; }

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

/* === Sélection ============================================== */

::selection {
  background: var(--rp-or);
  color: var(--rp-noir);
}

/* === Focus visible (a11y) =================================== */

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--rp-or);
  outline-offset: 3px;
  border-radius: var(--rp-radius-xs);
}

/* === Scrollbar discrète (WebKit/Blink) ====================== */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--rp-noir); }
::-webkit-scrollbar-thumb {
  background: var(--rp-noir-soft);
  border-radius: var(--rp-radius-sm);
}
::-webkit-scrollbar-thumb:hover { background: var(--rp-text-faint); }

/* === Respect des préférences de 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;
  }
}

/* =============================================================
   PLACEHOLDERS MÉDIA INTELLIGENTS
   ============================================================= */

.rp-media-placeholder {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--rp-aspect, 16 / 9);
  background: var(--rp-noir);
  border: 1px solid var(--rp-border-or);
  border-left: 3px solid var(--rp-or);
  border-radius: var(--rp-radius-md);
  overflow: hidden;
  isolation: isolate;
}

/* État "fichier absent" : on affiche le contenu informatif */
.rp-media-placeholder--missing {
  background:
    linear-gradient(135deg, transparent 49.5%, var(--rp-border-faint) 49.5% 50.5%, transparent 50.5%) 0 0 / 14px 14px,
    var(--rp-noir);
}

.rp-media-placeholder__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--rp-space-xs);
  padding: var(--rp-space-md);
}

.rp-media-placeholder__id {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--rp-font-mono);
  font-size: var(--rp-fs-eyebrow);
  font-weight: var(--rp-fw-medium);
  letter-spacing: var(--rp-ls-eyebrow);
  text-transform: uppercase;
  color: var(--rp-or);
  padding: 4px 8px;
  border: 1px solid var(--rp-border-or);
  border-radius: var(--rp-radius-xs);
}

.rp-media-placeholder__spec {
  font-family: var(--rp-font-mono);
  font-size: var(--rp-fs-small);
  color: var(--rp-text-mute);
  letter-spacing: 0.04em;
}

.rp-media-placeholder__desc {
  font-size: var(--rp-fs-small);
  color: var(--rp-text-main);
  line-height: var(--rp-lh-body);
  max-width: 60ch;
}

.rp-media-placeholder__hint {
  margin-top: var(--rp-space-xs);
  font-family: var(--rp-font-mono);
  font-size: 11px;
  color: var(--rp-text-faint);
  letter-spacing: 0.02em;
}

.rp-media-placeholder__hint code {
  color: var(--rp-or-dark);
  background: rgba(201, 168, 76, 0.06);
  padding: 1px 5px;
  border-radius: var(--rp-radius-xs);
}

/* État "fichier monté" : le média prend toute la place, le placeholder
   se transforme en simple wrapper transparent. */
.rp-media-placeholder--loaded {
  border: none;
  background: transparent;
}
.rp-media-placeholder--loaded > .rp-media-placeholder__inner { display: none; }
.rp-media-placeholder--loaded > img,
.rp-media-placeholder--loaded > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Variante "remplit le parent" : pour vidéos background ou héros immersifs.
   On annule l'aspect-ratio et la card prend la taille de son conteneur. */
.rp-media-placeholder--fill {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

/* Petit écran : on resserre l'info */
@media (max-width: 480px) {
  .rp-media-placeholder__inner { padding: var(--rp-space-sm); }
  .rp-media-placeholder__desc   { font-size: 12px; }
}
