/* Styles dedies a annexes/exemples/index.html */

.examples-main {
  display: grid;
  gap: 1.6rem;
}

.examples-hero,
.examples-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(223, 213, 235, 0.14) 100%);
  border: 1px solid rgba(137, 134, 147, 0.28);
  border-radius: 18px;
  box-shadow: var(--ombre-legere);
}

.examples-hero {
  padding: 1.5rem 1.4rem 1.35rem;
  background:
    radial-gradient(circle at top right, rgba(225, 177, 77, 0.22), transparent 24%),
    radial-gradient(circle at left center, rgba(110, 48, 113, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(223, 213, 235, 0.18) 100%);
}

.examples-hero h1 {
  text-align: left;
  margin: 0 0 0.8rem;
  padding-bottom: 0;
  border-bottom: none;
}

.examples-lead {
  max-width: 760px;
  margin: 0;
  color: rgba(47, 48, 49, 0.88);
  font-size: 1rem;
}

.examples-section {
  padding: 1.25rem;
}

.examples-section > h2 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.examples-section-intro {
  margin: 0 0 1rem;
  color: rgba(47, 48, 49, 0.82);
}

.story-meta.examples-meta {
  margin: 0;
}

.examples-meta .story-meta-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(223, 213, 235, 0.16) 100%);
  border-color: rgba(110, 48, 113, 0.16);
  padding: 1rem;
}

.examples-meta .story-meta-card p {
  color: rgba(47, 48, 49, 0.78);
}

.examples-grid {
  margin-top: 0.85rem;
}

.example-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  margin-bottom: 0;
  padding: 1.05rem 1.05rem 1rem;
  border-radius: 16px;
  border-color: rgba(110, 48, 113, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(110, 48, 113, 0.06) 100%);
  transition: transform var(--transition-fluide), box-shadow var(--transition-fluide), border-color var(--transition-fluide);
}

.example-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ombre-hover);
  border-color: rgba(225, 177, 77, 0.55);
}

.example-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.example-card h3 {
  margin: 0;
  line-height: 1.3;
}

.example-card p {
  margin: 0;
  color: rgba(47, 48, 49, 0.82);
}

.example-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(110, 48, 113, 0.09);
  border: 1px solid rgba(110, 48, 113, 0.14);
  color: var(--couleur-coeur-mystique);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.example-card-footer {
  margin-top: auto;
  padding-top: 0.2rem;
}

.example-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.9rem;
  border-radius: 10px;
  background: rgba(110, 48, 113, 0.08);
  border: 1px solid rgba(110, 48, 113, 0.14);
  color: var(--couleur-coeur-mystique);
  font-weight: 600;
  text-decoration: none;
}

.example-link:hover {
  opacity: 1;
  text-decoration: none;
  background: rgba(225, 177, 77, 0.14);
  border-color: rgba(225, 177, 77, 0.4);
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: 16px;
  box-shadow: var(--ombre-legere);
}

.example-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.98);
}

.example-table caption {
  padding: 0.95rem 1rem;
  background: linear-gradient(90deg, rgba(110, 48, 113, 0.9), rgba(110, 48, 113, 0.72));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: left;
  caption-side: top;
}

.example-table th,
.example-table td {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(110, 48, 113, 0.12);
  text-align: left;
  vertical-align: top;
}

.example-table th {
  background: rgba(110, 48, 113, 0.08);
  color: var(--couleur-coeur-mystique);
  font-size: 0.9rem;
  font-weight: 700;
}

.example-table tbody tr:nth-child(even) {
  background: rgba(110, 48, 113, 0.03);
}

.example-table tbody tr:hover {
  background: rgba(225, 177, 77, 0.1);
}

.example-table-accent caption {
  background: linear-gradient(90deg, rgba(225, 177, 77, 0.92), rgba(184, 132, 28, 0.86));
}

.test-image-card {
  margin: 0;
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(110, 48, 113, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(110, 48, 113, 0.04) 100%);
  box-shadow: var(--ombre-legere);
}

.test-image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
}

.test-image-card figcaption {
  margin-top: 0.65rem;
  color: rgba(47, 48, 49, 0.75);
  font-size: 0.9rem;
}

.test-bench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.test-bench-card {
  margin: 0;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(110, 48, 113, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(110, 48, 113, 0.05) 100%);
  box-shadow: var(--ombre-legere);
}

.test-bench-card h3 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
}

.test-bench-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.05);
}

.test-bench-note {
  margin: 0.7rem 0 0.5rem;
  color: rgba(47, 48, 49, 0.82);
  font-size: 0.92rem;
}

.test-bench-code {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(110, 48, 113, 0.14);
  background: rgba(110, 48, 113, 0.06);
  color: var(--couleur-coeur-mystique);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.84rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.gallery-demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-demo-card,
.gallery-demo-trigger {
  margin: 0;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(110, 48, 113, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(110, 48, 113, 0.05) 100%);
  box-shadow: var(--ombre-legere);
}

.gallery-demo-trigger {
  width: 100%;
  display: grid;
  gap: 0.65rem;
  text-align: left;
  cursor: pointer;
}

.gallery-demo-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.05);
}

.gallery-demo-card h3,
.gallery-demo-trigger span {
  margin: 0.55rem 0 0.2rem;
  color: var(--couleur-coeur-mystique);
  font-weight: 700;
}

.gallery-demo-card p {
  margin: 0;
  color: rgba(47, 48, 49, 0.82);
}

.demo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(7, 8, 10, 0.85);
  display: grid;
  align-items: center;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 0.7rem;
  padding: 1.2rem;
}

.demo-lightbox-figure {
  margin: 0;
  display: grid;
  gap: 0.65rem;
  justify-items: center;
}

.demo-lightbox-figure img {
  display: block;
  width: min(100%, 980px);
  max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.15);
}

.demo-lightbox-figure figcaption {
  color: #fff;
  text-align: center;
}

.demo-lightbox-close,
.demo-lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
}

.demo-lightbox-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  line-height: 1;
}

.demo-lightbox-nav {
  width: 100%;
  height: 54px;
  font-size: 1.7rem;
}

@media (max-width: 720px) {
  .examples-hero,
  .examples-section {
    padding: 1rem;
  }

  .example-card-header {
    flex-direction: column;
  }

  .example-tag {
    white-space: normal;
  }

  .example-table {
    min-width: 620px;
  }

  .demo-lightbox {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .demo-lightbox-nav {
    width: 100%;
    max-width: 260px;
    justify-self: center;
  }
}
