/* =========================================================
   Proposition de page d'accueil (proposition.html)
   S'appuie sur les variables et composants de styles.css
   ========================================================= */

.v2 em { font-style: italic; color: var(--gold); }
.p-center { text-align: center; }
.p-kicker { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: #8a6418; }
.dark .p-kicker { color: var(--gold-soft); }
.p-link { color: var(--gold); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.p-link-dark { color: var(--bordeaux); }

/* En-tête : CTA permanent */
.v2 .site-header ul { gap: 1.75rem; }
.p-head-cta { padding: .6rem 1.2rem; font-size: .72rem; }

/* ---------- Hero ---------- */
.p-hero {
  padding: 0;
  min-height: calc(100svh - 4.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bordeaux-deep);
  color: var(--cream);
}
.p-hero-text { align-self: center; padding: 4rem clamp(1.5rem, 6vw, 6rem); }
.p-hero h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1.05; }
.p-hero-sub { margin-top: 1.5rem; font-size: 1.15rem; opacity: .85; max-width: 34rem; }
.p-hero-cta { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; }
.p-trust { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; padding: 0; margin-top: 2.5rem; font-size: .85rem; color: var(--gold-soft); }
.p-trust li::before { content: "✓ "; color: var(--gold); }

.p-hero-img { position: relative; margin: 0; min-height: 320px; }
.p-hero-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-hero-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bordeaux-deep), transparent 35%); }
.p-hero-img figcaption {
  position: absolute;
  z-index: 1;
  left: clamp(1rem, 4vw, 3rem);
  bottom: clamp(1rem, 4vw, 3rem);
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.5rem 1rem 1rem;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 20px 40px rgb(0 0 0 / .35);
  font-size: .82rem;
  rotate: -2deg;
}
.p-hero-img figcaption img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 55% 20%; }
.p-hero-img figcaption b { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; color: var(--bordeaux); }

/* Flamme de la bougie : la vraie a été retirée de la photo (images/hero-bougie.webp, 2:3),
   celle-ci est posée à son emplacement d'origine (88,2 % / 56,1 %).
   Taille rendue de l'image en object-fit: cover = max(largeur, hauteur × ratio). */
