/* =========================================================
   INFINISTORIES — PRICING
   Direction artistique : livre ancien / conte illustré
========================================================= */


/* =========================================================
   VARIABLES
========================================================= */

:root {
  --paper: #f7f0df;
  --paper-light: #fbf7ec;
  --paper-dark: #eee2c8;

  --ink: #34271d;
  --ink-soft: #655446;
  --ink-muted: #8a7865;

  --brown: #593d29;
  --brown-dark: #3e2b1e;

  --gold: #b58a45;
  --gold-dark: #8f682e;
  --gold-light: #d7b875;

  --red: #8c4638;
  --red-dark: #71362d;

  --green: #596b4d;

  --border: rgba(89, 61, 41, 0.22);
  --border-strong: rgba(89, 61, 41, 0.38);

  --shadow-sm:
    0 4px 12px rgba(62, 43, 30, 0.08);

  --shadow:
    0 12px 30px rgba(62, 43, 30, 0.12);

  --shadow-lg:
    0 20px 45px rgba(62, 43, 30, 0.17);

  --radius: 14px;
  --radius-lg: 20px;

  --serif: "Playfair Display", Georgia, serif;
  --sans: "Quicksand", Arial, sans-serif;
}


/* =========================================================
   RESET
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.65),
      transparent 40%
    ),
    var(--paper);

  color: var(--ink);

  font-family: var(--sans);
  line-height: 1.6;

  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   TEXTURE DU PAPIER
========================================================= */

.pricing-page {
  position: relative;
  overflow: hidden;
}

.pricing-page::before {
  content: "";
  position: fixed;
  inset: 0;

  pointer-events: none;
  z-index: 100;

  opacity: 0.16;

  background-image:
    radial-gradient(
      rgba(89, 61, 41, 0.18) 0.6px,
      transparent 0.6px
    );

  background-size: 5px 5px;
}


/* =========================================================
   ÉLÉMENTS ORNEMENTAUX
========================================================= */

.pricing-page::after {
  content: "✦";

  position: absolute;
  top: 140px;
  right: 5%;

  font-family: var(--serif);
  font-size: 5rem;

  color: rgba(181, 138, 69, 0.13);

  pointer-events: none;
}


/* =========================================================
   HERO
========================================================= */

.pricing-hero {
  position: relative;

  min-height: 500px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 110px 24px 90px;

  text-align: center;

  border-bottom: 1px solid var(--border);

  background:
    linear-gradient(
      rgba(247, 240, 223, 0.9),
      rgba(247, 240, 223, 0.96)
    );
}


/* Coins décoratifs du "livre" */

.pricing-hero::before,
.pricing-hero::after {
  content: "";

  position: absolute;

  width: 130px;
  height: 130px;

  border: 1px solid rgba(181, 138, 69, 0.35);

  pointer-events: none;
}

.pricing-hero::before {
  top: 32px;
  left: 32px;

  border-right: none;
  border-bottom: none;
}

.pricing-hero::after {
  right: 32px;
  bottom: 32px;

  border-left: none;
  border-top: none;
}


/* =========================================================
   BOUTON RETOUR
========================================================= */

.btn-return {
  position: absolute;

  top: 28px;
  left: 32px;

  display: inline-flex;
  align-items: center;
  gap: 9px;

  padding: 9px 16px;

  border: 1px solid var(--border);
  border-radius: 999px;

  background: rgba(251, 247, 236, 0.75);

  color: var(--brown);

  font-size: 0.9rem;
  font-weight: 600;

  text-decoration: none;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.btn-return:hover {
  background: var(--paper-light);
  border-color: var(--gold);
  transform: translateX(-3px);
}


/* =========================================================
   HERO CONTENT
========================================================= */

.pricing-hero-content {
  position: relative;
  z-index: 2;

  max-width: 760px;
  margin: 0 auto;
}

.pricing-book-icon {
  width: 72px;
  height: 72px;

  margin: 0 auto 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--gold);

  border-radius: 50%;

  color: var(--gold-dark);

  background:
    radial-gradient(
      circle,
      rgba(181, 138, 69, 0.08),
      transparent 70%
    );

  font-family: var(--serif);
  font-size: 1.8rem;

  box-shadow:
    0 0 0 7px rgba(181, 138, 69, 0.06);
}

