/**
 * realisations.css — page Réalisations (index + gabarit détail)
 * Scoping : .page-realisations (grille) et .page-realisation (détail).
 * Mises en situation (cadres écran/smartphone + scène print) 100% CSS.
 * Toutes les valeurs décoratives référencent les tokens dotflo.
 */

/* =========================================================
   RESPIRATION DES SECTIONS (padding vertical généreux)
   ========================================================= */
.page-realisation .block,
.page-realisations .block { padding: clamp(4rem, 9vw, 8rem) 0; }

/* =========================================================
   EN-TÊTE (commun index + détail)
   ========================================================= */
.page-realisation .reha-hero,
.page-realisations .reha-hero {
  padding: calc(var(--space-10) + var(--space-4)) 0 var(--space-8);
  border-bottom: var(--border-width) solid var(--border-color);
}
.reha-hero__inner { display: flex; flex-direction: column; align-items: flex-start; max-width: 52rem; }
.reha-hero .breadcrumb { align-self: flex-start; margin-bottom: var(--space-4); font-size: var(--text-small); }
.reha-hero h1 { margin: var(--space-2) 0 var(--space-3); }
.reha-hero .intro { color: var(--color-neutral-1); max-width: 44rem; }
.reha-hero__cta { margin-top: var(--space-4); }

/* Badges « ce qui a été livré » */
.reha-tags {
  display: flex; flex-wrap: wrap; gap: var(--space-1);
  margin: var(--space-4) 0 0; padding: 0; list-style: none;
}
.reha-tags li {
  font: var(--font-weight-medium) var(--text-label)/1 var(--font-body);
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--color-text);
  padding: 0.5rem 0.85rem;
  border: var(--border-width) solid var(--color-neutral-2);
  border-radius: var(--radius-pill);
  background: var(--color-accent-alpha-10);
}
.reha-tags--sm li { padding: 0.35rem 0.6rem; background: transparent; }

/* Chapeau de section (sous les .section-header) */
.reha-lead { color: var(--color-neutral-1); max-width: 44rem; margin-top: var(--space-2); }

/* =========================================================
   IDENTITÉ VISUELLE — texte + logo
   ========================================================= */
.reha-split { display: grid; gap: var(--space-6); align-items: center; }
.reha-split__text h2 { margin: var(--space-1) 0 var(--space-3); }
.reha-split__text p { color: var(--color-neutral-1); }

.reha-palette {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  margin: var(--space-4) 0 0; padding: 0; list-style: none;
}
.reha-palette li { display: flex; align-items: center; gap: 0.5rem; font-size: var(--text-small); }
.reha-swatch {
  width: 1.5rem; height: 1.5rem; border-radius: var(--radius-sm);
  background: var(--sw); border: var(--border-width) solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.reha-palette__name { color: var(--color-text); }
.reha-palette code { color: var(--color-neutral-1); font-family: var(--font-mono); font-size: 0.8em; }

/* Le logo, présenté sur une carte claire (logo fourni sur fond blanc) */
.reha-logo-stage {
  background: #fff;
  border-radius: var(--radius-lg);
  min-height: 260px;
  display: grid; place-items: center;
  padding: var(--space-6);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.55);
}
.reha-logo-stage img { max-width: 72%; max-height: 220px; height: auto; }

/* =========================================================
   LE SITE — cadre navigateur + smartphone (CSS)
   ========================================================= */
.reha-devices { display: grid; gap: var(--space-6); justify-items: center; }

