:root {
  --green-dark: #1f5f35;
  --green: #3e8b45;
  --green-light: #86c96b;
  --green-soft: #dff4d3;
  --earth: #8b5a35;
  --sky-top: #8ed0ff;
  --sky-bottom: #e7f8ff;
  --yellow: #ffd54f;
  --card-bg: rgba(255, 255, 255, 0.9);
  --text: #1d2c1f;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  --radius: 30px;
  --red: #db4b3f;
  --blue: #3f8edb;

  /* Tri sélectif */
  --c-plastique: #f2cb3d;
  --c-papier: #3f8edb;
  --c-verre: #3fbf5a;
  --c-metal: #9aa5ad;
  --c-inconnu: #db4b3f;
  --belt: #4a5258;
  --belt-dark: #353b40;
  --city-back: #9bb7c4;
  --city-front: #7a9aa8;
  --ground: #6c7a73;
  --path-a: #2f7d4a;
  --path-b: #3a5fb0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom));
  position: relative;
}

a {
  color: var(--green-dark);
  font-weight: bold;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

/* ---------------- Logos ---------------- */

.school-logos {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  max-width: 280px;
}

.school-logo {
  display: block;
  height: auto;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(4px);
}

.logo-main {
  width: 250px;
}

.logo-secondary {
  width: 250px;
}

/* ---------------- Ciel ---------------- */

.sky {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,0.5), transparent 20%),
    radial-gradient(circle at 85% 8%, rgba(255,255,255,0.35), transparent 18%),
    linear-gradient(to bottom, #a9e3dc, #e6f7f1 45%, #cfe6dd 72%, #9fc2b8 100%);
  z-index: -10;
}

.recycle-glow {
  position: fixed;
  top: 30px;
  right: 60px;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  line-height: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.8), rgba(255,255,255,0) 70%);
  opacity: 0.6;
  z-index: -9;
  animation: slowSpin 40s linear infinite;
}

/* Bulles de couleur : de petits déchets qui montent lentement */

.bubble {
  position: fixed;
  bottom: -40px;
  border-radius: 50%;
  opacity: 0.35;
  z-index: -8;
  border: 2px solid rgba(255,255,255,0.7);
  animation: bubbleRise linear infinite;
}

.bubble-1 { left: 6%;  width: 26px; height: 26px; background: var(--c-plastique); animation-duration: 22s; }
.bubble-2 { left: 22%; width: 18px; height: 18px; background: var(--c-papier);    animation-duration: 28s; animation-delay: -8s; }
.bubble-3 { left: 41%; width: 24px; height: 24px; background: var(--c-verre);     animation-duration: 25s; animation-delay: -3s; }
.bubble-4 { left: 63%; width: 20px; height: 20px; background: var(--c-metal);     animation-duration: 30s; animation-delay: -14s; }
.bubble-5 { left: 80%; width: 16px; height: 16px; background: var(--c-plastique); animation-duration: 26s; animation-delay: -18s; }
.bubble-6 { left: 92%; width: 22px; height: 22px; background: var(--c-papier);    animation-duration: 32s; animation-delay: -6s; }

/* ---------------- Décor : centre de tri ---------------- */

.landscape {
  position: fixed;
  inset: 0;
  z-index: -7;
  pointer-events: none;
}

.plant {
  position: absolute;
  left: 0;
  width: 100%;
}

.plant-back {
  bottom: 150px;
  height: 240px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 46px, rgba(255,255,255,0.22) 46px 58px),
    #a8cfc7;
  clip-path: polygon(
    0 100%, 0 30%, 8% 8%, 8% 30%, 16% 8%, 16% 30%, 24% 8%, 24% 30%, 32% 8%, 32% 30%,
    40% 8%, 40% 30%, 48% 8%, 48% 30%, 56% 8%, 56% 30%, 64% 8%, 64% 30%, 72% 8%, 72% 30%,
    80% 8%, 80% 30%, 88% 8%, 88% 30%, 96% 8%, 96% 30%, 100% 30%, 100% 100%
  );
  opacity: 0.85;
}

.plant-front {
  bottom: 150px;
  height: 120px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 70px, rgba(255,255,255,0.18) 70px 78px),
    #7fb0a7;
  clip-path: polygon(
    0 100%, 0 35%, 22% 35%, 22% 8%, 30% 8%, 30% 35%, 62% 35%, 62% 20%, 78% 20%, 78% 35%, 100% 35%, 100% 100%
  );
}

