/* ============================================
   NIVEAU 15 — LES LIENS
   Styles specifiques au chapitre des liens
   ============================================ */

/* ---------- LVHFA DEMO ---------- */
.lvhfa-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.lvhfa-item {
  text-align: center;
}

.lvhfa-link {
  display: inline-block;
  padding: 0.5em 1em;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 6px;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lvhfa-link-state {
  color: #2563eb;
}

.lvhfa-visited-state {
  color: #7c3aed;
}

.lvhfa-hover-state {
  color: #1d4ed8;
  text-decoration: underline;
}

.lvhfa-active-state {
  color: #dc2626;
  text-decoration: underline;
}

.lvhfa-focus-state {
  color: #2563eb;
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.lvhfa-label {
  display: block;
  font-size: 0.8rem;
  color: var(--couleur-texte-clair);
  font-family: var(--police-code);
  margin-top: 0.5rem;
}

/* ---------- TEXT DECORATION DEMO ---------- */
.deco-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.deco-item {
  text-align: center;
}

.deco-link {
  display: inline-block;
  padding: 0.5em 1em;
  font-size: 1rem;
  font-weight: 600;
  color: #2563eb;
}

.deco-underline {
  text-decoration: underline;
}

.deco-overline {
  text-decoration: overline;
}

.deco-line-through {
  text-decoration: line-through;
}

.deco-dashed {
  text-decoration: underline dashed;
}

.deco-dotted {
  text-decoration: underline dotted;
}

.deco-double {
  text-decoration: underline double;
}

.deco-wavy {
  text-decoration: underline wavy #ef4444;
}

.deco-offset {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ---------- UNDERLINE ANIMATION DEMO ---------- */
.anim-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.anim-item {
  width: 100%;
}

/* Sliding from left */
.link-slide-demo {
  position: relative;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  padding-bottom: 2px;
}

.link-slide-demo::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #2563eb;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.link-slide-demo:hover::after {
  transform: scaleX(1);
}

/* Sliding from center */
.link-center-demo {
  position: relative;
  color: #7c3aed;
  text-decoration: none;
  font-weight: 600;
  padding-bottom: 2px;
}

.link-center-demo::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #7c3aed;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.link-center-demo:hover::after {
  transform: scaleX(1);
}

/* Sliding from right */
.link-right-demo {
  position: relative;
  color: #16a34a;
  text-decoration: none;
  font-weight: 600;
  padding-bottom: 2px;
}

.link-right-demo::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #16a34a;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.link-right-demo:hover::after {
  transform: scaleX(1);
}

/* Highlight background */
.link-highlight-demo {
  position: relative;
  color: #1e293b;
  text-decoration: none;
  font-weight: 600;
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

.link-highlight-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #dbeafe;
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  z-index: -1;
}

.link-highlight-demo:hover::before {
  transform: scaleX(1);
}

/* Arrow link */
.link-arrow-demo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #ec4899;
  text-decoration: none;
  font-weight: 600;
  transition: gap 0.3s ease;
}

.link-arrow-demo:hover {
  gap: 0.75rem;
}

/* ---------- SHAPE GRID DEMO ---------- */
.shape-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.shape-item {
  text-align: center;
}

.shape-link {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.shape-plain {
  color: #2563eb;
}

.shape-plain:hover {
  text-decoration: underline;
}

.shape-btn {
  padding: 0.6em 1.5em;
  background: #2563eb;
  color: white;
  border-radius: 8px;
}

.shape-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.shape-outline {
  padding: 0.6em 1.5em;
  border: 2px solid #2563eb;
  color: #2563eb;
  border-radius: 8px;
  background: transparent;
}

.shape-outline:hover {
  background: #2563eb;
  color: white;
}

.shape-pill {
  padding: 0.3em 0.8em;
  background: #f1f5f9;
  color: #475569;
  border-radius: 9999px;
  font-size: 0.9rem;
}

.shape-pill:hover {
  background: #2563eb;
  color: white;
}

.shape-ghost {
  padding: 0.6em 1.5em;
  color: #2563eb;
  border-radius: 8px;
  background: transparent;
}

.shape-ghost:hover {
  background: #f1f5f9;
}

/* ---------- LINK BASIC DEMO ---------- */
.link-basic-demo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.link-basic-example {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  transition: color 0.3s ease;
}

.link-basic-example:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.link-basic-example:active {
  color: #dc2626;
}

.link-basic-example:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.link-basic-demo p {
  font-size: 0.85rem;
  color: var(--couleur-texte-clair);
  margin-top: 0.75rem;
}

/* ---------- LINK SLIDE DEMO SECTION ---------- */
.link-slide-demo-section {
  text-align: center;
  margin-bottom: 1.5rem;
}

.link-slide-example {
  position: relative;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding-bottom: 4px;
}

.link-slide-example::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #2563eb;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.link-slide-example:hover::after {
  transform: scaleX(1);
}

