/*
 * Pages « Linktree » (template-linktree.php)
 *
 * Feuille autonome, chargée uniquement sur ce template (cf. assets/bones.php).
 * Écrite directement en CSS et non en SCSS : le module ne dépend ainsi pas
 * d'une recompilation de theme.css, et reste copiable dans un autre thème.
 *
 * Couleur des boutons : --lt-btn-bg / --lt-btn-fg sont posées en style en
 * ligne par le template sur chaque bouton qui définit ses couleurs. Sans
 * valeur, on retombe sur --lt-btn-*-defaut, c'est-à-dire le noir/blanc du
 * thème choisi par la classe -texte-clair / -texte-sombre.
 */

.linktree {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  background-color: #ffffff;
}

.linktree-voile {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}

.linktree-voile.-sombre {
  background-color: rgba(0, 0, 0, 0.45);
}

.linktree-voile.-clair {
  background-color: rgba(255, 255, 255, 0.55);
}

.linktree-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

/* ---------------------------------------------------------------- EN-TÊTE */

.linktree-logo {
  margin: 0 auto 24px;
  max-width: 200px;
}

.linktree-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.linktree-titre {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
}

.linktree-intro {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.5;
}

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

/* ---------------------------------------------------------------- BOUTONS */

.linktree-liste {
  margin: 0;
  padding: 0;
  list-style: none;
}

.linktree-item {
  list-style: none;
}

.linktree-item + .linktree-item {
  margin-top: 14px;
}

.linktree-btn {
  display: block;
  padding: 16px 24px;
  border: 2px solid transparent;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

.linktree-btn:hover,
.linktree-btn:focus {
  text-decoration: none;
  transform: translateY(-2px);
  opacity: 0.9;
}

.linktree-btn:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.linktree-btn-label {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.linktree-btn-legend {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  opacity: 0.8;
}

.linktree-btn .licon {
  margin-right: 6px;
  vertical-align: baseline;
}

/* ----------------------------------------------------- TITRES DE GROUPE */

.linktree-groupe {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.linktree-item.-groupe {
  margin-top: 30px;
}

.linktree-item.-groupe:first-child {
  margin-top: 0;
}

.linktree-item.-groupe + .linktree-item {
  margin-top: 10px;
}

/* ------------------------------------------------------------- PIED */

/* Pas d'opacité ici : elle fausserait une couleur choisie dans l'éditeur. */
.linktree-pied {
  margin-top: 32px;
  font-size: 13px;
  line-height: 1.5;
}

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

/* --------------------------------------------------- THÈME CLAIR / SOMBRE */

/* Fond clair : textes sombres. */
.linktree.-texte-sombre {
  --lt-btn-bg-defaut: #121212;
  --lt-btn-fg-defaut: #ffffff;
  color: #121212;
}

.linktree.-texte-sombre .linktree-titre,
.linktree.-texte-sombre a:not(.linktree-btn) {
  color: #121212;
}

/* Fond sombre : textes clairs. */
.linktree.-texte-clair {
  --lt-btn-bg-defaut: #ffffff;
  --lt-btn-fg-defaut: #121212;
  color: #ffffff;
}

.linktree.-texte-clair .linktree-titre,
.linktree.-texte-clair a:not(.linktree-btn) {
  color: #ffffff;
}

/* ------------------------------------------------------ COULEUR DU BOUTON */

.linktree-btn.-plein {
  background-color: var(--lt-btn-bg, var(--lt-btn-bg-defaut));
  border-color: var(--lt-btn-bg, var(--lt-btn-bg-defaut));
  color: var(--lt-btn-fg, var(--lt-btn-fg-defaut));
}

/* En contour, la couleur du bouton porte le trait et le libellé. */
.linktree-btn.-contour {
  background-color: transparent;
  border-color: var(--lt-btn-bg, var(--lt-btn-bg-defaut));
  color: var(--lt-btn-bg, var(--lt-btn-bg-defaut));
}

/* ------------------------------------------------------------ RESPONSIVE */

@media (min-width: 768px) {
  .linktree-titre {
    font-size: 34px;
  }
}