.eyebrow {
  margin-bottom: 10px;

  color: var(--gold-dark);

  font-size: 0.78rem;
  font-weight: 700;

  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.pricing-hero h1 {
  margin-bottom: 20px;

  color: var(--brown-dark);

  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;

  line-height: 1.1;
}

.pricing-intro {
  max-width: 650px;
  margin: 0 auto;

  color: var(--ink-soft);

  font-size: 1.12rem;
}


/* =========================================================
   SECTIONS
========================================================= */

.plans-section,
.comparison-section,
.upgrade-section {
  max-width: 1400px;

  margin: 0 auto;

  padding: 90px 28px;
}

.section-heading {
  max-width: 750px;

  margin: 0 auto 55px;

  text-align: center;
}

.section-ornament {
  display: block;

  margin-bottom: 10px;

  color: var(--gold);

  font-family: var(--serif);
  font-size: 1.5rem;
}

.section-heading h2 {
  margin-bottom: 14px;

  color: var(--brown-dark);

  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;

  line-height: 1.2;
}

.section-heading p {
  color: var(--ink-soft);

  font-size: 1rem;
}


/* =========================================================
   GRILLE DES FORMULES
========================================================= */

.plans-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 20px;

  align-items: stretch;
}


/* =========================================================
   CARTE FORMULE
========================================================= */

.plan-card {
  position: relative;

  display: flex;
  flex-direction: column;

  min-width: 0;

  overflow: hidden;

  border: 1px solid var(--border);

  border-radius: var(--radius-lg);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.45),
      rgba(238,226,200,0.35)
    ),
    var(--paper-light);

  box-shadow: var(--shadow-sm);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.plan-card:hover {
  transform: translateY(-7px);

  border-color: var(--border-strong);

  box-shadow: var(--shadow);
}


/* =========================================================
   VARIANTES
========================================================= */

.plan-free {
  background:
    linear-gradient(
      180deg,
      #fbf7ec,
      #f2e8d1
    );
}

.plan-essential {
  background:
    linear-gradient(
      180deg,
      #f9f1df,
      #ecdfc4
    );
}

.plan-premium {
  background:
    linear-gradient(
      180deg,
      #fbf4e4,
      #ead8b7
    );
}

.plan-ultimate {
  background:
    linear-gradient(
      180deg,
      #f5ead4,
      #e5cfaa
    );
}


/* =========================================================
   FORMULE PREMIUM
========================================================= */

.featured-plan {
  border: 2px solid var(--gold);

  box-shadow:
    0 15px 38px rgba(143, 104, 46, 0.18);

  transform: translateY(-8px);
}

.featured-plan:hover {
  transform: translateY(-13px);

  box-shadow:
    0 22px 48px rgba(143, 104, 46, 0.23);
}


/* =========================================================
   RUBAN PREMIUM
========================================================= */

.plan-ribbon {
  position: absolute;

  top: 17px;
  right: -38px;

  width: 170px;

  padding: 7px 8px;

  transform: rotate(7deg);

  text-align: center;

  background: var(--gold-dark);

  color: #fff8e9;

  font-size: 0.72rem;
  font-weight: 700;

  letter-spacing: 0.04em;

  box-shadow: var(--shadow-sm);
}

.plan-ribbon span {
  margin: 0 4px;

  color: var(--gold-light);
}


/* =========================================================
   HEADER CARTE
========================================================= */

.plan-header {
  padding: 30px 25px 20px;

  text-align: center;

  border-bottom: 1px solid var(--border);
}

