/* Dispositif « Les guides » : l'index (/guides/, préfixe gx-) et les trois
   guides (/guides/{slug}/, préfixe gd-). Jetons du thème seulement ; tous les
   rayons passent par --rad. Composition sur l'axe central, lecture sur nacre.
   Contrastes : encre sur nacre 15,1:1, gris sur nacre 7,4:1, rose foncé sur nacre 5,4:1. */

/* ---------- Le guide : tête ---------- */
.gd { background: var(--nacre); padding-bottom: var(--sec); }
.gd-tete {
  padding: calc(var(--cadre-h) + clamp(1.4rem, 4svh, 2.6rem)) var(--gout) 0;
  display: grid; justify-items: center; text-align: center;
}
.gd-tete__genre { margin-top: 1.4rem; font-size: var(--t-s); font-weight: 500; color: var(--rose-f); }
.gd-tete__genre a { color: var(--rose-f); }
.gd-tete__t {
  margin-top: 0.7rem; max-width: 20em;
  font-family: var(--f-titre); font-weight: 300; font-size: var(--t-xl); line-height: 1.04; letter-spacing: -0.02em;
}
.gd-tete__t em { display: block; margin-top: 0.45rem; font-style: italic; font-size: var(--t-m); line-height: 1.25; letter-spacing: 0; color: var(--gris); }
.gd-tete__chapo { margin-top: 1.2rem; max-width: 36em; font-size: var(--t-ms); line-height: 1.55; color: var(--encre); }
.gd-tete__meta { margin-top: 1.1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem 0; font-size: var(--t-xs); color: var(--gris); }
.gd-tete__meta a { color: var(--encre); }
.gd-tete__lot { white-space: nowrap; }
@media (min-width: 700px) {
  .gd-tete__lot::before {
    --rad: var(--r-rond);
    content: ''; display: inline-block; width: 0.32rem; height: 0.32rem; margin: 0 0.8rem; vertical-align: 0.15em;
    border-radius: var(--rad); background: var(--argent-f);
  }
}
@media (max-width: 699px) { .gd-tete__meta { flex-direction: column; align-items: center; } }

/* Le miroir du guide, au centre, qui ouvre la lecture. */
.gd-glace { display: flex; justify-content: center; margin: clamp(1.8rem, 4vw, 2.6rem) auto 0; padding-inline: var(--gout); }
.gd-glace__m { --w: clamp(13rem, 9rem + 12vw, 21rem); }

/* ---------- Sommaire : une colonne centrée, deux sur grand écran ---------- */
.gd-sommaire {
  --rad: var(--r-vif);
  width: min(var(--conteneur), calc(100% - 2 * var(--gout))); margin: clamp(2rem, 4vw, 2.8rem) auto 0;
  padding: clamp(1.2rem, 3vw, 1.6rem) clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--argent); border-radius: var(--rad); background: var(--blanc);
  text-align: center;
}
.gd-sommaire__t { font-family: var(--f-titre); font-style: italic; font-weight: 300; font-size: var(--t-ms); color: var(--rose-f); }
.gd-sommaire__liste {
  margin-top: 0.8rem; display: grid; grid-template-columns: 1fr; gap: 0.15rem 2rem; justify-items: center;
}
.gd-sommaire__liste a {
  display: inline-block; padding: 0.4rem 0.2rem; font-size: var(--t-s); color: var(--encre);
  background: linear-gradient(var(--rose) 0 0) left bottom / 0 1px no-repeat;
  transition: background-size 0.45s var(--ease);
}
@media (hover: hover) { .gd-sommaire__liste a:hover { background-size: 100% 1px; } }
.gd-sommaire__liste a:focus-visible { background-size: 100% 1px; }
@media (min-width: 760px) {
  .gd-sommaire__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gd-sommaire__liste li:nth-child(odd) { justify-self: end; text-align: right; }
  .gd-sommaire__liste li:nth-child(even) { justify-self: start; text-align: left; }
  .gd-sommaire__liste li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; text-align: center; }
}

/* ---------- Corps : la largeur du conteneur, comme sur un article ---------- */
.gd-corps { width: min(var(--conteneur), calc(100% - 2 * var(--gout))); margin: clamp(2rem, 4vw, 3rem) auto 0; }
.gd-corps .prose > h3 { max-width: var(--lecture); margin-inline: auto; }
.gd-corps .prose > .gd-defile { overflow-x: auto; }
.gd-corps .prose > .gd-defile table { min-width: 30rem; margin-block: 0.4rem; }
.gd-corps .prose > blockquote[class$="-quote"] { max-width: var(--lecture); margin-inline: auto; }
.gd-corps .prose [class$="-key"] { margin-top: 0; }
.gd-corps .prose sup { font-size: 0.7em; line-height: 0; }