.chimney {
  position: absolute;
  bottom: 330px;
  width: 28px;
  height: 130px;
  background: linear-gradient(90deg, #86b0a8, #9fc5bd);
  border-top: 6px solid #6c958d;
}

.chimney-1 { left: 18%; }
.chimney-2 { left: 57%; height: 100px; }

.chimney::before,
.chimney::after {
  content: "";
  position: absolute;
  top: -22px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  animation: smokeRise 6s ease-out infinite;
}

.chimney::after {
  animation-delay: -3s;
  width: 18px;
  height: 18px;
  left: 6px;
}

.ground {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.12), transparent 12%),
    #5d6d68;
  border-top: 4px solid rgba(255,255,255,0.2);
}

.ground::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 5px;
  background: repeating-linear-gradient(90deg, rgba(233, 211, 107, 0.7) 0 40px, transparent 40px 80px);
}

/* Les quatre bacs de tri */

.bins {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 84px;
  display: flex;
  justify-content: space-around;
  padding: 0 6%;
}

.bin {
  position: relative;
  width: 78px;
  height: 84px;
  border-radius: 6px 6px 10px 10px;
  box-shadow: inset -9px 0 rgba(0,0,0,0.13);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 1.7rem;
}

.bin::before {
  content: "";
  position: absolute;
  top: -11px;
  left: -6px;
  right: -6px;
  height: 13px;
  border-radius: 7px;
  background: inherit;
  filter: brightness(0.86);
}

.bin::after {
  content: "\267B\FE0E";
}

.bin-plastique { background: var(--c-plastique); }
.bin-papier { background: var(--c-papier); }
.bin-verre { background: var(--c-verre); }
.bin-metal { background: var(--c-metal); }

/* Tapis roulant */

.conveyor {
  position: absolute;
  left: 0;
  bottom: 104px;
  width: 100%;
  height: 40px;
}

.belt-surface {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      var(--belt) 0px,
      var(--belt) 26px,
      var(--belt-dark) 26px,
      var(--belt-dark) 52px
    );
  border-top: 5px solid #70787e;
  border-bottom: 5px solid #262b2f;
  animation: beltRun 1.4s linear infinite;
}

.belt-item {
  position: absolute;
  left: -90px;
  bottom: 36px;
  width: 50px;
  height: 64px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: beltMove 16s linear infinite;
}

.belt-item .w-body {
  transform: scale(0.85);
  transform-origin: bottom center;
}

.bi-1 { animation-delay: 0s; }
.bi-2 { animation-delay: -4s; }
.bi-3 { animation-delay: -8s; }
.bi-4 { animation-delay: -12s; }

/* Bras robotisé qui scanne les déchets */

.arm {
  position: absolute;
  left: 58%;
  bottom: 38px;
  width: 0;
  height: 0;
}

.arm-base {
  position: absolute;
  left: -34px;
  bottom: 0;
  width: 68px;
  height: 16px;
  background: #3b4248;
  border-radius: 8px 8px 0 0;
}

.arm-upper {
  position: absolute;
  left: -6px;
  bottom: 12px;
  width: 12px;
  height: 90px;
  background: linear-gradient(90deg, #6a747b, #8d979e);
  border-radius: 6px;
  transform-origin: 50% 100%;
  animation: armUpper 6s ease-in-out infinite;
}

.arm-lower {
  position: absolute;
  left: 1px;
  bottom: calc(100% - 6px);
  width: 10px;
  height: 70px;
  background: linear-gradient(90deg, #7d878e, #a2acb3);
  border-radius: 5px;
  transform-origin: 50% 100%;
  animation: armLower 6s ease-in-out infinite;
}

.arm-head {
  position: absolute;
  left: -7px;
  bottom: calc(100% - 4px);
  width: 24px;
  height: 16px;
  background: #3b4248;
  border-radius: 6px;
}

.arm-eye {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--c-plastique);
  color: var(--c-plastique);
  box-shadow: 0 0 10px 2px currentColor;
  animation: eyeColor 6s steps(1) infinite;
}

/* ---------------- Hero ---------------- */

.hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: 70px 20px 35px;
  text-align: center;
}

.badge {
  display: inline-block;
  background: rgba(255,255,255,0.85);
  color: var(--green-dark);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 0.95rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4rem);
  color: #184c2b;
  text-shadow: 0 3px 0 rgba(255,255,255,0.45);
}