.plan-label {
  display: inline-block;

  margin-bottom: 8px;

  color: var(--gold-dark);

  font-size: 0.76rem;
  font-weight: 700;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-name {
  margin-bottom: 14px;

  color: var(--brown-dark);

  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
}

.plan-price {
  display: flex;

  justify-content: center;
  align-items: baseline;

  gap: 3px;

  color: var(--brown-dark);

  font-family: var(--serif);
}

.price-value {
  font-size: 2.9rem;
  font-weight: 600;

  line-height: 1;
}

.price-currency {
  font-size: 1.25rem;
}

.plan-price-note {
  margin-top: 8px;

  color: var(--ink-muted);

  font-size: 0.8rem;
}


/* =========================================================
   CONTENU CARTE
========================================================= */

.plan-main {
  flex: 1;

  padding: 22px;
}


/* =========================================================
   HIGHLIGHTS
========================================================= */

.plan-highlight {
  margin-bottom: 20px;

  padding: 16px;

  border: 1px solid rgba(181, 138, 69, 0.28);

  border-radius: 12px;

  background:
    rgba(255, 250, 238, 0.52);
}

.highlight-item {
  display: flex;
  align-items: center;

  gap: 12px;

  color: var(--ink-soft);
}

.highlight-item + .highlight-item {
  margin-top: 14px;

  padding-top: 14px;

  border-top: 1px solid var(--border);
}

.highlight-icon {
  flex: 0 0 auto;

  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: var(--gold-dark);

  background: rgba(181, 138, 69, 0.11);

  font-size: 1rem;
}

.highlight-item div {
  display: flex;
  flex-direction: column;
}

.highlight-item strong {
  color: var(--brown);

  font-size: 0.95rem;
}

.highlight-item span {
  color: var(--ink-muted);

  font-size: 0.76rem;
}


/* =========================================================
   LISTE FONCTIONNALITÉS
========================================================= */

.plan-features {
  list-style: none;
}

.plan-features li {
  display: flex;
  align-items: flex-start;

  gap: 9px;

  padding: 8px 0;

  border-bottom: 1px dashed rgba(89, 61, 41, 0.14);

  color: var(--ink-soft);

  font-size: 0.84rem;
}

.plan-features li:last-child {
  border-bottom: none;
}

.plan-features li > span {
  flex: 0 0 auto;

  width: 18px;

  text-align: center;
}

.plan-features .available > span {
  color: var(--green);

  font-weight: 700;
}

.plan-features .unavailable {
  color: #9b8c7b;
}

.plan-features .unavailable > span {
  color: #b0a294;
}

.plan-features .highlight-feature {
  color: var(--brown);

  font-weight: 600;
}

.plan-features .highlight-feature > span {
  color: var(--gold-dark);
}


/* =========================================================
   FOOTER CARTE / CTA
========================================================= */

.plan-footer {
  padding: 20px 22px 24px;
}

.btn-plan {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;

  min-height: 48px;

  padding: 11px 16px;

  border-radius: 999px;

  font-size: 0.9rem;
  font-weight: 700;

  text-align: center;
  text-decoration: none;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

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

.btn-plan-primary {
  background: var(--brown);

  color: #fff8ea;

  box-shadow:
    0 5px 14px rgba(62, 43, 30, 0.16);
}

.btn-plan-primary:hover {
  background: var(--brown-dark);

  box-shadow:
    0 8px 18px rgba(62, 43, 30, 0.2);
}

.btn-plan-secondary {
  border: 1px solid var(--border-strong);

  background: transparent;

  color: var(--brown);
}

.btn-plan-secondary:hover {
  background: rgba(255,255,255,0.45);
}

.btn-plan-featured {
  background: var(--gold-dark);

  color: #fff9ed;

  box-shadow:
    0 6px 16px rgba(143, 104, 46, 0.22);
}

.btn-plan-featured:hover {
  background: #7d5928;

  box-shadow:
    0 9px 22px rgba(143, 104, 46, 0.28);
}


/* =========================================================
   COMPARATEUR
========================================================= */

.comparison-section {
  max-width: 1500px;
}

.comparison-wrapper {
  width: 100%;

  overflow-x: auto;

  border: 1px solid var(--border);

  border-radius: var(--radius-lg);

  background: var(--paper-light);

  box-shadow: var(--shadow);

  scrollbar-color:
    var(--gold)
    var(--paper-dark);

  scrollbar-width: thin;
}

.comparison-table {
  width: 100%;

  min-width: 900px;

  border-collapse: collapse;

  color: var(--ink);

  font-size: 0.9rem;
}

.comparison-table caption {
  position: absolute;

  width: 1px;
  height: 1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);
}

.comparison-table th,
.comparison-table td {
  padding: 15px 16px;

  border-bottom: 1px solid rgba(89, 61, 41, 0.12);

  text-align: center;
}

.comparison-table thead th {
  position: relative;

  padding: 22px 15px;

  background: #eadcc1;

  color: var(--brown-dark);
}

.comparison-table .feature-column {
  width: 34%;

  text-align: left;
}

.table-plan-name {
  display: block;

  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.table-plan-price {
  display: block;

  margin-top: 3px;

  color: var(--ink-muted);

  font-size: 0.75rem;
}

.comparison-table tbody th {
  color: var(--ink-soft);

  font-weight: 600;

  text-align: left;
}

.comparison-table tbody td {
  color: var(--ink-soft);
}

.comparison-table tbody tr:not(.comparison-category):hover {
  background: rgba(181, 138, 69, 0.055);
}


/* =========================================================
   COLONNE PREMIUM
========================================================= */

.table-featured {
  position: relative;

  background:
    rgba(181, 138, 69, 0.075);

  box-shadow:
    inset 1px 0 rgba(181, 138, 69, 0.25),
    inset -1px 0 rgba(181, 138, 69, 0.25);
}

.comparison-table thead .table-featured {
  background:
    linear-gradient(
      180deg,
      #d9bd87,
      #ceb073
    );

  color: var(--brown-dark);
}

.table-popular {
  display: inline-block;

  margin-bottom: 6px;

  padding: 3px 8px;

  border-radius: 999px;

  background: var(--brown);

  color: #fff8eb;

  font-family: var(--sans);

  font-size: 0.65rem;
  font-weight: 700;

  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* =========================================================
   CATÉGORIES DU TABLEAU
========================================================= */

.comparison-category th {
  padding: 13px 16px;

  background:
    linear-gradient(
      90deg,
      rgba(181, 138, 69, 0.15),
      rgba(181, 138, 69, 0.04)
    );

  color: var(--brown);

  font-family: var(--serif);

  font-size: 0.95rem;

  text-align: left !important;
}

.comparison-category th span {
  margin-right: 8px;
}


/* =========================================================
   CHECK / CROSS
========================================================= */

.check,
.cross {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  width: 25px;
  height: 25px;

  border-radius: 50%;

  font-weight: 700;
}

.check {
  background: rgba(89, 107, 77, 0.11);

  color: var(--green);
}

.cross {
  color: #aa9a88;
}


/* =========================================================
   UPGRADE
========================================================= */

.upgrade-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 22px;
}

.upgrade-card {
  display: flex;

  gap: 18px;

  padding: 25px;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,0.48),
      rgba(238,226,200,0.38)
    );

  box-shadow: var(--shadow-sm);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.upgrade-card:hover {
  transform: translateY(-5px);

  box-shadow: var(--shadow);
}

.upgrade-number {
  flex: 0 0 auto;

  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--gold);

  border-radius: 50%;

  color: var(--gold-dark);

  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
}