.p-hero-img { container-type: size; overflow: hidden; }
.p-flame {
  --w: max(100cqw, 66.667cqh);
  --h: max(100cqh, 150cqw);
  position: absolute;
  z-index: 1;
  left: calc(50cqw + .382 * var(--w));
  top: calc(50cqh + .061 * var(--h));
  width: calc(.032 * var(--w));
  aspect-ratio: 1 / 2.1;
  translate: -50% -62%;
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  background: radial-gradient(ellipse 50% 60% at 50% 72%, #fffdf2 0 35%, #ffe7a0 55%, #ffad42 80%, rgb(255 140 40 / 0) 100%);
  filter: blur(.6px);
  mix-blend-mode: screen;
  transform-origin: 50% 90%;
  pointer-events: none;
  animation: p-flicker 2.4s ease-in-out infinite;
}
.p-flame::before {
  content: "";
  position: absolute;
  inset: -250% -450%;
  background: radial-gradient(closest-side, rgb(255 170 60 / .45), transparent);
  animation: p-glow 3.1s ease-in-out infinite;
}
@keyframes p-flicker {
  0%, 100% { scale: 1 1; rotate: 0deg; opacity: .9; }
  20% { scale: .94 1.1; rotate: -2deg; opacity: 1; }
  40% { scale: 1.04 .93; rotate: 1.5deg; opacity: .8; }
  60% { scale: .96 1.06; rotate: -1deg; opacity: .95; }
  80% { scale: 1.02 .97; rotate: 2deg; opacity: .85; }
}
@keyframes p-glow {
  0%, 100% { opacity: .8; }
  30% { opacity: 1; }
  55% { opacity: .6; }
  75% { opacity: .95; }
}

/* ---------- Bandeau défilant ---------- */
.p-marquee { overflow: hidden; background: var(--gold); color: var(--bordeaux-deep); padding: .9rem 0; }
.p-marquee div { display: flex; width: max-content; animation: p-scroll 40s linear infinite; }
.p-marquee span { font-family: var(--serif); font-size: 1.4rem; font-style: italic; padding-inline: 1.5rem; white-space: nowrap; }
.p-marquee span::after { content: "✦"; font-style: normal; font-size: .8rem; margin-left: 3rem; vertical-align: middle; }
@keyframes p-scroll { to { translate: -50%; } }

/* ---------- Le problème ---------- */
.p-pain-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.p-pain-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; rotate: 2deg; box-shadow: -18px 18px 0 var(--cream-deep); }
.p-pain h2 { color: var(--bordeaux); }
.p-pain h2 em { color: #8a6418; }
.p-swaps { display: grid; gap: 1rem; margin-top: 2rem; }
.p-swaps div { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: center; padding: 1rem 1.25rem; background: #fffaf2; border-left: 3px solid var(--gold); }
.p-swaps s { color: var(--ink-soft); font-family: var(--serif); font-style: italic; font-size: 1.1rem; text-decoration-color: rgb(138 100 24 / .6); }
.p-swaps b { font-weight: 600; color: var(--bordeaux); }
.p-swaps b::before { content: "→ "; color: var(--gold-soft); }

/* ---------- Sélecteur ---------- */
.p-finder .section-head { margin-bottom: 2.5rem; }
.p-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.p-stages label { display: block; cursor: pointer; letter-spacing: normal; text-transform: none; color: var(--cream); }
.p-stages input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
.p-stages span {
  display: grid;
  gap: .4rem;
  justify-items: center;
  text-align: center;
  padding: 1.25rem .75rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  border: 1px solid rgb(232 181 42 / .3);
  background: rgb(42 14 17 / .6);
  transition: background .2s, color .2s, border-color .2s;
}
.p-stages i { font-style: normal; font-size: 1.8rem; line-height: 1; color: var(--gold); }
.p-stages label:hover span { border-color: var(--gold); }
.p-stages input:checked + span { background: var(--gold); color: var(--bordeaux-deep); border-color: var(--gold); }
.p-stages input:checked + span i { color: var(--bordeaux); }
.p-stages input:focus-visible + span { outline: 2px solid var(--cream); outline-offset: 3px; }

.p-panels article {
  display: none;
  grid-template-columns: 3fr 2fr;
  gap: 2rem 4rem;
  align-items: center;
  margin-top: 1.5rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--cream);
  color: var(--ink);
  animation: p-in .35s ease-out;
}
.p-finder:has([value="idee"]:checked) [data-panel="idee"],
.p-finder:has([value="ecrit"]:checked) [data-panel="ecrit"],
.p-finder:has([value="fini"]:checked) [data-panel="fini"],
.p-finder:has([value="publier"]:checked) [data-panel="publier"] { display: grid; }
.p-panels h3 { font-size: 2.2rem; color: var(--bordeaux); margin: .25rem 0 .75rem; }
.p-panels h3 span { font-size: 1.2rem; font-style: italic; color: var(--ink-soft); }
.p-panels .p-kicker { color: #8a6418; }
.p-panel-price { display: grid; gap: .1rem; padding-left: 2rem; border-left: 1px solid var(--cream-deep); }
.p-panel-price span { font-size: .8rem; color: var(--ink-soft); margin-top: .5rem; }
.p-panel-price b { font-family: var(--serif); font-size: 2rem; font-weight: 500; color: var(--bordeaux); line-height: 1.1; font-variant-numeric: lining-nums; }
.p-panel-price small { font-family: var(--sans); font-size: .85rem; color: var(--ink-soft); }
.p-panel-price .btn { margin-top: 1.25rem; text-align: center; }
@keyframes p-in { from { opacity: 0; translate: 0 8px; } }

/* ---------- Abonnement ---------- */
.p-sub .section-head h2 { color: var(--bordeaux); }
.p-loop { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: loop; position: relative; }
.p-loop::before { content: ""; position: absolute; top: 1.5rem; left: 12%; right: 12%; border-top: 1px dashed var(--gold-soft); }
.p-loop li { position: relative; text-align: center; font-size: .92rem; color: var(--ink-soft); counter-increment: loop; }
.p-loop li::before {
  content: counter(loop);
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--bordeaux);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.4rem;
  position: relative;
}
.p-loop li:last-child::after { content: "↻"; position: absolute; top: .55rem; right: -.25rem; color: var(--gold-soft); font-size: 1.3rem; }
.p-loop b { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--bordeaux); }