.hero p {
  max-width: 820px;
  margin: 18px auto 0;
  font-size: 1.15rem;
  line-height: 1.7;
  background: rgba(255,255,255,0.68);
  padding: 18px 22px;
  border-radius: 22px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

/* ---------------- Orientation ---------------- */

.orientation-box {
  width: 80%;
  max-width: 1000px;
  margin: 25px auto 35px;
  background: rgba(255,255,255,0.84);
  padding: 28px;
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.17);
  backdrop-filter: blur(6px);
}

.orientation-box h2 {
  margin-top: 0;
  color: var(--green-dark);
}

.orientation-box p {
  line-height: 1.7;
  margin-bottom: 18px;
}

.orientation-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.orientation-links a {
  text-decoration: none;
  background: linear-gradient(135deg, #3e8b45, #2f6b36);
  color: white;
  padding: 16px 18px;
  border-radius: 16px;
  font-weight: bold;
  transition: 0.3s;
  width: 290px;
  display: block;
  box-shadow: 0 12px 20px rgba(47, 107, 54, 0.22);
}

.orientation-links a:hover {
  transform: translateY(-4px);
}

.orientation-links small {
  display: block;
  margin-top: 6px;
  opacity: 0.95;
  font-weight: normal;
}

/* ---------------- Choix du parcours ---------------- */

.path-chooser {
  width: 80%;
  max-width: 1100px;
  margin: 0 auto 35px;
  background: rgba(255,255,255,0.9);
  padding: 28px 32px;
  border-radius: 28px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.17);
  backdrop-filter: blur(6px);
}

.path-chooser h2 {
  margin: 0 0 10px;
  font-size: 1.7rem;
  color: var(--green-dark);
}

.path-chooser p {
  margin: 0 0 14px;
  line-height: 1.7;
  font-size: 1.08rem;
}

.path-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0 22px;
}

.path-btn {
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  background: #f5fbf0;
  border: 3px solid transparent;
  border-radius: 22px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 0 0 1px rgba(31, 95, 53, 0.12), 0 8px 18px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.path-btn:hover {
  transform: translateY(-3px);
}

.path-btn strong {
  font-size: 1.2rem;
  color: var(--green-dark);
}

.path-btn small {
  font-size: 0.98rem;
  line-height: 1.55;
}

.path-btn.active {
  border-color: var(--green);
  background: #e9f8df;
  box-shadow: 0 12px 24px rgba(47, 107, 54, 0.25);
}

.path-btn[data-target="b"].active {
  border-color: var(--path-b);
  background: #e6eefc;
  box-shadow: 0 12px 24px rgba(58, 95, 176, 0.25);
}

.path-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.path-btn .path-pill {
  margin-bottom: 0;
}

.pill-a { background: var(--path-a); }
.pill-b { background: var(--path-b); }

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.compare > div {
  background: rgba(239,255,228,0.7);
  border-radius: 18px;
  padding: 14px 18px;
}

.compare h3 {
  margin: 0 0 6px;
  color: var(--green-dark);
}

.compare p {
  margin: 0;
  font-size: 1rem;
}

/* ---------------- Cartes d'activité ---------------- */

.activities {
  width: 80%;
  max-width: 1100px;
  margin: 30px auto 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

body.show-a .activity-card[data-path="b"],
body.show-b .activity-card[data-path="a"] {
  display: none;
}

.activity-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: var(--card-bg);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.5s ease, box-shadow 0.35s ease, opacity 0.6s ease;
  position: relative;
  overflow: hidden;
}

.activity-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(134, 201, 107, 0.18), transparent 45%);
  pointer-events: none;
}

.activity-card[data-path="b"]::before {
  background: linear-gradient(90deg, rgba(63, 142, 219, 0.16), transparent 45%);
}

.activity-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.activity-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.2);
}

.activity-icon {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
  background: linear-gradient(135deg, #efffe4, #c9f1b6);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.6);
}

.activity-card[data-path="b"] .activity-icon {
  background: linear-gradient(135deg, #eef4ff, #c6d8f7);
}

.activity-content {
  width: 100%;
  min-width: 0;
}

.activity-content h2 {
  margin: 0 0 10px;
  font-size: 1.7rem;
  color: var(--green-dark);
}

.activity-content h3 {
  margin: 14px 0 8px;
  color: var(--green-dark);
}

.activity-content p {
  margin: 0 0 12px;
  font-size: 1.08rem;
  line-height: 1.7;
}

.activity-content ul {
  margin-top: 8px;
  line-height: 1.7;
}

.activity-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.1);
}