.upgrade-from {
  display: inline-block;

  margin-bottom: 7px;

  color: var(--gold-dark);

  font-size: 0.72rem;
  font-weight: 700;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.upgrade-content h3 {
  margin-bottom: 9px;

  color: var(--brown-dark);

  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.3;
}

.upgrade-content p {
  color: var(--ink-soft);

  font-size: 0.88rem;
}


/* =========================================================
   CTA FINAL
========================================================= */

.pricing-cta {
  position: relative;

  max-width: 1000px;

  margin: 20px auto 100px;

  padding: 70px 30px;

  text-align: center;

  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);

  background:
    linear-gradient(
      180deg,
      rgba(238, 226, 200, 0.45),
      rgba(247, 240, 223, 0.2)
    );
}

.pricing-cta::before,
.pricing-cta::after {
  content: "✦";

  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  color: rgba(181, 138, 69, 0.4);

  font-family: var(--serif);
  font-size: 2rem;
}

.pricing-cta::before {
  left: 25px;
}

.pricing-cta::after {
  right: 25px;
}

.cta-book {
  width: 64px;
  height: 64px;

  margin: 0 auto 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--gold);

  border-radius: 50%;

  background: rgba(181, 138, 69, 0.07);

  color: var(--gold-dark);

  font-family: var(--serif);
  font-size: 1.5rem;
}