.p-plans { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 1.5rem; align-items: center; margin-top: 4.5rem; }
.p-plans article { position: relative; padding: 2rem; background: #fffaf2; border: 1px solid #e3d5bd; text-align: center; }
.p-plans h3 { color: var(--bordeaux); margin: .25rem 0 .75rem; }
.p-plans p { font-size: .92rem; color: var(--ink-soft); }
.p-plans .amount { margin-top: 1.25rem; }
.p-star { padding-block: 3rem !important; background: var(--bordeaux) !important; border-color: var(--gold) !important; box-shadow: 0 25px 50px rgb(59 21 24 / .25); }
.p-star h3, .p-star .amount { color: var(--gold); }
.p-star p, .p-star .amount small { color: var(--cream); }
.p-star .p-kicker { color: var(--gold-soft); }
.p-star .btn { margin-top: 1.5rem; width: 100%; background: var(--gold); color: var(--bordeaux-deep); border-color: var(--gold); }
.p-star .btn:hover, .p-star .btn:focus-visible { background: transparent; color: var(--gold); }
.p-perday { font-style: italic; opacity: .8; }
.p-sub .p-center { margin-top: 2.5rem; }

/* ---------- Qui suis-je ---------- */
.p-about { background: var(--cream-deep); }
.p-about-grid { display: grid; grid-template-columns: 2fr 3fr; gap: clamp(2rem, 7vw, 6rem); align-items: center; }
.p-about-img { position: relative; }
.p-about-img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 55% 25%; border-radius: 50% 50% 0 0 / 30% 30% 0 0; }
.p-stamp {
  position: absolute;
  right: -1.5rem;
  bottom: 2rem;
  display: grid;
  place-items: center;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bordeaux-deep);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-align: center;
  rotate: 12deg;
}
.p-about blockquote { font-family: var(--serif); font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.2; color: var(--bordeaux); margin-bottom: 1.5rem; }
.p-about blockquote::before { content: "“"; display: block; font-size: 4rem; line-height: .6; color: var(--gold); }
.p-about p + p { margin-top: 1rem; }
.p-pillars { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.p-pillars li { font-size: .88rem; color: var(--ink-soft); }
.p-pillars b { display: block; font-family: var(--serif); font-size: 1.3rem; color: var(--bordeaux); }

/* ---------- Témoignages ---------- */
.p-voices .todo { color: var(--gold-soft); }
.p-quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.p-quotes figure { margin: 0; padding: 2rem; background: rgb(42 14 17 / .75); border-top: 3px solid var(--gold); }
.p-quotes figure:nth-child(2) { translate: 0 2rem; }
.p-quotes blockquote { font-family: var(--serif); font-size: 1.3rem; font-style: italic; line-height: 1.4; }
.p-quotes figcaption { margin-top: 1.25rem; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); }

