/* =========================================================================
   PELUR — VERSION 11 « L'ORACLE »
   Le site est une démo vivante : une question, un champ, une réponse.
   Typos : Besley (la voix de l'Oracle, Clarendon du XIXᵉ) · Onest (interface)
   ========================================================================= */

:root {
  --creme: #FBF7EE;
  --papier: #FFFEF9;
  --encre: #1B1811;
  --gris: #6C6558;
  --vert: #40682F;
  --accent: #B9532B;
  --accent-fonce: #9C4522;
  --nuit: #161309;
  --ligne: rgba(27, 24, 17, 0.15);
  --ligne-claire: rgba(251, 247, 238, 0.25);

  --display: "Besley", "Iowan Old Style", Georgia, serif;
  --sans: "Onest", "Segoe UI", system-ui, sans-serif;

  --rayon: 20px;
  --largeur: 1160px;
}

/* ---------- Socle ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
p, dd, dt, blockquote, figure, figcaption { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.conteneur {
  max-width: var(--largeur);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

section { scroll-margin-top: 5.5rem; }

.evitement {
  position: absolute;
  left: -200vw;
  top: 0.75rem;
  z-index: 100;
  background: var(--encre);
  color: var(--creme);
  padding: 0.6rem 1.1rem;
  border-radius: 99px;
  text-decoration: none;
}
.evitement:focus-visible { left: 0.75rem; }

.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Rôles typographiques ---------- */

.sur-titre {
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 1.1rem;
}

.titre-section {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  line-height: 1.12;
  max-width: 26ch;
}
.titre-section em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.intro-section {
  max-width: 52ch;
  margin-top: 1.2rem;
  color: var(--gris);
  font-size: 1.1rem;
}

/* ---------- Boutons & badges ---------- */

.bouton {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  border-radius: 99px;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.bouton--principal {
  background: var(--encre);
  color: var(--creme);
  padding: 0.85rem 1.7rem;
  border: 0;
  cursor: pointer;
}
.bouton--principal:hover { background: var(--accent-fonce); transform: translateY(-1px); }
.bouton--compact { padding: 0.55rem 1.2rem; font-size: 0.95rem; }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.badges--centres { justify-content: center; }

.badge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 176px;
  padding: 0.7rem 1.4rem 0.8rem;
  background: var(--encre);
  color: var(--creme);
  border-radius: 16px;
  text-decoration: none;
  line-height: 1.25;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.badge:hover { background: var(--accent-fonce); transform: translateY(-2px); }
.badge__sur { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }
.badge__nom { font-family: var(--display); font-weight: 500; font-size: 1.3rem; }
.badge--nuit { background: transparent; border: 1px solid var(--ligne-claire); }
.badge--nuit:hover { background: rgba(251, 247, 238, 0.08); }
.badge.badge--prioritaire { outline: 2px solid var(--accent); outline-offset: 2px; }

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

.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--creme) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ligne);
}
.entete__barre {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 4.25rem;
}
.marque {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  text-decoration: none;
  margin-right: auto;
}
.marque__icone {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(27, 24, 17, 0.2);
}
.entete__nav { display: flex; gap: 1.6rem; }
.entete__nav a {
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--gris);
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.entete__nav a:hover { color: var(--encre); }
.entete__nav a.actif { color: var(--encre); border-bottom-color: var(--accent); }

@media (max-width: 760px) {
  .entete__nav { display: none; }
}

/* ---------- L'Oracle ---------- */

.oracle {
  min-height: min(88vh, 56rem);
  display: flex;
  align-items: center;
  padding-block: clamp(3rem, 7vh, 5rem);
}
.oracle__contenu {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.oracle__titre {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.3rem, 5.6vw, 4.2rem);
  line-height: 1.08;
  max-width: 20ch;
}
.oracle__titre em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.oracle__demande {
  margin-top: clamp(2rem, 5vh, 3rem);
  width: min(640px, 100%);
  display: flex;
  gap: 0.6rem;
  background: var(--papier);
  border: 1.5px solid var(--encre);
  border-radius: 999px;
  padding: 0.45rem 0.45rem 0.45rem 1.6rem;
  box-shadow: 0 20px 40px -24px rgba(27, 24, 17, 0.35);
}
.oracle__demande:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.oracle__champ {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--encre);
}
.oracle__champ::placeholder { color: var(--gris); font-style: italic; }
.oracle__champ:focus { outline: none; }
.oracle__bouton {
  border: 0;
  cursor: pointer;
  background: var(--encre);
  color: var(--creme);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}
.oracle__bouton:hover { background: var(--accent-fonce); }