.small-note {
  font-size: 0.98rem;
  opacity: 0.9;
}

.todo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.todo-item {
  background: rgba(239,255,228,0.8);
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: bold;
  box-shadow: inset 0 0 0 1px rgba(63, 139, 69, 0.08);
}

.activity-card[data-path="b"] .todo-item {
  background: rgba(230, 238, 252, 0.85);
  box-shadow: inset 0 0 0 1px rgba(58, 95, 176, 0.12);
}

/* ---------------- Les déchets (formes en CSS) ---------------- */

.w-body {
  position: relative;
  display: block;
}

/* Plastique : bouteille */
.is-plastique .w-body {
  width: 26px;
  height: 52px;
  background: linear-gradient(90deg, rgba(242, 203, 61, 0.9), rgba(255, 236, 140, 0.95), rgba(242, 203, 61, 0.9));
  border-radius: 10px 10px 6px 6px;
  border: 2px solid rgba(255,255,255,0.55);
}

.is-plastique .w-body::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 6px;
  width: 10px;
  height: 9px;
  background: #3e8b45;
  border-radius: 3px 3px 0 0;
}

.is-plastique .w-body::after {
  content: "";
  position: absolute;
  top: 22px;
  left: -2px;
  right: -2px;
  height: 12px;
  background: rgba(255,255,255,0.7);
}

/* Papier-carton : boîte */
.is-papier .w-body {
  width: 46px;
  height: 36px;
  background: linear-gradient(135deg, #d2a468, #b98547);
  border-radius: 4px;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.1);
}

.is-papier .w-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 100%;
  margin-left: -4px;
  background: rgba(255, 233, 190, 0.7);
}

.is-papier .w-body::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 6px;
  width: 12px;
  height: 8px;
  background: rgba(255,255,255,0.65);
  border-radius: 2px;
}

/* Verre : bocal */
.is-verre .w-body {
  width: 32px;
  height: 42px;
  background: linear-gradient(90deg, rgba(120, 205, 165, 0.8), rgba(210, 245, 230, 0.85), rgba(120, 205, 165, 0.8));
  border: 3px solid rgba(255,255,255,0.75);
  border-radius: 9px 9px 7px 7px;
}

.is-verre .w-body::before {
  content: "";
  position: absolute;
  top: -12px;
  left: -1px;
  width: 24px;
  height: 9px;
  background: #7a838a;
  border-radius: 3px;
}

.is-verre .w-body::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 4px;
  width: 5px;
  height: 22px;
  background: rgba(255,255,255,0.7);
  border-radius: 3px;
}

/* Métal : canette */
.is-metal .w-body {
  width: 30px;
  height: 44px;
  background: linear-gradient(90deg, #aab3ba, #f1f4f6, #8f9aa2);
  border-radius: 5px;
}

.is-metal .w-body::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 100%;
  height: 9px;
  background: #d5dbe0;
  border-radius: 50%;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
}

.is-metal .w-body::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 0;
  width: 100%;
  height: 10px;
  background: rgba(219, 75, 63, 0.85);
}

/* Inconnu : objet que le modèle n'a jamais vu */
.is-inconnu .w-body {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle at 35% 30%, #d9b5f2, #a46fd1);
  border-radius: 46% 54% 50% 50% / 52% 48% 56% 44%;
}

.is-inconnu .w-body::before {
  content: "?";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: bold;
  color: #fff;
}

/* ---------------- Cartes de la section « déchets à reconnaître » ---------------- */

.mini-items {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
}

.waste-card {
  position: relative;
  width: 120px;
  height: 135px;
  background: linear-gradient(to top, var(--belt) 0 32%, rgba(239,255,228,0.7) 32% 100%);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 46px;
}

.waste-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 43px;
  height: 4px;
  background: #70787e;
}

.waste-card span {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  font-weight: bold;
  color: #fff;
  z-index: 2;
}

.waste-card .w-body {
  transform: translateY(-90px) scale(1.3);
  transform-origin: bottom center;
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.3, 1.3, 0.5, 1), opacity 0.5s ease;
}

.waste-card:nth-child(2) .w-body { transition-delay: 0.12s; }
.waste-card:nth-child(3) .w-body { transition-delay: 0.24s; }
.waste-card:nth-child(4) .w-body { transition-delay: 0.36s; }

.activity-card.dropped .waste-card .w-body {
  transform: translateY(0) scale(1.3);
  opacity: 1;
}