/* ---------- Parcours fidélité ---------- */
.p-path h2 { color: var(--bordeaux); }
.p-road { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 1rem; align-items: center; }
.p-road li:not(.p-off) { padding: 1.75rem 1rem; text-align: center; border: 1px solid #e3d5bd; background: #fffaf2; font-size: .85rem; color: var(--ink-soft); }
.p-road span { display: block; font-family: var(--serif); font-size: 2.2rem; color: var(--gold-soft); line-height: 1; }
.p-road b { display: block; font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--bordeaux); margin-top: .5rem; }
.p-off { font-family: var(--serif); font-size: 1.6rem; color: var(--bordeaux); background: var(--gold); padding: .4rem .8rem; border-radius: 2rem; font-variant-numeric: lining-nums; }

/* ---------- FAQ ---------- */
.p-faq { background: var(--cream-deep); }
.p-faq h2 { color: var(--bordeaux); }
.p-faq .section-head { margin-bottom: 2.5rem; }
.p-faq details { background: var(--cream); border: 0; padding: 1.25rem 1.5rem; margin-bottom: .75rem; }
.p-faq summary { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; letter-spacing: normal; text-transform: none; }
.p-faq details p { margin-top: .75rem; color: var(--ink-soft); }

/* ---------- CTA final ---------- */
.p-final {
  text-align: center;
  color: var(--cream);
  background:
    linear-gradient(rgb(42 14 17 / .82), rgb(42 14 17 / .92)),
    url("https://images.unsplash.com/photo-1758730010177-1711515b7552?w=1800&q=60&auto=format&fit=crop") center / cover;
}
.p-final h2 { color: var(--gold); font-size: clamp(2.4rem, 5vw, 3.8rem); }
.p-final p { margin-top: 1rem; font-size: 1.2rem; }
.p-final .p-hero-cta { justify-content: center; }

/* ---------- Barre CTA mobile ---------- */
.p-sticky { display: none; }

/* ---------- Apparition au défilement (navigateurs compatibles) ---------- */
@supports (animation-timeline: view()) {
  .v2 .section-head, .p-pain-grid > *, .p-plans article, .p-quotes figure, .p-road li, .p-about-grid > * {
    animation: p-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
  /* Barre CTA mobile : n'apparaît qu'une fois le hero dépassé */
  .p-sticky { animation: p-show linear both; animation-timeline: scroll(); animation-range: 80vh 100vh; }
  @keyframes p-show { from { opacity: 0; translate: 0 150%; } }
}
@media (prefers-reduced-motion: reduce) {
  .p-marquee div, .p-flame, .p-flame::before, .p-panels article, .v2 .section-head, .p-pain-grid > *, .p-plans article, .p-quotes figure, .p-road li, .p-about-grid > * { animation: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .p-head-cta { display: none; }
  .p-hero, .p-pain-grid, .p-panels article, .p-plans, .p-about-grid, .p-quotes, .p-swaps div { grid-template-columns: 1fr; }
  .p-hero-img { height: 60vw; order: -1; }
  .p-hero-img figcaption { top: 1rem; bottom: auto; }   /* laisse la bougie visible */
  .p-hero-img::after { background: linear-gradient(0deg, var(--bordeaux-deep), transparent 40%); }
  .p-hero-text { padding-top: 2rem; }
  .p-stages, .p-loop { grid-template-columns: 1fr 1fr; }
  .p-loop::before, .p-loop li:last-child::after { display: none; }
  .p-panel-price { padding: 1.5rem 0 0; border-left: 0; border-top: 1px solid var(--cream-deep); }
  .p-pain-img { max-width: 360px; margin-inline: auto; }
  .p-about-img { max-width: 320px; margin-inline: auto; }
  .p-stamp { right: -.5rem; }
  .p-pillars { grid-template-columns: 1fr; }
  .p-quotes figure:nth-child(2) { translate: none; }
  .p-road { grid-template-columns: 1fr; justify-items: center; }
  .p-road li:not(.p-off) { width: 100%; }
  .p-sticky { display: block; position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 20; text-align: center; box-shadow: 0 10px 30px rgb(0 0 0 / .3); }
  .v2 footer { padding-bottom: 6rem; }
  .v2 .version-switch { bottom: 5rem; }
}
