/* ============================================
   Cours jeunes — habillage ludique « aquarium »
   Hublots de l'équipe, poissons qui dépassent des encadrés, vagues,
   séance en ruisseau, photos à autocollants.
   Les blocs « eau » restent sombres dans les deux thèmes : leurs couleurs
   de texte sont redéfinies localement, comme pour .cta-banner.
   ============================================ */

.cj-water {
  --water: #0d1b26;
  --water-2: #10283a;
  --turquoise: #3cc2c8;
  --bubble: #9fe0ee;
  --brass: #b08d3a;
  --color-cream: #f5f0e8;
  --color-cream-dim: #d4cfc7;
  color: var(--color-cream);
}

/* ---------- Bulle de BD ---------- */
.say {
  position: absolute;
  background: #f5f0e8;
  color: #0a0a0a;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.2;
  padding: 5px 10px;
  border-radius: 14px;
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
  z-index: 3;
}

.say::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 14px;
  border: 6px solid transparent;
  border-top-color: #f5f0e8;
  border-bottom: 0;
}

/* ---------- Hero : l'aquarium et l'équipage ---------- */
.cj-hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-32) 0 var(--space-20);
  background: radial-gradient(ellipse at 75% 0%, var(--water-2) 0%, var(--water) 65%);
}

.cj-hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-10);
  align-items: center;
}

.cj-eyebrow {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--turquoise);
  font-weight: 700;
}

.cj-hero h1 {
  font-size: var(--text-5xl);
  font-weight: 900;
  margin: var(--space-2) 0 var(--space-4);
  color: var(--color-cream);
}

.cj-hero h1 em {
  font-style: normal;
  color: var(--color-gold);
}

.cj-lead {
  font-size: var(--text-lg);
  color: var(--color-cream-dim);
  max-width: 44ch;
  margin-bottom: var(--space-6);
}

.cj-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-cream-dim);
}

.cj-facts b { color: var(--color-gold); }

/* Quatre hublots, une tête et un accessoire chacun */
.crew {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-6);
  width: min(100%, 430px);
  margin: 0 auto;
  padding-bottom: var(--space-6);
}

.crew-member { margin: 0; text-align: center; min-width: 0; }
.crew-member:nth-child(2n) { transform: translateY(28px); }

.port {
  position: relative;
  width: 100%;
  max-width: 190px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  padding: 8%;
  background: radial-gradient(circle at 30% 25%, #e7c873, #b08d3a 48%, #6e5420 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), inset 0 0 0 3px rgba(0, 0, 0, 0.25);
}

.face { position: relative; width: 100%; height: 100%; }
.face picture { display: block; width: 100%; height: 100%; }

.face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #3b2c10;
}

.face .glass {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.26), transparent 42%);
  pointer-events: none;
}