.pricing-cta h2 {
  margin-bottom: 14px;

  color: var(--brown-dark);

  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);

  line-height: 1.2;
}

.pricing-cta p {
  max-width: 620px;

  margin: 0 auto 28px;

  color: var(--ink-soft);
}

.btn-cta {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 50px;

  padding: 13px 28px;

  border-radius: 999px;

  background: var(--brown);

  color: #fff8ea;

  font-size: 0.95rem;
  font-weight: 700;

  text-decoration: none;

  box-shadow:
    0 7px 18px rgba(62, 43, 30, 0.18);

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

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

  background: var(--brown-dark);

  box-shadow:
    0 11px 24px rgba(62, 43, 30, 0.24);
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
  padding: 45px 20px 50px;

  border-top: 1px solid var(--border);

  background:
    #e9dcc2;

  color: var(--brown);

  text-align: center;
}

.site-footer > p:first-child {
  margin-bottom: 8px;

  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.site-footer > p:first-child span {
  margin: 0 7px;

  color: var(--gold-dark);

  font-size: 0.9rem;
}

.footer-small {
  color: var(--ink-muted);

  font-size: 0.8rem;
}


/* =========================================================
   RESPONSIVE — TABLETTES
========================================================= */

@media (max-width: 1150px) {

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

  .featured-plan {
    transform: none;
  }

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

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

}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 700px) {

  .pricing-hero {
    min-height: 440px;

    padding:
      105px
      20px
      65px;
  }

  .pricing-hero::before,
  .pricing-hero::after {
    width: 70px;
    height: 70px;
  }

  .pricing-hero::before {
    top: 20px;
    left: 20px;
  }

  .pricing-hero::after {
    right: 20px;
    bottom: 20px;
  }

  .btn-return {
    top: 18px;
    left: 18px;

    padding: 8px 12px;

    font-size: 0.78rem;
  }

  .pricing-book-icon {
    width: 60px;
    height: 60px;

    font-size: 1.5rem;
  }

  .pricing-hero h1 {
    font-size: 2.35rem;
  }

  .pricing-intro {
    font-size: 0.98rem;
  }


  .plans-section,
  .comparison-section,
  .upgrade-section {
    padding:
      65px
      16px;
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .section-heading h2 {
    font-size: 2rem;
  }


  .plans-grid {
    grid-template-columns: 1fr;

    gap: 18px;
  }

  .featured-plan {
    order: -1;

    transform: none;
  }

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


  .plan-ribbon {
    top: 16px;
    right: -43px;
  }


  .plan-header {
    padding:
      28px
      22px
      20px;
  }

  .plan-name {
    font-size: 1.85rem;
  }

  .price-value {
    font-size: 2.6rem;
  }


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

  .upgrade-card {
    padding: 21px;
  }


  .pricing-cta {
    margin:
      10px
      16px
      70px;

    padding:
      55px
      20px;
  }

  .pricing-cta::before,
  .pricing-cta::after {
    display: none;
  }

}


/* =========================================================
   PETITS ÉCRANS
========================================================= */

@media (max-width: 420px) {

  .pricing-hero h1 {
    font-size: 2rem;
  }

  .pricing-intro {
    font-size: 0.92rem;
  }

  .plan-main {
    padding: 18px;
  }

  .plan-footer {
    padding:
      18px;
  }

  .highlight-item strong {
    font-size: 0.9rem;
  }

  .highlight-item span {
    font-size: 0.72rem;
  }

  .pricing-cta h2 {
    font-size: 1.9rem;
  }

}


/* =========================================================
   ACCESSIBILITÉ
========================================================= */

:focus-visible {
  outline: 3px solid rgba(181, 138, 69, 0.55);

  outline-offset: 4px;
}


/* =========================================================
   RÉDUCTION DES ANIMATIONS
========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

}