/* ---------------- Légende ---------------- */

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}

.legend-item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(239,255,228,0.7);
  border-radius: 16px;
  padding: 12px;
}

.legend-color {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,0.1);
}

.legend-color.green { background: var(--c-verre); }
.legend-color.yellow { background: var(--c-plastique); }
.legend-color.red { background: var(--c-inconnu); }
.legend-color.blue { background: var(--c-papier); }
.legend-color.grey { background: var(--c-metal); }

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

/* ---------------- Étapes ---------------- */

.steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 12px;
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  background: rgba(239,255,228,0.65);
  border-radius: 20px;
  padding: 16px;
}

.step > div:last-child {
  min-width: 0;
}

.activity-card[data-path="b"] .step {
  background: rgba(230, 238, 252, 0.75);
}

.important-step,
.activity-card[data-path="b"] .important-step {
  background: rgba(255, 245, 210, 0.95);
  box-shadow: inset 0 0 0 2px rgba(242, 203, 61, 0.35);
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3e8b45, #2f6b36);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: bold;
}

.activity-card[data-path="b"] .step-number {
  background: linear-gradient(135deg, #4a74cc, #2f4f96);
}

.important-step .step-number,
.activity-card[data-path="b"] .important-step .step-number {
  background: linear-gradient(135deg, #f2cb3d, #d6a700);
  color: #3a2a00;
}

pre {
  background: #1f2b1f;
  color: #f4fff2;
  padding: 14px;
  border-radius: 14px;
  overflow-x: auto;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0 14px;
}

code {
  background: rgba(0,0,0,0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

pre code {
  background: none;
  padding: 0;
}

.placeholder-photo {
  margin-top: 12px;
  background: rgba(255,255,255,0.7);
  border: 2px dashed rgba(31,95,53,0.35);
  border-radius: 18px;
  padding: 22px;
  text-align: center;
  font-weight: bold;
  color: var(--green-dark);
}

.safety-box {
  margin-top: 12px;
  background: rgba(255, 228, 222, 0.95);
  border-left: 6px solid var(--red);
  border-radius: 14px;
  padding: 14px 18px;
  line-height: 1.6;
}

.safety-box strong {
  display: block;
  margin-bottom: 4px;
  color: #8a2218;
}

.table-wrap {
  overflow-x: auto;
  margin: 12px 0 16px;
}

.map-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.85);
  border-radius: 14px;
  overflow: hidden;
  font-size: 1rem;
}

.map-table th,
.map-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.map-table th {
  background: #e6eefc;
  color: #24407e;
}

.dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(0,0,0,0.12);
}

.dot-yellow { background: var(--c-plastique); }
.dot-blue { background: var(--c-papier); }
.dot-green { background: var(--c-verre); }
.dot-grey { background: var(--c-metal); }

/* ---------------- Réflexion ---------------- */

.reflect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.reflect-card {
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(4px);
  overflow: hidden;
}

.reflect-card summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.reflect-card summary::-webkit-details-marker {
  display: none;
}

.reflect-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reflect-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  padding: 4px 10px;
  border-radius: 999px;
}

.reflect-q {
  font-weight: bold;
  color: var(--green-dark);
  font-size: 1.05rem;
  line-height: 1.35;
}

.reflect-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: transform 0.25s ease;
}

.reflect-card[open] .reflect-icon {
  transform: rotate(45deg);
}

.activity-content .reflect-card p {
  margin: 0;
  padding: 0 20px 20px 20px;
  font-size: 1rem;
  line-height: 1.6;
}

