/* ==========================================================================
   TIMOTHÉUS — BUSINESS PLAN INTERACTIF (dans la fiche projet)
   Transposition en CSS simple des éléments du composant "Hero2" :
   fond noir + 3 dégradés flous (violet→bleu, bordeaux→jaune, or→bleu) + grain,
   pastille translucide, grand titre, boutons arrondis, "écran" avec halo blanc.
   ========================================================================== */

.gallery__full {
  grid-column: 1 / -1;
}

.bp {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 16px;
  background: #000;
  color: #fff;
  text-align: center;
}

/* ---- dégradés flous (haut droite) ---- */
.bp__glow {
  position: absolute;
  top: -40px;
  right: -180px;
  z-index: -1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  filter: blur(18px);
  pointer-events: none;
}

.bp__glow i {
  display: block;
  height: 7rem;
  border-radius: 999px;
  filter: blur(4rem);
}

.bp__glow i:nth-child(1) { width: 36rem; background: linear-gradient(180deg, #9333ea, #0284c7); }
.bp__glow i:nth-child(2) { width: 54rem; background: linear-gradient(180deg, #831843, #facc15); }
.bp__glow i:nth-child(3) { width: 36rem; background: linear-gradient(180deg, #ca8a04, #0ea5e9); }

/* ---- grain ---- */
.bp__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.3;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.bp__inner {
  position: relative;
  padding: 22px 26px 30px;
}

/* ---- navigation ---- */
.bp__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-right: 44px; /* laisse la place à la croix de fermeture de la fiche */
}

.bp__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.bp__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 800;
}

.bp__tabs {
  display: flex;
  gap: 18px;
}

.bp__tab {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: #d1d5db;
  transition: color var(--t-fast) ease;
  --hit-x: 6px;
  --hit-y: 5px;
}

.bp__tab:hover,
.bp__tab.is-active {
  color: #fff;
}

.bp__burger,
.bp__close {
  display: none;
  position: relative;
  width: 28px;
  height: 28px;
}

.bp__burger i,
.bp__close i {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 1.5px;
  background: #fff;
}

.bp__burger i:nth-child(1) { top: 8px; }
.bp__burger i:nth-child(2) { top: 13px; }
.bp__burger i:nth-child(3) { top: 18px; }
.bp__close i { top: 13px; transform: rotate(45deg); }
.bp__close i + i { transform: rotate(-45deg); }

/* menu mobile qui descend (équivalent AnimatePresence y: -100% → 0) */
.bp__menu {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 20px;
  background: rgba(0, 0, 0, 0.95);
  text-align: left;
  transform: translateY(-100%);
  transition: transform 300ms var(--ease);
  visibility: hidden;
}

.bp.is-menu .bp__menu {
  transform: none;
  visibility: visible;
}

.bp__menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.bp__menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #1f2937;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 17px;
  text-align: left;
}

.bp__menu-item .bp__arrow {
  stroke: #9ca3af;
}

.bp__arrow {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---- pastille, titre, sous-titre, boutons ---- */
.bp__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-size: 11px;
}

.bp__title {
  max-width: 34rem;
  margin: 22px auto 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.bp__sub {
  max-width: 32rem;
  margin: 16px auto 0;
  color: #d1d5db;
  font-size: 11px;
  line-height: 1.6;
}

.bp__ctas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.bp__btn {
  height: 42px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.03em;
  transition: background var(--t-fast) ease;
}

.bp__btn--solid { background: #fff; color: #000; }
.bp__btn--solid:hover { background: rgba(255, 255, 255, 0.9); }
.bp__btn--ghost { border: 1px solid #4b5563; color: #fff; }
.bp__btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* ---- "écran" : halo blanc + panneau de données ---- */
.bp__screen {
  position: relative;
  margin-top: 34px;
  scroll-margin-top: 12px;
}

.bp__screen-glow {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: #fff;
  filter: blur(5rem);
  opacity: 0.12;
}

.bp__panel {
  position: relative;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 12, 14, 0.88);
  text-align: left;
  transition: opacity 180ms ease, transform 180ms ease;
}

.bp__panel.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

.bp-h {
  margin: 22px 0 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #fff;
}

.bp-h:first-child {
  margin-top: 0;
}

.bp-note {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  line-height: 1.5;
}

.is-neg {
  color: #ff8f8f;
}

/* ---- indicateurs ---- */
.bp-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.bp-kpis--3 {
  grid-template-columns: repeat(3, 1fr);
}

.bp-kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.bp-kpi__k,
.bp-kpi__n {
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  line-height: 1.3;
}

.bp-kpi__v {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---- tableaux ---- */
.bp-table {
  margin-top: 6px;
  font-size: 10.5px;
}

.bp-table + .bp-table {
  margin-top: 14px;
}

.bp-table__row {
  display: grid;
  grid-template-columns: 1.7fr repeat(var(--cols, 3), 1fr);
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-variant-numeric: tabular-nums;
}

.bp-table__row > span:not(:first-child) {
  text-align: right;
}

.bp-table__row small {
  display: block;
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
}

.bp-table__head {
  color: rgba(255, 255, 255, 0.5);
  font-size: 9.5px;
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.bp-table__row.is-strong {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 11px;
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

@media (hover: hover) {
  .bp-table__row:not(.bp-table__head):hover {
    background: rgba(255, 255, 255, 0.05);
  }
}

/* ---- graphiques ---- */
.bp-chart {
  position: relative;
}

.bp-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.bp-grid { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.bp-grid.is-zero { stroke: rgba(255, 255, 255, 0.45); stroke-dasharray: 3 3; }
.bp-axis { fill: rgba(255, 255, 255, 0.45); font-family: var(--font-mono); font-size: 10px; }
.bp-bar { fill: rgba(255, 255, 255, 0.72); transition: fill 120ms ease; }
.bp-bar.is-hot { fill: #fff; }
.bp-line { fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.bp-neg { fill: rgba(255, 110, 110, 0.3); }
.bp-cross { stroke: rgba(255, 255, 255, 0.4); stroke-width: 1; }
.bp-dot { fill: #fff; stroke: #0c0c0e; stroke-width: 2; }
.bp-hit { fill: transparent; cursor: crosshair; }

.bp-tip {
  position: absolute;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #111;
  font-size: 10px;
  white-space: nowrap;
  transform: translate(-50%, -110%);
  pointer-events: none;
}

.bp-tip b {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.bp-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 9.5px;
}

.bp-legend__neg {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  background: rgba(255, 110, 110, 0.45);
}

/* ---- CA par activité ---- */
.bp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.bp-row .bp-h {
  margin: 0;
}

.bp-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bp-seg__btn {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 9.5px;
  color: #d1d5db;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}

.bp-seg__btn.is-on {
  background: #fff;
  color: #000;
}

.bp-mix__row {
  display: grid;
  grid-template-columns: 38% 1fr 108px;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 10.5px;
}

.bp-mix__label small,
.bp-mix__val small {
  display: block;
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
}

.bp-mix__val {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bp-mix__track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bp-mix__track i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 4px;
  background: #fff;
  animation: bp-grow 700ms var(--ease) both;
}

@keyframes bp-grow {
  from { width: 0; }
}

/* ---- listes ---- */
.bp-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.bp-li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 10px;
}

.bp-li span:last-child:not(:first-child) {
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- mobile ---- */
@media (max-width: 640px) {
  .bp__inner { padding: 16px 14px 20px; }
  .bp__tabs { display: none; }
  .bp__burger, .bp__close { display: block; }
  .bp__panel { padding: 14px 12px; }
  .bp-kpis { grid-template-columns: 1fr 1fr; }
  .bp-kpis--3 { grid-template-columns: 1fr; }
  .bp-table { font-size: 9px; }
  .bp-table__row { grid-template-columns: 1.25fr repeat(var(--cols, 3), 1fr); gap: 6px; }
  .bp-table__row.is-strong { font-size: 9.5px; }
  .bp-row { flex-direction: column; align-items: flex-start; }
  .bp-mix__row { grid-template-columns: 1fr 90px; }
  .bp-mix__track { grid-column: 1 / -1; grid-row: 2; }
  .bp-cols { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .bp__menu, .bp__panel { transition: none; }
  .bp-mix__track i { animation: none; }
}

/* ==========================================================================
   ÉTUDE DE CAS (js/casestudy.js) — mêmes bases que le business plan
   ========================================================================== */

/* couleurs des dégradés personnalisables par projet (--g1a, --g1b…) */
.cs .bp__glow i:nth-child(1) { background: linear-gradient(180deg, var(--g1a, #9333ea), var(--g1b, #0284c7)); }
.cs .bp__glow i:nth-child(2) { background: linear-gradient(180deg, var(--g2a, #831843), var(--g2b, #facc15)); }
.cs .bp__glow i:nth-child(3) { background: linear-gradient(180deg, var(--g3a, #ca8a04), var(--g3b, #0ea5e9)); }

/* ---- vignettes cliquables ---- */
.cs-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  grid-auto-flow: dense;
  gap: 10px;
  margin-top: 12px;
}

.cs-thumbs--4 {
  grid-template-columns: repeat(4, 1fr);
}

.cs-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  aspect-ratio: 1;
  --hit-x: 0px;
  --hit-y: 0px;
}

.cs-thumb.hit::after {
  inset: 6px;
  z-index: 1;
}

.cs-thumb--tall { aspect-ratio: 9 / 16; grid-row: span 2; }
.cs-thumb--wide { aspect-ratio: auto; grid-column: 1 / -1; }
.cs-thumbs--4 .cs-thumb--tall { grid-row: auto; aspect-ratio: 1; }

.cs-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}

@media (hover: hover) {
  .cs-thumb:hover img { transform: scale(1.04); }
}

.cs-thumb__cap {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 1;
  max-width: calc(100% - 12px);
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 8.5px;
  line-height: 1.4;
  text-align: left;
}

/* ---- puces de filtre ---- */
.cs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.cs-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 9.5px;
  color: #d1d5db;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}

.cs-chip:hover { color: #fff; }
.cs-chip.is-on { background: #fff; border-color: #fff; color: #000; }

/* ---- planning éditorial ---- */
.cs-week-sub {
  margin: -4px 0 6px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.cs-week-note {
  margin: 0 0 12px;
}

.cs-plan-scroll {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.cs-plan {
  display: grid;
  grid-template-columns: 84px repeat(var(--days), minmax(78px, 1fr));
  gap: 4px;
  min-width: 640px;
  font-size: 9px;
}

.cs-plan__day {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  min-height: 52px;
}

.cs-plan__day b {
  font-family: var(--font-sans);
  font-size: 10.5px;
}

.cs-plan__day span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
  line-height: 1.3;
}

.cs-plan__net {
  display: flex;
  align-items: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 9.5px;
}

.cs-plan__cell {
  min-height: 44px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.1);
  color: #fef3c7;
  font-size: 8.5px;
  line-height: 1.3;
  text-align: left;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease;
}

.cs-plan__cell:not(.is-empty):hover,
.cs-plan__cell.is-on {
  background: #facc15;
  border-color: #facc15;
  color: #000;
}

.cs-plan__cell.is-empty {
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: none;
}

.cs-detail {
  margin-top: 14px;
  min-height: 70px;
}

.cs-detail__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.06);
  animation: cs-in 260ms var(--ease) both;
}

.cs-detail__card b {
  font-family: var(--font-sans);
  font-size: 13px;
}

.cs-detail__card p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

@keyframes cs-in {
  from { opacity: 0; transform: translateY(6px); }
}

/* ---- fiche d'un bar ---- */
.cs-bar {
  animation: cs-in 260ms var(--ease) both;
}

.cs-bar__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.cs-bar__name {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.cs-bar__meta,
.cs-bar__count {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 9.5px;
}

.cs-bar__count { white-space: nowrap; }

.cs-bar__title {
  margin: 14px 0 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
}

.cs-bar__text,
.cs-bar__encart {
  margin: 6px 0 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.cs-bar__encart {
  padding-left: 10px;
  border-left: 2px solid #facc15;
}

.cs-bar__quote {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  color: #facc15;
}

.cs-bar__quote small {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 640px) {
  .cs-thumbs { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .cs-thumbs--4 { grid-template-columns: repeat(2, 1fr); }
  .cs-bar__head { flex-direction: column; gap: 4px; }
}

/* ---- Mobile : textes plus lisibles (business plan + étude de cas) ---- */
@media (max-width: 640px) {
  .bp__sub,
  .bp__badge,
  .bp__btn { font-size: 11px; }
  .bp-h { font-size: 12px; }
  .bp-note,
  .bp-li,
  .bp-mix__row,
  .bp-table { font-size: 10.5px; }
  .bp-table__row.is-strong { font-size: 11px; }
  .bp-table__row small,
  .bp-mix__label small,
  .bp-mix__val small,
  .bp-kpi__k,
  .bp-kpi__n,
  .bp-legend { font-size: 10px; }
  .bp-seg__btn,
  .cs-chip { font-size: 10.5px; }
  .bp-tip { font-size: 11px; }
  /* les graphiques sont réduits à l'écran : on grossit le texte des axes */
  .bp-axis { font-size: 16px; }
  .cs-plan { font-size: 10px; }
  .cs-plan__day span { font-size: 9.5px; }
  .cs-plan__cell { font-size: 10px; }
  .cs-plan__net { font-size: 10.5px; }
  .cs-thumb__cap { font-size: 9.5px; }
  .cs-bar__text,
  .cs-bar__encart,
  .cs-detail__card p { font-size: 11px; }
  .cs-bar__meta,
  .cs-bar__count,
  .cs-bar__quote small { font-size: 10px; }
}

/* 5 années : sur petit écran, les tableaux défilent horizontalement */
.bp-table {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

@media (max-width: 760px) {
  .bp-table[style*="--cols:5"] .bp-table__row {
    min-width: 560px;
  }
}