/* La réponse de l'Oracle */

.oracle__reponse { width: min(640px, 100%); }
.oracle__reponse:empty { display: none; }
.reponse {
  margin-top: 1.4rem;
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: 0 24px 48px -26px rgba(27, 24, 17, 0.4);
  padding: 1.8rem 2rem;
  text-align: left;
  animation: repondre 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}
@keyframes repondre {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.reponse__matiere {
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-fonce);
}
.reponse__titre {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  line-height: 1.15;
  margin-top: 0.5rem;
}
.reponse__sous { margin-top: 0.4rem; color: var(--gris); }
.reponse__montant {
  margin-top: 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.reponse__montant strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--vert);
}
.reponse__montant span { font-size: 0.9rem; color: var(--gris); }
.reponse__pied {
  margin-top: 1.3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--ligne);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.reponse__note { font-size: 0.88rem; color: var(--gris); }

/* Le mur des matières connues */

.oracle__matieres {
  margin-top: clamp(2rem, 5vh, 3rem);
  width: min(880px, 100%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.matiere {
  border: 1px solid var(--ligne);
  background: var(--papier);
  color: var(--encre);
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.2s ease,
              background-color 0.15s ease, color 0.15s ease;
}
.matiere:hover { transform: translateY(-2px); border-color: var(--encre); }
.matiere.est-choisie { background: var(--encre); color: var(--creme); border-color: var(--encre); }
.matiere.est-eteinte { opacity: 0.22; }
/* la pastille verte signale une fiche jouable ici même */
.matiere--fiche::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vert);
  margin-right: 0.45rem;
  vertical-align: 0.08em;
}
.oracle__legende {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--gris);
  max-width: 52ch;
}

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

.methode, .app, .faq { padding-block: clamp(3.5rem, 8vh, 6.5rem); }

/* ---------- La méthode ---------- */

.methode { border-top: 1px solid var(--ligne); }
.methode__grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: 2.8rem;
}
.methode__article { border-top: 2px solid var(--encre); padding-top: 1.2rem; }
.methode__article h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.25;
}
.methode__article p { margin-top: 0.6rem; color: var(--gris); font-size: 0.99rem; }

/* ---------- L'app ---------- */

.app { background: var(--papier); border-block: 1px solid var(--ligne); }
.app__grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.app__points { margin-top: 2.4rem; display: grid; gap: 1.5rem; }
.app__points h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.3;
}
.app__points p { color: var(--gris); font-size: 0.98rem; margin-top: 0.25rem; }

.app__telephones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
}
.telephone {
  width: min(250px, 60vw);
  border-radius: 34px;
  overflow: hidden;
  border: 7px solid var(--nuit);
  box-shadow: 0 30px 60px -25px rgba(22, 19, 9, 0.45);
  background: var(--nuit);
}
.telephone img, .telephone video { width: 100%; height: auto; }
.telephone--arriere {
  position: absolute;
  transform: translateX(-46%) rotate(-5deg) scale(0.92);
}
.telephone--avant {
  position: relative;
  transform: translateX(26%) rotate(2.5deg);
}

/* ---------- Premium & FAQ ---------- */

.premium { padding-block: clamp(3rem, 7vh, 5rem) 0; }
.premium__bloc {
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-radius: calc(var(--rayon) * 1.5);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.premium__bloc .titre-section, .premium__bloc .intro-section { max-width: 36ch; margin-inline: auto; }
.premium__prix {
  margin-top: 2rem;
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  font-size: 1.1rem;
  color: var(--gris);
}
.premium__offre strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.4rem;
  color: var(--encre);
}
.premium__ou { color: var(--accent); font-size: 1.6rem; }
.premium__note { margin-top: 1rem; font-size: 0.9rem; color: var(--gris); }

.faq__liste {
  margin-top: 2.6rem;
  max-width: 760px;
  display: grid;
  gap: 0.8rem;
}
.faq__item {
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  overflow: hidden;
}
.faq__item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.15rem 1.6rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.35;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p {
  padding: 0 1.6rem 1.3rem;
  color: var(--gris);
  max-width: 62ch;
}

/* ---------- Finale ---------- */

