:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --ink: #17211f;
  --muted: #5d6d68;
  --line: #dfe6e1;
  --teal: #16736b;
  --blue: #285a9f;
  --gold: #d69a31;
  --shadow: 0 18px 55px rgba(23, 33, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: rgba(247, 248, 245, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: url("assets/rephraser-ai-logo.svg") center / cover no-repeat;
  color: transparent;
  font-size: 0;
  box-shadow: 0 8px 18px rgba(23, 33, 31, 0.16);
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.3vw, 28px);
  color: var(--muted);
  font-size: 0.94rem;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.language-switcher a:hover,
.language-switcher a[aria-current="page"] {
  border-color: var(--teal);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(48px, 7vw, 92px) clamp(20px, 5vw, 72px);
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.lead {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.button.secondary {
  background: #ffffff;
}

.hero-media img {
  display: block;
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.band {
  background: #ffffff;
  border-block: 1px solid var(--line);
}

.section-inner {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 0;
}

.split,
.support {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 86px);
}

.text-block {
  color: var(--muted);
  font-size: 1.08rem;
}

.feature-list {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding-left: 20px;
}

.feature-list li {
  padding-left: 2px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.plan {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(23, 33, 31, 0.05);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.plan::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--line);
  content: "";
}

.plan:nth-child(1) {
  border-color: #dfe6e1;
}

.plan:nth-child(1)::before {
  background: #dfe6e1;
}

.plan:nth-child(2) {
  border-color: rgba(22, 115, 107, 0.36);
  box-shadow: 0 12px 26px rgba(22, 115, 107, 0.08);
}

.plan:nth-child(2)::before {
  background: var(--teal);
}

.plan:nth-child(3) {
  border-width: 2px;
  border-color: rgba(22, 115, 107, 0.62);
  box-shadow: 0 18px 38px rgba(22, 115, 107, 0.14);
  transform: translateY(-4px);
}

.plan:nth-child(3)::before {
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.plan:nth-child(4) {
  border-width: 2px;
  border-color: rgba(40, 90, 159, 0.64);
  box-shadow: 0 22px 44px rgba(40, 90, 159, 0.16);
  transform: translateY(-8px);
}

.plan:nth-child(4)::before {
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.plan:nth-child(5) {
  border-width: 2px;
  border-color: rgba(23, 33, 31, 0.72);
  box-shadow: 0 28px 58px rgba(23, 33, 31, 0.22);
  transform: translateY(-12px);
}

.plan:nth-child(5)::before {
  background: linear-gradient(90deg, var(--ink), var(--gold));
}

.plan:nth-child(n + 3) h3 {
  color: var(--ink);
}

.plan:nth-child(n + 3) .price {
  color: var(--blue);
}

.plan:nth-child(5) .price {
  color: var(--ink);
}

.plan:hover {
  transform: translateY(-10px);
}

.plan:nth-child(5):hover {
  transform: translateY(-14px);
}

.price {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 6px;
  margin: 16px 0;
  font-size: clamp(1.42rem, 1.85vw, 1.7rem);
  font-weight: 900;
  white-space: nowrap;
}

.price span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.plan p {
  color: var(--muted);
}

/* La phrase descriptive des quotas fait double emploi avec les tuiles et, selon sa
   longueur, decale verticalement les tuiles d'une colonne a l'autre. On la conserve
   pour les lecteurs d'ecran mais on la masque visuellement pour aligner les tuiles. */
.plan > p:not(.price) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Quotas : un seul panneau clair a trois colonnes separees par des filets,
   au lieu de trois petites boites isolees, pour une lecture plus nette. */
.plan-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0 0;
  border: 1px solid rgba(21, 33, 31, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f4f8f8);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.plan-metrics span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px 4px 12px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.plan-metrics span + span {
  border-left: 1px solid rgba(21, 33, 31, 0.08);
}

.plan-metrics strong {
  display: block;
  color: var(--ink);
  font-size: clamp(0.92rem, 1.5vw, 1.12rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

.plan.featured .plan-metrics {
  border-color: rgba(40, 90, 159, 0.22);
  background: linear-gradient(180deg, #ffffff, #eef4fb);
}

.plan:nth-child(n + 3) .plan-metrics strong {
  color: var(--blue);
}

.plan:nth-child(5) .plan-metrics strong {
  color: var(--ink);
}

.plan-features {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.plan-features li {
  position: relative;
  padding-left: 18px;
}

.plan-features li::before {
  position: absolute;
  left: 0;
  color: var(--teal);
  content: "+";
}

.plan-extra {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.plan-extra summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
}

.plan-extra ul {
  display: none;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.plan-extra[open] ul,
.plan-extra:hover ul,
.plan-extra:focus-within ul {
  display: grid;
}

.plan-extra:hover summary,
.plan-extra:focus-within summary {
  color: var(--teal);
}

.premium-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.support-panel {
  padding: 24px;
  border-left: 4px solid var(--gold);
  background: #fbfaf5;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  justify-content: center;
  padding: 26px 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

footer a {
  color: var(--ink);
}

.legal {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) 0;
}

.legal h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
}

.legal h2 {
  margin-top: 38px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.legal p {
  color: var(--muted);
}

@media (max-width: 900px) {
  .site-header,
  .hero,
  .split,
  .support {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
  }

  .language-switcher {
    flex-wrap: wrap;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

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

  .plan,
  .plan:nth-child(3),
  .plan:nth-child(4),
  .plan:nth-child(5),
  .plan:hover,
  .plan:nth-child(5):hover {
    transform: none;
  }
}

@media (max-width: 560px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