/* --- Cadre navigateur / desktop --- */
.rd-browser {
  width: 100%;
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
  box-shadow: 0 34px 64px -24px rgba(0, 0, 0, 0.7);
}
.rd-browser__bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  background: var(--color-bg-2);
  border-bottom: var(--border-width) solid var(--border-color);
}
.rd-dot { width: 0.7rem; height: 0.7rem; border-radius: var(--radius-pill); background: #3a464c; }
.rd-dot:nth-child(1) { background: #ff5f57; }
.rd-dot:nth-child(2) { background: #febc2e; }
.rd-dot:nth-child(3) { background: #28c840; }
.rd-browser__url {
  flex: 1; max-width: 22rem; margin-left: 0.6rem;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-neutral-1);
  background: var(--color-bg); border-radius: var(--radius-pill);
  padding: 0.3rem 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rd-browser__screen { background: var(--color-surface); }
.rd-browser__screen img { display: block; width: 100%; height: auto; }
.rd-browser > figcaption,
.rd-phone > figcaption {
  margin-top: var(--space-2); text-align: center;
  font-size: var(--text-small); color: var(--color-neutral-1);
}

/* --- Cadre smartphone --- */
.rd-phone { display: flex; flex-direction: column; align-items: center; }
.rd-phone__frame {
  width: 15rem; max-width: 72vw; aspect-ratio: 9 / 19.5;
  background: #05080a; border: 2px solid #222c31;
  border-radius: 2.2rem; padding: 0.6rem;
  position: relative;
  box-shadow: 0 34px 56px -22px rgba(0, 0, 0, 0.75);
}
.rd-phone__notch {
  position: absolute; top: 0.85rem; left: 50%; transform: translateX(-50%);
  width: 36%; height: 1.1rem; background: #05080a; border-radius: var(--radius-pill); z-index: 2;
}
.rd-phone__screen {
  height: 100%; border-radius: 1.7rem; overflow: hidden; background: var(--color-surface);
}
.rd-phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* =========================================================
   SUPPORTS PRINT — mise en situation (scène CSS)
   ========================================================= */
.reha-print {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
  gap: clamp(2rem, 5vw, 4rem);
  background: radial-gradient(120% 120% at 50% 0%, var(--color-bg-2), var(--color-bg) 70%);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 5vw, 4rem);
}
.rp-item { margin: 0; }
.rp-item figcaption {
  margin-top: var(--space-3); text-align: center;
  font-size: var(--text-small); color: var(--color-neutral-1);
}

/* Cadre commun d'un support : ombre portée + coins arrondis */
.rp-frame {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: 0 26px 50px -18px rgba(0, 0, 0, 0.7);
}
.rp-frame img { display: block; width: 100%; height: auto; }

/* Groupe flyers : 1 ou 2 supports, en aspect NATUREL (portrait ou paysage) */
.rp-flyers {
  flex: 1 1 22rem; max-width: 46rem;
  display: grid; grid-template-columns: 1fr; gap: var(--space-5); align-content: start;
}

/* Groupe cartes : recto + verso (85×55 paysage) */
.rp-cards {
  flex: 0 1 26rem; max-width: 30rem;
  display: grid; gap: var(--space-5); align-content: center;
}
.rp-card .rp-frame { aspect-ratio: 85 / 55; background: #fff; box-shadow: 0 24px 44px -16px rgba(0, 0, 0, 0.7); }
.rp-card .rp-frame img { height: 100%; object-fit: cover; }

/* Simulation de la pliure (dépliant recto/verso) : pli central vertical */
.rp-flyer--folded .rp-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(90deg,
    rgba(0, 0, 0, 0) calc(50% - 20px),
    rgba(0, 0, 0, 0.13) calc(50% - 2px),
    rgba(0, 0, 0, 0.22) 50%,
    rgba(255, 255, 255, 0.13) calc(50% + 2px),
    rgba(0, 0, 0, 0) calc(50% + 20px));
}

/* =========================================================
   PLACEHOLDERS (avant dépôt des visuels)
   ========================================================= */
.reha-ph {
  width: 100%; height: 100%; min-height: 12rem;
  display: grid; place-content: center; gap: 0.35rem; text-align: center; padding: 1rem;
  color: var(--color-neutral-1);
  font: var(--font-weight-medium) var(--text-label)/1.4 var(--font-body);
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  border: 1px dashed var(--color-neutral-2);
  background:
    repeating-linear-gradient(-45deg,
      var(--color-surface) 0, var(--color-surface) 14px,
      var(--color-surface-2) 14px, var(--color-surface-2) 28px);
}
.reha-ph small { text-transform: none; letter-spacing: 0; opacity: 0.75; }
.reha-ph--logo,
.reha-ph--card {
  background: repeating-linear-gradient(-45deg, #fff 0, #fff 14px, #f1f4f6 14px, #f1f4f6 28px);
  color: #8a939a; border-color: #e3e8eb;
}
.reha-ph--flyer { min-height: 20rem; }

/* =========================================================
   INDEX — grille des réalisations
   ========================================================= */
.reha-grid { display: grid; gap: var(--space-5); padding: 0; margin: 0; list-style: none; }
.reha-card { display: flex; }
.reha-card__link {
  display: flex; flex-direction: column; width: 100%;
  background: var(--color-surface);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}
.reha-card__link:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  box-shadow: 0 28px 52px -24px rgba(0, 0, 0, 0.7);
}
.reha-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-bg-2); }
.reha-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.reha-card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.reha-card__title { font-size: var(--text-h3); margin: 0; }
.reha-card__baseline { color: var(--color-neutral-1); margin: 0; }
.reha-card__cta { margin-top: var(--space-1); font-weight: var(--font-weight-medium); }

/* =========================================================
   DESKTOP (≥ 60rem / 960px)
   ========================================================= */
@media (min-width: 60rem) {
  .reha-split { grid-template-columns: 1fr 1fr; gap: var(--space-8); }

  /* Navigateur fluide à gauche, smartphone fixe à droite, alignés en bas */
  .reha-devices {
    grid-template-columns: minmax(0, 1fr) 15rem;
    align-items: end; gap: var(--space-6);
  }

  /* Cartes légèrement inclinées (effet « posées ») */
  .rp-card--recto .rp-frame { transform: rotate(-2.5deg); }
  .rp-card--verso .rp-frame { transform: rotate(2deg); }

  .reha-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 82.5rem) {
  .reha-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Respect des préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  .reha-card__link { transition: none; }
  .rp-card--recto .rp-frame,
  .rp-card--verso .rp-frame { transform: none; }
}
