/* ===================================================================
   AboFacile — charte du site
   Gamme tirée du logo : brique #ad1a00, indigo #0d0332.
   Typo : Bricolage Grotesque (display), Albert Sans (texte).
   =================================================================== */

@import url("fonts.css");

:root {
  --fond: #fcfbf9;
  --fond-creux: #f3f1ec;
  --encre: #141034;
  --texte: #2a2640;
  --texte-doux: #5a5570;
  --accent: #ad1a00;
  --accent-sombre: #8c1500;
  --sur-accent: #ffffff;
  --filet: #e4e1da;
  --indigo: #141034;
  --sur-indigo: #f5f3ee;
  --gouttiere: 1rem;
  --largeur: 78rem;
  --largeur-cadre: calc(var(--largeur) + 2 * var(--gouttiere));
  --display: "Bricolage Grotesque", "Albert Sans", system-ui, sans-serif;
  --texte-famille: "Albert Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--texte-famille);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  color: var(--encre);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 750;
}

h3 {
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1.2;
}

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--encre);
  color: var(--sur-indigo);
}

.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  padding: 0.75rem 1.25rem;
}

/* ---------------- En-tête ---------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: var(--largeur-cadre);
  margin: 0 auto;
  padding: 1rem var(--gouttiere);
}

.site-logo img {
  width: clamp(150px, 16vw, 200px);
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
  flex-wrap: wrap;
}

.site-nav a:not(.bouton) {
  color: var(--encre);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:not(.bouton):hover,
.site-nav a[aria-current="page"]:not(.bouton) {
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
}

/* ---------------- Boutons ---------------- */

.bouton {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.05rem;
  text-decoration: none;
  border: 2px solid transparent;
}

.bouton-accent {
  background: var(--accent);
  color: var(--sur-accent);
}

.bouton-accent:hover {
  background: var(--accent-sombre);
}

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

.hero {
  position: relative;
  min-height: min(88vh, 46rem);
  display: flex;
  align-items: flex-end;
  color: #fff;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* voile de lisibilité du titrage, dense côté texte, léger côté sujet */
  background:
    linear-gradient(to top, rgba(13, 3, 50, 0.88) 0%, rgba(13, 3, 50, 0.42) 50%, rgba(13, 3, 50, 0.08) 100%),
    linear-gradient(100deg, rgba(13, 3, 50, 0.62) 0%, rgba(13, 3, 50, 0.22) 45%, rgba(13, 3, 50, 0) 72%);
}

.hero-contenu {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--largeur-cadre);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gouttiere);
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 7vw, 5.25rem);
  font-weight: 800;
  line-height: 0.98;
  max-width: 16ch;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 28px rgba(13, 3, 50, 0.55), 0 1px 2px rgba(13, 3, 50, 0.6);
}

.hero-sous-titre {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.5;
  max-width: 52ch;
  margin-bottom: 1.75rem;
  text-shadow: 0 1px 18px rgba(13, 3, 50, 0.6), 0 1px 2px rgba(13, 3, 50, 0.65);
}

.hero .cta-note {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* ---------------- Sections ---------------- */

.section {
  padding: clamp(3.5rem, 9vw, 6.5rem) var(--gouttiere);
}

.section > .section-int {
  max-width: var(--largeur);
  margin: 0 auto;
}

.section-creux {
  background: var(--fond-creux);
}

.section-indigo {
  background: var(--indigo);
  color: var(--sur-indigo);
}

.section-indigo h2 {
  color: #fff;
}

.section-indigo a {
  color: var(--sur-indigo);
}

/* Récurrence : texte + grand chiffre */

.recurrence {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.grand-chiffre {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.grand-chiffre small {
  display: block;
  font-family: var(--texte-famille);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--texte);
  margin-top: 0.75rem;
}

/* Étapes : vraie séquence, numérotée */

.etapes {
  list-style: none;
  counter-reset: etape;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.etapes li {
  counter-increment: etape;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--filet);
  align-items: baseline;
}

.etapes li::before {
  content: counter(etape);
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
}

.etapes h3 {
  margin: 0 0 0.35rem;
}

.etapes p {
  margin: 0;
}

/* Cycle : liste + photo */

.cycle {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.cycle-liste {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.cycle-liste li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--filet);
}

.cycle-liste h3 {
  margin: 0 0 0.25rem;
}

.cycle-liste p {
  margin: 0;
}

.cycle-photo img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}

.cycle-note {
  margin-top: 1.5rem;
  color: var(--texte-doux);
}

/* Offres : deux colonnes registre, pas de cartes */

.offres {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: 2.5rem;
}

.offre {
  border-top: 4px solid var(--encre);
  padding-top: 1.25rem;
}

.offre-tag {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.3rem 0.7rem;
  font-family: var(--display);
  font-weight: 650;
  font-size: 0.9rem;
  background: var(--indigo);
  color: var(--sur-indigo);
}

.offre-prix {
  font-family: var(--display);
  font-weight: 750;
  font-size: 2rem;
  color: var(--encre);
  margin: 0.25rem 0 0.75rem;
}

.offre-prix span {
  font-size: 1rem;
  font-family: var(--texte-famille);
  font-weight: 500;
  color: var(--texte-doux);
}

.offre ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.offre li {
  padding: 0.4rem 0;
  border-top: 1px solid var(--filet);
}

.lien-section {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 650;
  font-family: var(--display);
}

.offres-note {
  margin-top: 2rem;
}

/* Témoignages */

.temoignages {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: 2.5rem;
}

.temoignages figure {
  margin: 0;
  background: var(--fond);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
}

.temoignages blockquote {
  margin: 0;
}

.temoignages blockquote p {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--encre);
  margin: 0 0 0.75rem;
}

