:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #142033;
  background: #edf3f8;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(91, 184, 255, .22), transparent 30rem),
    radial-gradient(circle at 90% 90%, rgba(75, 211, 164, .19), transparent 32rem),
    linear-gradient(145deg, #f8fbfe, #e8eff6);
}

.page-shell {
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto;
  padding: 70px 0;
}

.hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 38px;
}

.hero-icon {
  display: grid;
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 24px;
  background: linear-gradient(145deg, #1a3a64, #0b1d35);
  box-shadow: 0 16px 30px rgba(14, 38, 69, .22), inset 0 1px 0 rgba(255,255,255,.22);
  color: white;
  font-size: 42px;
}

.hero-icon svg {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 7px 8px rgba(0, 17, 39, .28));
}

.eyebrow {
  margin: 0 0 4px;
  color: #4177a5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 66px);
  letter-spacing: -.055em;
  line-height: 1;
}

.intro {
  margin: 13px 0 0;
  color: #607086;
  font-size: 18px;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project {
  --accent: #3f83c5;
  position: relative;
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 25px 76px 25px 28px;
  border: 1px solid rgba(70, 91, 117, .16);
  border-radius: 24px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 30px rgba(27, 49, 75, .09), inset 0 1px 0 white;
  color: inherit;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.project-group {
  --accent: #3f83c5;
  position: relative;
  min-height: 240px;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(70, 91, 117, .16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent) 13%, transparent), transparent 48%),
    rgba(255, 255, 255, .86);
  box-shadow: 0 14px 34px rgba(27, 49, 75, .1), inset 0 1px 0 white;
}

.project-group::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--accent);
  content: "";
}

.project-group.collège { --accent: #20a77b; }
.project-group.primaire { --accent: #ed9f27; }

.project-group.primaire .group-choices a[dir="rtl"] {
  padding-right: 17px;
  padding-left: 39px;
  text-align: right;
}

.project-group.primaire .group-choices a[dir="rtl"] .choice-arrow {
  right: auto;
  left: 14px;
}

.group-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.group-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 88%, white), var(--accent));
  box-shadow: 0 8px 17px color-mix(in srgb, var(--accent) 23%, transparent), inset 0 1px 0 rgba(255,255,255,.48);
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.group-heading .cycle { display: block; margin-bottom: 3px; }

.group-heading strong {
  display: block;
  font-size: clamp(20px, 2.5vw, 27px);
  letter-spacing: -.025em;
}

.group-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, #dce4eb);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 3px rgba(20, 42, 67, .05);
}

.group-choices a {
  position: relative;
  min-width: 0;
  padding: 16px 39px 15px 17px;
  color: #142033;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.group-choices a + a { border-left: 1px solid color-mix(in srgb, var(--accent) 22%, #dce4eb); }

.group-choices a:hover,
.group-choices a:focus-visible {
  z-index: 1;
  background: color-mix(in srgb, var(--accent) 10%, white);
  outline: 2px solid color-mix(in srgb, var(--accent) 48%, white);
  outline-offset: -2px;
}

.group-choices a > span:first-child {
  display: block;
  font-size: 16px;
  font-weight: 850;
}

.group-choices small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #718096;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-group.lycée .group-choices small,
.project-group.collège .group-choices small {
  overflow: visible;
  line-height: 1.3;
  text-overflow: clip;
  white-space: normal;
}

.choice-arrow {
  position: absolute;
  top: 50%;
  right: 14px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 13%, white);
  color: var(--accent);
  font-size: 17px;
  font-weight: 800;
  transition: transform .2s ease;
}

.group-choices a:hover .choice-arrow { transform: translate(3px, -50%); }

.project::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--accent);
  content: "";
}

.project:hover,
.project:focus-visible {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 55%, white);
  box-shadow: 0 20px 38px rgba(27, 49, 75, .16), inset 0 1px 0 white;
  outline: none;
}

.project.collège { --accent: #20a77b; }
.project.primaire { --accent: #ed9f27; }
.project.exam { --accent: #8b5cf6; }

.cycle {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.project strong {
  font-size: clamp(21px, 3vw, 29px);
  letter-spacing: -.025em;
}

.arrow {
  position: absolute;
  top: 50%;
  right: 27px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
  font-size: 25px;
  transition: transform .2s ease;
}

.project:hover .arrow { transform: translate(4px, -50%); }

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 20px, 520px);
    padding: 24px 0 30px;
  }

  .hero {
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
  }

  .hero-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 28px;
  }

  .hero-icon svg { width: 39px; height: 39px; }

  .eyebrow {
    margin-bottom: 2px;
    font-size: 10px;
    letter-spacing: .1em;
  }

  h1 {
    font-size: clamp(30px, 10vw, 42px);
    letter-spacing: -.045em;
  }

  .intro {
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.35;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-group {
    min-height: 0;
    padding: 15px;
    border-radius: 20px;
  }

  .project-group::before,
  .project::before { width: 5px; }

  .group-heading {
    gap: 10px;
    margin-bottom: 12px;
  }

  .group-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 16px;
  }

  .group-heading .cycle {
    margin-bottom: 1px;
    font-size: 10px;
  }

  .group-heading strong {
    font-size: clamp(17px, 5vw, 21px);
    line-height: 1.12;
  }

  .group-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 14px;
  }

  .group-choices a {
    min-height: 58px;
    padding: 11px 28px 10px 12px;
  }

  .group-choices a + a {
    border-top: 0;
    border-left: 1px solid color-mix(in srgb, var(--accent) 22%, #dce4eb);
  }

  .project-group.primaire .group-choices a[dir="rtl"] {
    padding-right: 12px;
    padding-left: 28px;
  }

  .project-group.primaire .group-choices a[dir="rtl"] .choice-arrow {
    right: auto;
    left: 7px;
  }

  .group-choices a > span:first-child {
    font-size: clamp(12px, 3.7vw, 15px);
    line-height: 1.15;
  }

  .group-choices small {
    margin-top: 2px;
    font-size: clamp(9px, 2.8vw, 11px);
  }

  .choice-arrow {
    right: 7px;
    width: 21px;
    height: 21px;
    font-size: 14px;
  }

  .project {
    min-height: 82px;
    padding: 16px 57px 16px 19px;
    border-radius: 18px;
  }

  .project .cycle {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .project strong {
    font-size: clamp(17px, 5vw, 21px);
    line-height: 1.15;
  }

  .project .arrow {
    right: 17px;
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
}

@media (max-width: 360px) {
  .page-shell { width: calc(100% - 14px); }
  .hero { gap: 10px; }
  .hero-icon { width: 48px; height: 48px; }
  .hero-icon svg { width: 35px; height: 35px; }
  .intro { font-size: 12px; }
  .project-group { padding: 12px; }
  .group-choices a { padding-left: 9px; }
}