.reflect-note {
  margin-top: 22px;
  background: rgba(255, 245, 210, 0.95);
  box-shadow: inset 0 0 0 2px rgba(242, 203, 61, 0.35);
  border-radius: 20px;
  padding: 18px 22px;
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------------- Mini démo ---------------- */

.ai-demo {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: center;
}

.sample-area {
  background: linear-gradient(to top, var(--belt) 0 24%, #f4fff2 24% 100%);
  border-radius: 24px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(63, 139, 69, 0.14);
}

.sample-area::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24%;
  height: 4px;
  background: #70787e;
}

.bin-light {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #cfd6d3;
  border: 3px solid rgba(0,0,0,0.12);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.bin-light.on-plastique { background: var(--c-plastique); box-shadow: 0 0 18px var(--c-plastique); }
.bin-light.on-papier { background: var(--c-papier); box-shadow: 0 0 18px var(--c-papier); }
.bin-light.on-verre { background: var(--c-verre); box-shadow: 0 0 18px var(--c-verre); }
.bin-light.on-metal { background: var(--c-metal); box-shadow: 0 0 18px var(--c-metal); }
.bin-light.on-doute { background: var(--c-inconnu); box-shadow: 0 0 18px var(--c-inconnu); }

.sample-item {
  position: absolute;
  left: 50%;
  bottom: 24%;
  transform: translateX(-50%);
  width: 60px;
  display: flex;
  justify-content: center;
}

.sample-item .w-body {
  transform: scale(2.1);
  transform-origin: bottom center;
  transition: transform 0.3s ease;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  background: linear-gradient(135deg, #3e8b45, #2f6b36);
  color: white;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.demo-btn:hover {
  transform: translateY(-2px);
}

.demo-btn.danger {
  background: linear-gradient(135deg, #b95339, #94331e);
}

.result-box {
  margin-top: 16px;
  background: rgba(239,255,228,0.7);
  border-radius: 18px;
  padding: 18px;
}

.result-box h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
}

.confidence-wrap {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  overflow: hidden;
  margin: 12px 0 10px;
}

.confidence-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7dcf66, #2f8b3a);
  transition: width 0.6s ease, background 0.3s ease;
}

.confidence-bar.low {
  background: linear-gradient(90deg, #f0a08a, #db4b3f);
}

.ai-explanation {
  font-size: 0.98rem;
}

.ai-action {
  font-weight: bold;
  min-height: 1.4em;
  margin: 10px 0 0;
}

.footer {
  text-align: center;
  padding: 20px 20px 40px;
  color: #184c2b;
  font-weight: bold;
}

/* ---------------- Animations ---------------- */

@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bubbleRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-110vh) translateX(30px); opacity: 0; }
}

@keyframes smokeRise {
  0% { transform: translateY(0) scale(0.6); opacity: 0.85; }
  100% { transform: translateY(-70px) translateX(18px) scale(1.8); opacity: 0; }
}

@keyframes armUpper {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(14deg); }
}

@keyframes armLower {
  0%, 100% { transform: rotate(30deg); }
  50% { transform: rotate(-35deg); }
}

@keyframes eyeColor {
  0% { background: var(--c-plastique); color: var(--c-plastique); }
  25% { background: var(--c-papier); color: var(--c-papier); }
  50% { background: var(--c-verre); color: var(--c-verre); }
  75% { background: var(--c-metal); color: var(--c-metal); }
}

@keyframes beltRun {
  from { background-position: 0 0; }
  to { background-position: 52px 0; }
}

@keyframes beltMove {
  from { left: -90px; }
  to { left: 105%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .recycle-glow, .bubble, .belt-surface, .belt-item, .arm-upper, .arm-lower, .arm-eye,
  .chimney::before, .chimney::after { animation: none; }
  .belt-item.bi-1 { left: 10%; }
  .belt-item.bi-2 { left: 30%; }
  .belt-item.bi-3 { left: 75%; }
  .belt-item.bi-4 { left: 90%; }
  .activity-card,
  .waste-card .w-body {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .waste-card .w-body { transform: scale(1.3); }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 980px) {
  .activities,
  .orientation-box,
  .path-chooser {
    width: 90%;
  }

  .ai-demo,
  .two-columns,
  .path-buttons,
  .compare {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .hero {
    padding-top: 50px;
  }

  .activity-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
  }

  .path-chooser {
    padding: 22px;
  }

  .activity-icon {
    width: 74px;
    height: 74px;
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .activity-content h2 {
    font-size: 1.4rem;
  }

  .activity-content p {
    font-size: 1rem;
  }

  .recycle-glow {
    width: 90px;
    height: 90px;
    right: 24px;
    font-size: 3.4rem;
  }

  .bins {
    padding: 0 2%;
  }

  .bin {
    width: 56px;
    height: 70px;
  }

  .mini-items {
    justify-content: center;
  }

  .button-row {
    flex-direction: column;
  }

  .step {
    grid-template-columns: 1fr;
  }

  .step-number {
    width: 48px;
    height: 48px;
  }

  .arm {
    left: 40%;
  }
}

@media (max-width: 900px) {
  .school-logos {
    position: static;
    margin: 14px 14px 0;
    max-width: none;
  }

  .logo-main,
  .logo-secondary {
    width: min(260px, 70vw);
  }

  .hero {
    padding: 30px 20px 35px;
  }
}