.acc {
  position: absolute;
  overflow: visible;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

/* Le bandeau et la pipe sont dessinés dans le repère de la photo (0–100) */
.acc-patch,
.acc-pipe { left: 0; top: 0; width: 100%; height: 100%; }
.acc-cap { left: 16%; top: -9%; width: 68%; transform: rotate(-4deg); }
.acc-bachi { left: 23%; top: 9%; width: 52%; transform: rotate(6deg); }

.plaque {
  display: inline-block;
  margin-top: var(--space-3);
  background: linear-gradient(180deg, #e7c873, #b08d3a);
  color: #2b1a10;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.3;
  padding: 3px 12px;
  border-radius: 6px;
  box-shadow: 0 2px 0 #6e5420;
}

.plaque small {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.crew .crew-fish {
  position: absolute;
  width: 110px;
  right: -34px;
  top: -34px;
  transform: rotate(-8deg);
  z-index: 3;
}

/* Banc de poissons et bulles */
.swim {
  position: absolute;
  left: 0;
  z-index: 1;
  animation: cj-swim 16s linear infinite;
}

.swim-1 { bottom: 34px; width: 56px; }
.swim-2 { bottom: 14px; width: 44px; animation-delay: -0.6s; }
.swim-3 { bottom: 8px; width: 120px; animation-delay: 2.2s; }

@keyframes cj-swim {
  from { transform: translateX(-200px); }
  to { transform: translateX(calc(100vw + 200px)); }
}

.cj-bubbles span {
  position: absolute;
  bottom: -20px;
  border: 2px solid var(--bubble);
  border-radius: 50%;
  opacity: 0.55;
  animation: cj-rise linear infinite;
}

@keyframes cj-rise {
  from { transform: translateY(0); opacity: 0.6; }
  to { transform: translateY(-560px); opacity: 0; }
}

/* Vague de transition */
.cj-wave {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: -1px;
}

.cj-wave path { fill: #0d1b26; }

/* ---------- Groupes : les poissons dépassent des encadrés ---------- */
.fish-tiers { padding-top: 64px; row-gap: 80px; }

@media (min-width: 760px) {
  .fish-tiers { row-gap: var(--space-6); }
}

.fish-tier { padding-top: 76px; }

.fish-tier .fish-art {
  position: absolute;
  top: -62px;
  left: 50%;
  width: var(--w);
  max-width: none;
  transform: translateX(-50%);
  animation: cj-bob 3.6s ease-in-out infinite;
}

.fish-tier--small { --w: 130px; }
.fish-tier--salmon { --w: 170px; }
.fish-tier--shark { --w: 200px; }
.fish-tier--salmon .fish-art { animation-delay: -1.2s; }
.fish-tier--shark .fish-art { animation-delay: -2.4s; }

@keyframes cj-bob {
  0%, 100% { transform: translate(-50%, 0) rotate(-2deg); }
  50% { transform: translate(-50%, -8px) rotate(2deg); }
}

.fish-tier .say { top: -54px; right: 14px; }

.fish-tag {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fish);
  border: 1px dashed var(--fish);
  border-radius: var(--radius-full);
  padding: 3px 12px;
}

.upstream {
  margin: var(--space-8) auto 0;
  max-width: 760px;
  display: flex;
  gap: var(--space-4);
  align-items: center;
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  border: var(--border-subtle);
}

.upstream svg { flex: 0 0 74px; height: 42px; }
.upstream p { color: var(--color-cream-dim); font-size: var(--text-sm); min-width: 0; margin: 0; }
.upstream strong { color: var(--color-gold); }

/* ---------- Séance : un ruisseau et des bulles-étapes ---------- */
.session-flow .session-steps { position: relative; gap: var(--space-5); }

.session-flow .session-steps li {
  align-items: center;
  text-align: center;
  background: none;
  border-top: 0;
  padding: 0 var(--space-3);
}

.session-flow .session-time {
  order: -1;
  width: 86px;
  height: 86px;
  margin-bottom: var(--space-3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.2;
  background: #10283a;
  color: #f5f0e8;
  border: 3px solid #3cc2c8;
  box-shadow: 0 0 0 6px var(--color-bg-primary);
  position: relative;
  z-index: 1;
  text-transform: none;
  font-size: var(--text-sm);
  align-content: center;
  gap: 2px;
}

.session-flow .session-time small {
  display: block;
  font-size: 0.7rem;
  color: #3cc2c8;
}

.session-flow .session-name { color: var(--color-gold); }

@media (min-width: 640px) {
  .session-flow .session-steps::before {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    top: 40px;
    height: 6px;
    border-radius: 6px;
    background: repeating-linear-gradient(90deg, #3cc2c8 0 18px, transparent 18px 30px);
    opacity: 0.5;
  }

  .stream-fish {
    position: absolute;
    top: 18px;
    left: 8%;
    width: 46px;
    z-index: 0;
    animation: cj-stream 9s ease-in-out infinite;
  }
}

@media (max-width: 639px) {
  .stream-fish { display: none; }
}

@keyframes cj-stream {
  0% { left: 8%; transform: none; }
  50% { left: calc(92% - 46px); transform: none; }
  50.01% { transform: scaleX(-1); }
  100% { left: 8%; transform: scaleX(-1); }
}

/* ---------- Photos : cadres penchés et autocollants ---------- */
.cj-photos { margin: 0 auto var(--space-12); }

.cj-photos h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-gold);
  text-align: center;
}
.cj-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-8);
}

.cj-shot { position: relative; margin: 0; }

.cj-shot .frame {
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid #f5f0e8;
  transform: rotate(var(--r));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  background: var(--color-bg-card);
}

.cj-shot img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.cj-shot figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-cream-dim);
  text-align: center;
}

.cj-shot .sticker {
  position: absolute;
  width: 74px;
  z-index: 2;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.4));
}

.cj-shot:nth-child(1) { --r: -2.5deg; }
.cj-shot:nth-child(2) { --r: 1.8deg; }
.cj-shot:nth-child(3) { --r: -1.2deg; }
.cj-shot:nth-child(4) { --r: 2.4deg; }
.cj-shot:nth-child(1) .sticker { top: -22px; left: -16px; transform: rotate(-14deg); }
.cj-shot:nth-child(2) .sticker { bottom: 26px; right: -22px; width: 90px; transform: rotate(10deg); }
.cj-shot:nth-child(4) .sticker { top: -26px; right: -18px; width: 110px; transform: rotate(8deg) scaleX(-1); }

/* ---------- Entraîneurs : mini-hublot + poisson du groupe ---------- */
.instructor-avatar.mini-port {
  position: relative;
  width: 120px;
  height: 120px;
  padding: 6px;
  border: 0;
  overflow: visible;
  background: radial-gradient(circle at 30% 25%, #e7c873, #b08d3a 50%, #6e5420);
}

.mini-port .face img { border-width: 2px; }

.mini-port .tag-fish {
  position: absolute;
  right: -40px;
  bottom: -8px;
  width: var(--fw, 70px);
  z-index: 2;
}

/* ---------- Bandeau final : le trio ---------- */
.cta-trio {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

/* ---------- Téléphone ---------- */
@media (max-width: 860px) {
  .cj-hero .container { grid-template-columns: 1fr; }
  .cj-gallery { grid-template-columns: 1fr 1fr; }
  .crew .crew-fish { right: -12px; width: 90px; }
  .cj-shot:nth-child(2) .sticker { right: -6px; width: 72px; }
  .cj-shot:nth-child(4) .sticker { right: -6px; width: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .swim { display: none; }
  .cj-bubbles span,
  .fish-tier .fish-art,
  .stream-fish { animation: none; }
}
