/* Version : 1.1 */
/* =====================================================================
   QuantumSite — page « Le spin »
   Complète css/style.css (en-tête, couleurs du site).
   Même fond, mêmes marges et même typographie que la page « Le solide ».
   ===================================================================== */

.page-spin {
  --serif: "Spectral", "Cambria Math", "STIX Two Text", Georgia, serif;
  --trait: rgba(159, 179, 214, 0.22);
}

/* L'image de l'accueil, floutée et assombrie, fixée derrière le contenu */
.page-spin::before {
  content: "";
  position: fixed;
  inset: -40px;
  z-index: -1;
  background: url("../images/fond-accueil.jpeg") center / cover no-repeat;
  filter: blur(30px) brightness(0.32) saturate(1.2);
}

.spin {
  padding: calc(var(--hauteur-entete) + 2.75rem) clamp(1rem, 3vw, 3.5rem) 4rem;
}

/* ---------- Titre ---------- */

.spin-titre {
  margin: 0 0 clamp(1.5rem, 3.5vh, 2.25rem);
  padding-left: 1.1rem;
  border-left: 3px solid var(--cyan);
}

.spin-titre h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--texte);
}

.spin-titre .sous-titre {
  margin: 0.45rem 0 0;
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  color: var(--texte-doux);
}

/* ---------- Parties ---------- */

.partie {
  padding: clamp(1.6rem, 3.5vh, 2.2rem) 0;
  border-top: 1px solid var(--trait);
  scroll-margin-top: calc(var(--hauteur-entete) + 1rem);
}

.partie h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--texte);
}

.partie p {
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-size: clamp(1.02rem, 1.15vw, 1.14rem);
  line-height: 1.7;
  color: #d5e0f5;
  hyphens: auto;
}

.partie p:last-child { margin-bottom: 0; }

.partie a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(95, 212, 255, 0.45);
  text-underline-offset: 0.18em;
}
.partie a:hover { text-decoration-color: var(--cyan); }
.partie a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 2px; }

.partie b { font-weight: 500; color: var(--texte); }

/* ---------- Chapeau ---------- */

.partie .chapeau {
  font-size: clamp(1.1rem, 1.35vw, 1.3rem);
  color: #e3ebfa;
}

/* ---------- Sommaire ---------- */

.sommaire {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  margin: 0 0 clamp(1rem, 2.5vh, 1.6rem);
}

.sommaire a {
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(95, 212, 255, 0.35);
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--texte-doux);
  text-decoration: none;
  background: rgba(8, 20, 48, 0.45);
  transition: color .2s, border-color .2s;
}
.sommaire a:hover { color: var(--texte); border-color: var(--cyan); }
.sommaire a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- Listes ---------- */

.puces, .encadre ol {
  margin: 0 0 1.1rem;
  padding-left: 1.3rem;
}

.puces li, .encadre li {
  margin-bottom: 0.55rem;
  font-family: var(--serif);
  font-size: clamp(1.02rem, 1.15vw, 1.14rem);
  line-height: 1.7;
  color: #d5e0f5;
}
.puces li::marker, .encadre li::marker { color: var(--cyan); }

.partie p { max-width: none; }

/* ---------- Illustrations (dessins sur fond clair, posés sur une carte blanche) ---------- */

.illustration {
  margin: 1.4rem 0;
}

.illustration .cadre {
  display: block;
  padding: clamp(0.4rem, 1vw, 0.9rem);
  border: 1px solid rgba(159, 179, 214, 0.35);
  border-radius: 14px;
  background: #fbfaf7;
  box-shadow: 0 18px 50px rgba(2, 8, 24, 0.55);
}

.illustration img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
}

.illustration figcaption {
  margin-top: 0.7rem;
  font-size: 0.95rem;
  color: var(--texte-doux);
}

.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  align-items: start;
}
.duo.trio { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.duo .illustration .cadre { display: flex; align-items: center; justify-content: center; min-height: 100%; }
.duo .illustration { margin: 1.4rem 0 0; max-width: none; }
.duo .illustration img { height: clamp(220px, 22vw, 420px); max-height: none; width: 100%; }

/* ---------- Encadré ---------- */

.encadre {
  padding: clamp(1rem, 2.5vw, 1.6rem) clamp(1rem, 2.5vw, 1.8rem);
  border: 1px solid rgba(95, 212, 255, 0.35);
  border-left: 3px solid var(--cyan);
  border-radius: 0 10px 10px 0;
  background: rgba(8, 20, 48, 0.62);
}
.partie .encadre h2 { font-size: clamp(1.3rem, 2.1vw, 1.75rem); }
.encadre ol { margin-bottom: 0; }

/* ---------- Tableau des spins ---------- */

.tableau-spin {
  margin: 0.4rem 0 1.3rem;
  border-collapse: collapse;
  width: 100%;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  color: #d5e0f5;
  background: rgba(8, 20, 48, 0.55);
  border-radius: 10px;
  overflow: hidden;
}

.tableau-spin th {
  padding: 0.6rem 1.1rem;
  text-align: left;
  font-family: "Jost", system-ui, sans-serif;
  font-weight: 500;
  color: var(--texte);
  background: rgba(95, 212, 255, 0.14);
  border-bottom: 1px solid rgba(95, 212, 255, 0.4);
}

.tableau-spin td {
  padding: 0.55rem 1.1rem;
  border-bottom: 1px solid var(--trait);
}
.tableau-spin td:first-child { font-weight: 500; color: var(--cyan); white-space: nowrap; }
.tableau-spin tr.hypothese td { font-style: italic; color: var(--texte-doux); }
.tableau-spin tr:last-child td { border-bottom: none; }

/* ---------- Écrans étroits ---------- */

@media (max-width: 900px) {
  .spin { padding-top: calc(var(--hauteur-entete) + 1.75rem); }
}

@media (prefers-reduced-motion: reduce) {
  .sommaire a { transition: none; }
}