.finale {
  margin-top: clamp(3.5rem, 8vh, 6.5rem);
  background: var(--nuit);
  color: var(--creme);
  padding-block: clamp(4.5rem, 10vh, 7.5rem) clamp(3rem, 6vh, 4.5rem);
}
.finale__contenu {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.finale__icone {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.finale__titre {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.14;
  margin-top: 1.2rem;
  max-width: 24ch;
}
.finale__titre em { font-style: italic; font-weight: 400; color: #DFA173; }
.finale__qr {
  margin-top: 2.4rem;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: rgba(251, 247, 238, 0.72);
}
.finale__qr img {
  width: 112px;
  height: 112px;
  border-radius: 12px;
  background: var(--creme);
  padding: 8px;
}
.finale__qr--attente::before {
  content: "QR";
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 12px;
  border: 1.5px dashed var(--ligne-claire);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(251, 247, 238, 0.45);
}
@media (min-width: 900px) { .finale__qr { display: flex; } }
.finale__colophon {
  margin-top: 3rem;
  font-size: 0.88rem;
  color: rgba(251, 247, 238, 0.6);
  max-width: 46ch;
}
.finale__colophon a { color: rgba(251, 247, 238, 0.85); }
.finale__note {
  margin-top: 1.1rem;
  font-size: 0.88rem;
  color: rgba(251, 247, 238, 0.6);
  max-width: 52ch;
}
.finale__note strong { color: rgba(251, 247, 238, 0.85); }

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

.pied {
  background: var(--nuit);
  color: rgba(251, 247, 238, 0.6);
  border-top: 1px solid var(--ligne-claire);
  padding-block: 1.8rem;
  font-size: 0.85rem;
}
.pied__liens { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.pied__liens a { color: inherit; text-decoration: none; }
.pied__liens a:hover { color: var(--creme); }
.pied__copyright { margin-top: 0.9rem; }

body:has(.page-annexe) .pied {
  background: transparent;
  color: var(--gris);
  border-top: 1px solid var(--ligne);
}
body:has(.page-annexe) .pied a:hover { color: var(--encre); }

/* ---------- Barre mobile fixe ---------- */

.barre-mobile {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--creme) 92%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--ligne);
  text-align: center;
  transform: translateY(105%);
  transition: transform 0.3s ease;
}
.barre-mobile.visible { transform: none; }
.barre-mobile .bouton { display: block; }
@media (min-width: 761px) { .barre-mobile { display: none; } }

/* ---------- Révélation au défilement ---------- */

.reveler {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveler.visible { opacity: 1; transform: none; }

/* ---------- Pages annexes ---------- */

.page-annexe { padding-block: 3.5rem 5rem; }
.page-annexe .conteneur { max-width: 760px; }
.page-annexe h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.7rem);
  line-height: 1.12;
}
.page-annexe .maj { color: var(--gris); margin-top: 0.6rem; margin-bottom: 2rem; }
.page-annexe h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.55rem;
  margin: 2.4rem 0 0.8rem;
  line-height: 1.25;
}
.page-annexe h3 { font-weight: 700; font-size: 1.08rem; margin: 1.6rem 0 0.4rem; }
.page-annexe p, .page-annexe li { color: var(--gris); }
.page-annexe p + p { margin-top: 0.8rem; }
.page-annexe ul { list-style: disc; padding-left: 1.3rem; margin-block: 0.8rem; }
.page-annexe li + li { margin-top: 0.35rem; }
.page-annexe a { color: var(--accent-fonce); }
.page-annexe strong { color: var(--encre); }
.page-annexe table { border-collapse: collapse; width: 100%; margin-block: 1rem; }
.page-annexe th, .page-annexe td {
  border: 1px solid var(--ligne);
  padding: 0.5rem 0.7rem;
  text-align: left;
  font-size: 0.92rem;
}

.encart-important {
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  padding: 1.1rem 1.4rem;
  margin-block: 1.4rem;
}
.placeholder-note {
  background: var(--creme);
  border: 1px dashed var(--accent);
  border-radius: var(--rayon);
  padding: 0.8rem 1.1rem;
  font-size: 0.88rem;
  margin-block: 1.2rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .app__grille { grid-template-columns: 1fr; }
  .app__telephones { min-height: 0; margin-top: 1rem; }
  .methode__grille { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .premium__prix { flex-direction: column; gap: 0.4rem; }
  .telephone--arriere { display: none; }
  .telephone--avant { transform: none; }
  body { padding-bottom: 4.5rem; } /* place pour la barre mobile */
  .oracle__demande { flex-direction: column; border-radius: var(--rayon); padding: 0.8rem; }
  .oracle__champ { padding: 0.4rem 0.6rem; text-align: center; }
  .oracle__bouton { width: 100%; padding-block: 0.85rem; }
}

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reponse { animation: none; }
  .reveler { opacity: 1; transform: none; transition: none; }
  .matiere, .badge, .bouton, .barre-mobile { transition: none; }
}