.temoignages figcaption {
  color: var(--texte-doux);
}

.temoignages-intro {
  color: var(--texte-doux);
}

/* CTA bloc */

.cta-essai {
  margin-top: 2rem;
}

.cta-essai .cta-note {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  color: inherit;
  opacity: 0.85;
}

.contact-direct {
  margin-top: 1.5rem;
}

/* ---------------- Pages intérieures ---------------- */

.page-entete h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 780;
}

.chapeau {
  font-size: 1.2rem;
  max-width: 80ch;
}

/* texte long : mesure de lecture */
.prose > * {
  max-width: 80ch;
}

.deux-colonnes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.prose h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  max-width: none;
}

.prose h3 {
  margin-top: 1.75rem;
}

/* Simulateur */

.simu-form {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1.25rem;
  align-items: end;
}

.simu-form label {
  display: block;
  font-weight: 650;
  font-family: var(--display);
  margin-bottom: 0.4rem;
}

.simu-form input[type="number"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: inherit;
  border: 1px solid var(--texte-doux);
  background: #fff;
  color: var(--texte);
}

.simu-offres {
  grid-column: 1 / -1;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.simu-offres label {
  font-weight: 500;
  font-family: var(--texte-famille);
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin: 0;
}

.simu-form .bouton {
  border: 0;
  cursor: pointer;
  justify-self: start;
}

.simu-hypotheses {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
  border-top: 1px solid var(--filet);
  padding-top: 1rem;
}

.simu-hypotheses summary {
  cursor: pointer;
  font-weight: 650;
  font-family: var(--display);
}

.simu-hypotheses .simu-form {
  margin-top: 1.25rem;
}

.simu-synthese {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 2.75rem;
}

.simu-gain {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  border-top: 4px solid var(--accent);
  padding-top: 1rem;
}

.simu-gain-annee {
  font-family: var(--display);
  font-weight: 650;
}

.simu-gain-montant {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.simu-gain-note {
  color: var(--texte-doux);
}

.simu-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.bouton-contour {
  background: transparent;
  color: var(--encre);
  border-color: var(--encre);
  cursor: pointer;
  font-size: 1.05rem;
}

.bouton-contour:hover {
  background: var(--encre);
  color: var(--fond);
}

.simu-resultats {
  margin-top: 3rem;
  display: grid;
  gap: 2rem;
}

.simu-resultats[hidden] {
  display: none;
}

.simu-resultats table {
  border-collapse: collapse;
  width: 100%;
}

.simu-resultats th,
.simu-resultats td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--filet);
}

.simu-resultats th {
  font-family: var(--display);
  font-weight: 650;
  border-top: 2px solid var(--encre);
}

.simu-resultats td:not(:first-child),
.simu-resultats th:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.simu-defilement {
  overflow-x: auto;
}

.note-legere {
  color: var(--texte-doux);
}

/* Démarrer / contact */

.rdv-widget {
  margin: 2.5rem 0;
  min-height: 10rem;
}

.contact-grands-liens p {
  font-size: 1.3rem;
}

/* ---------------- Pied de page ---------------- */

.site-footer {
  border-top: 1px solid var(--filet);
  padding: 2rem var(--gouttiere) 2.5rem;
  max-width: var(--largeur-cadre);
  margin: 0 auto;
}

.site-footer a {
  color: var(--texte);
}

/* ---------------- Téléphone ---------------- */

@media (max-width: 47rem) {
  .recurrence,
  .cycle,
  .offres,
  .deux-colonnes,
  .simu-synthese {
    grid-template-columns: minmax(0, 1fr);
  }

  .etapes li {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 0.9rem;
  }

  .etapes li::before {
    font-size: 2rem;
  }

  .cycle-photo {
    order: -1;
  }
}