.link-slide-example:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- LINK HIGHLIGHT DEMO SECTION ---------- */
.link-highlight-demo-section {
  text-align: center;
  margin-bottom: 1.5rem;
}

.link-highlight-example {
  position: relative;
  color: #1e293b;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

.link-highlight-example::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #dbeafe;
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  z-index: -1;
}

.link-highlight-example:hover::before {
  transform: scaleX(1);
}

.link-highlight-example:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ---------- LINK BTN DEMO SECTION ---------- */
.link-btn-demo-section {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.link-btn-example {
  display: inline-block;
  padding: 0.6em 1.5em;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
}

.link-btn-example:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.link-btn-example:active {
  transform: translateY(0);
}

.link-btn-example:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.link-btn-outline-example {
  display: inline-block;
  padding: 0.6em 1.5em;
  border: 2px solid #2563eb;
  color: #2563eb;
  background: transparent;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s ease, color 0.3s ease;
}

.link-btn-outline-example:hover {
  background: #2563eb;
  color: white;
}

.link-btn-outline-example:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ---------- NAV DEMO SECTION ---------- */
.nav-demo-section {
  margin-bottom: 1.5rem;
}

.nav-demo {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
}

.nav-demo-link {
  position: relative;
  padding: 0.75rem 1.25rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-demo-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #2563eb;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-demo-link:hover {
  color: #1e293b;
}

.nav-demo-link:hover::after,
.nav-demo-link.active::after {
  transform: scaleX(1);
}

.nav-demo-link.active {
  color: #2563eb;
}

.nav-demo-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
  border-radius: 4px;
}

/* ---------- BREADCRUMB DEMO SECTION ---------- */
.breadcrumb-demo-section {
  margin-bottom: 1.5rem;
}

.breadcrumb-demo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.breadcrumb-demo a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-demo a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.breadcrumb-demo a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
}

.breadcrumb-sep {
  color: #94a3b8;
  user-select: none;
}

.breadcrumb-current {
  color: #64748b;
}

/* ---------- SOCIAL DEMO SECTION ---------- */
.social-demo-section {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.social-demo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.social-demo-link:hover {
  color: white;
  transform: translateY(-3px);
}

.social-github:hover { background: #24292e; }
.social-twitter:hover { background: #1da1f2; }
.social-linkedin:hover { background: #0077b5; }
.social-youtube:hover { background: #ff0000; }
.social-email:hover { background: #ea580c; }

.social-demo-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ---------- SKIP LINK DEMO SECTION ---------- */
.skip-demo-section {
  margin-bottom: 1.5rem;
  position: relative;
}

.skip-demo {
  position: relative;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px dashed #e2e8f0;
}

.skip-hidden-text {
  font-size: 0.9rem;
  color: var(--couleur-texte-clair);
}

.skip-note {
  font-size: 0.85rem;
  color: var(--couleur-texte-clair);
  margin-top: 0.5rem;
}

/* ---------- EXTERNAL LINK DEMO SECTION ---------- */
.external-demo-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.external-demo-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.external-demo-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.external-demo-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- CONTEXTS DEMO ---------- */
.contexts-demo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.context-card {
  background: white;
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  padding: 1.25rem;
}

.context-card h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.ctx-text-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.ctx-text-link:hover {
  color: #1d4ed8;
}

.ctx-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--couleur-bordure);
  transition: background 0.2s ease;
}

.ctx-card-link:hover {
  background: #f8fafc;
}

.ctx-card-link strong {
  display: block;
  margin-bottom: 0.25rem;
}

.ctx-card-link span {
  font-size: 0.85rem;
  color: var(--couleur-texte-clair);
}

.ctx-nav-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  color: #475569;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.ctx-nav-link:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.ctx-nav-link.active {
  background: #dbeafe;
  color: #2563eb;
}

.ctx-nav-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .lvhfa-demo {
    flex-direction: column;
    align-items: center;
  }

  .shape-grid {
    flex-direction: column;
  }

  .contexts-demo {
    grid-template-columns: 1fr;
  }

  .nav-demo {
    flex-direction: column;
    border-bottom: none;
    border-right: 2px solid #e2e8f0;
  }

  .nav-demo-link::after {
    bottom: 0;
    top: 0;
    left: auto;
    right: -2px;
    width: 2px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: center;
  }

  .nav-demo-link:hover::after,
  .nav-demo-link.active::after {
    transform: scaleY(1);
  }
}