/* ---------- Articles reliés et autres guides ---------- */
.gd-relies { background: var(--perle); border-top: 1px solid var(--filet); }
.gd-voisins { padding: 0 var(--gout) var(--sec); background: var(--perle); text-align: center; }
.gd-voisins__t { font-family: var(--f-titre); font-weight: 300; font-size: var(--t-l); line-height: 1.1; }
.gd-voisins__liste { margin-top: 1.6rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem clamp(1.5rem, 5vw, 4rem); }
.gd-voisin__lien { display: flex; align-items: center; gap: 1rem; text-align: left; max-width: 22rem; }
.gd-voisin__m { --w: 5.5rem; --b: 4px; }
.gd-voisin__txt { display: grid; gap: 0.15rem; }
.gd-voisin__nom { font-family: var(--f-titre); font-size: var(--t-m); line-height: 1.15; }
.gd-voisin__sous { font-size: var(--t-s); color: var(--gris); }
@media (hover: hover) { .gd-voisin__lien:hover .gd-voisin__nom { color: var(--rose-f); } }
.gd-voisin__lien:focus-visible .gd-voisin__nom { color: var(--rose-f); }
.gd-voisins__liste > li:nth-child(2) .gd-voisin__lien { flex-direction: row-reverse; text-align: right; }

/* ---------- L'index : tête ---------- */
.gx-tete {
  padding: calc(var(--cadre-h) + clamp(1.4rem, 4svh, 2.6rem)) var(--gout) 0;
  display: grid; justify-items: center; text-align: center;
}
.gx-tete__t { margin-top: 1.4rem; font-family: var(--f-titre); font-weight: 300; font-size: var(--t-nom); line-height: 0.98; letter-spacing: -0.02em; }
.gx-tete__t em { display: block; margin-top: 0.6rem; font-style: italic; font-size: var(--t-l); line-height: 1.2; letter-spacing: -0.01em; color: var(--gris); }
.gx-tete__chapo { margin-top: 1.3rem; max-width: 36em; color: var(--encre); font-size: var(--t-ms); line-height: 1.55; }

/* ---------- Le trio : le pilier au centre, deux guides en symétrie ---------- */
.gx-trio { padding: clamp(2.5rem, 6vw, 4.5rem) var(--gout) var(--sec); }
.gx-trio__liste {
  width: min(72rem, 100%); margin-inline: auto;
  display: grid; grid-template-columns: 1fr; gap: clamp(3rem, 8vw, 4rem); justify-items: center;
}
.gx-guide { width: 100%; max-width: 24rem; }
.gx-guide--c { order: -1; }
.gx-guide__lien { display: grid; justify-items: center; text-align: center; }
.gx-guide__scene { display: flex; justify-content: center; align-items: flex-end; }
.gx-guide .m { --w: clamp(12rem, 8rem + 10vw, 15rem); }
.gx-guide--c .m { --w: clamp(15rem, 10rem + 14vw, 21rem); }
.gx-guide__txt { margin-top: 1.4rem; display: grid; justify-items: center; gap: 0.45rem; }
.gx-guide__genre { font-size: var(--t-xs); font-weight: 500; color: var(--rose-f); }
.gx-guide__t { font-family: var(--f-titre); font-weight: 300; font-size: var(--t-l); line-height: 1.1; letter-spacing: -0.015em; }
.gx-guide--c .gx-guide__t { font-size: var(--t-xl); }
.gx-guide__sous { text-wrap: balance; font-family: var(--f-titre); font-style: italic; font-weight: 300; font-size: var(--t-ms); color: var(--gris); }
.gx-guide__chapo { max-width: 26em; font-size: var(--t-s); line-height: 1.6; color: var(--encre); }
.gx-guide__meta { font-size: var(--t-xs); color: var(--gris); }
@media (hover: hover) { .gx-guide__lien:hover .m__glace img { scale: 1.04; } }

@media (min-width: 900px) {
  .gx-trio__liste { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; column-gap: clamp(1.5rem, 3vw, 3rem); }
  .gx-guide--c { order: 0; max-width: 26rem; }
  .gx-guide--g, .gx-guide--d { margin-top: clamp(6rem, 10vw, 9rem); }
}

/* ---------- La méthode : un axe, un texte centré ---------- */
.gx-methode { padding: 0 var(--gout) var(--sec); display: grid; justify-items: center; text-align: center; }
.gx-methode__axe { width: 1px; height: 3.5rem; background: linear-gradient(to bottom, transparent, var(--rose-f)); }
.gx-methode__t { margin-top: 1rem; font-family: var(--f-titre); font-weight: 300; font-size: var(--t-l); line-height: 1.1; }
.gx-methode__texte { margin-top: 1.1rem; max-width: var(--lecture); text-align: left; }
.gx-methode__texte p + p { margin-top: 0.9em; }
.gx-methode__outils { margin-top: 1.4rem; max-width: var(--lecture); font-size: var(--t-s); color: var(--gris); }
.gx-methode__outils a { color: var(--encre); }

/* Sur téléphone, les tableaux des guides s'empilent : une fiche par ligne, la
   première cellule en titre, aucune colonne perdue hors de l'écran. */
@media (max-width: 599px) {
  .gd-corps .prose > .gd-defile { overflow-x: visible; }
  .gd-corps .prose > .gd-defile table { min-width: 0; width: 100%; }
  .gd-tab thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .gd-tab, .gd-tab tbody, .gd-tab tr, .gd-tab td, .gd-tab th { display: block; width: auto; }
  .gd-tab tr { padding: 0.9rem 0.2rem; border-bottom: 1px solid var(--filet); text-align: center; }
  .gd-tab td, .gd-tab tbody th { padding: 0.15rem 0; border: 0; }
  .gd-tab tr > :first-child { font-family: var(--f-titre); font-size: var(--t-m); color: var(--encre); padding-bottom: 0.35rem; }
}
