/* CSS pour la page Liens Genealogiques - GeneBase */
/* Adapte du style Niegle vers le design system GeneBase */

/* ========================================
   CONTENU PRINCIPAL
======================================== */

.links-content {
  background: var(--clr-bg);
  min-height: 60vh;
  padding: 3rem 0;
  padding-top: 6rem;
}

.links-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ========================================
   INTRODUCTION
======================================== */

.tool-intro {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--clr-bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-left: 4px solid var(--clr-accent);
  position: relative;
  overflow: hidden;
}

.tool-intro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-hover));
}

.tool-intro h2 {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--ff-heading);
  color: var(--clr-text);
  margin-bottom: 1rem;
}

.tool-intro p {
  font-size: 1.1rem;
  color: var(--clr-text-secondary);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

/* ========================================
   OUTIL DE RECHERCHE
======================================== */

.links-tool {
  background: var(--clr-bg-secondary);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-accent);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.links-tool::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-hover));
}

/* ========================================
   ETAPES
======================================== */

.step-container {
  margin-bottom: 2rem;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--clr-accent);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
}

.step-header h3 {
  font-size: 1.3rem;
  font-weight: 600;
  font-family: var(--ff-heading);
  color: var(--clr-text);
  margin: 0;
  flex: 1;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ========================================
   SECTION FAVORIS
======================================== */

.favorites-container {
  background: var(--clr-warning-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--clr-warning);
}

.favorites-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.favorites-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--ff-heading);
  color: var(--clr-text);
  margin: 0;
}

.clear-favorites-btn {
  background: var(--clr-error);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-favorites-btn:hover {
  background: #a93226;
  transform: translateY(-1px);
}

.favorites-selector {
  max-width: 400px;
}

/* ========================================
   SELECTEUR DE CATEGORIE ET THEME
======================================== */

.category-selector,
.theme-selector {
  max-width: 400px;
}

/* Grille des boutons de theme */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.theme-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--clr-bg-secondary);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
  color: var(--clr-text);
  text-align: left;
}

.theme-button:hover {
  background: var(--clr-accent);
  color: white;
  border-color: var(--clr-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-button .icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.theme-button .text {
  flex: 1;
}

/* Bouton retour */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--clr-bg-secondary);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.back-button:hover {
  background: var(--clr-accent);
  color: white;
  border-color: var(--clr-accent);
  transform: translateX(-2px);
}

/* Boutons d'action (signaler et proposer) */
.report-button,
.contribute-button {
  background: var(--clr-accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.contribute-button {
  background: var(--clr-success);
}

.report-button:hover {
  background: var(--clr-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contribute-button:hover {
  background: var(--clr-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.report-button:active,
.contribute-button:active {
  transform: translateY(0);
}

.form-select {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--clr-bg-secondary);
  color: var(--clr-text);
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-select:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px var(--clr-accent-light);
  transform: translateY(-2px);
}

.form-select:hover {
  border-color: var(--clr-accent);
}

/* ========================================
   GRILLE DES LIENS
======================================== */

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.link-card {
  background: var(--clr-bg-secondary);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--clr-accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

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

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--clr-accent);
}

.link-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.link-title {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--ff-heading);
  color: var(--clr-text);
  margin: 0;
  flex: 1;
}

.favorite-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.favorite-btn:hover {
  transform: scale(1.2);
}

.favorite-btn.active {
  filter: brightness(1.2);
}

.link-description {
  font-size: 0.95rem;
  color: var(--clr-text-secondary);
  line-height: 1.5;
  margin: 0;
}

.link-url {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--clr-accent);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  margin-top: auto;
}

.link-url:hover {
  background: var(--clr-accent-hover);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.link-url::after {
  content: '\2192';
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.link-url:hover::after {
  transform: translateX(4px);
}

/* ========================================
   MESSAGE D'INFORMATION
======================================== */

.info-message {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--clr-info-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
}

.info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--clr-info);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-style: italic;
}

.info-message p {
  margin: 0;
  font-size: 1rem;
}

/* ========================================
   DESCRIPTION DU THEME
======================================== */

.theme-story {
  background: var(--clr-bg-secondary);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
}

.theme-story::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-hover));
}

.theme-story h3 {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--ff-heading);
  color: var(--clr-text);
  margin-bottom: 1.5rem;
  text-align: center;
}

.story-content {
  font-size: 1rem;
  color: var(--clr-text);
  line-height: 1.7;
  text-align: justify;
}

.story-content p {
  margin-bottom: 1rem;
}

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

.story-highlight {
  color: var(--clr-accent);
  font-weight: 600;
}

/* ========================================
   THEME SOMBRE
======================================== */

[data-theme="dark"] .links-content {
  background: var(--clr-bg);
}

[data-theme="dark"] .tool-intro,
[data-theme="dark"] .links-tool,
[data-theme="dark"] .theme-story {
  background: var(--clr-bg-secondary);
  border-color: var(--clr-border);
}

[data-theme="dark"] .form-select,
[data-theme="dark"] .link-card {
  background: var(--clr-bg-secondary);
  border-color: var(--clr-border);
  color: var(--clr-text);
}

[data-theme="dark"] .form-select:focus {
  border-color: var(--clr-accent);
}

[data-theme="dark"] .link-card:hover {
  border-color: var(--clr-accent);
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
  .links-content {
    padding-top: 5rem;
  }

  .tool-intro {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .tool-intro h2 {
    font-size: 1.5rem;
  }

  .tool-intro p {
    font-size: 1rem;
  }

  .links-tool {
    padding: 2rem 1.5rem;
  }

  .step-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }

  .report-button,
  .contribute-button {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
  }

  .themes-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .links-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .link-card {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .links-container {
    padding: 0 0.75rem;
  }

  .tool-intro {
    padding: 1rem;
  }

  .tool-intro h2 {
    font-size: 1.3rem;
  }

  .links-tool {
    padding: 1.5rem 1rem;
  }

  .step-number {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }

  .step-header h3 {
    font-size: 1.1rem;
  }

  .form-select {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }

  .link-card {
    padding: 1rem;
  }

  .link-title {
    font-size: 1.1rem;
  }
}

/* ========================================
   SECTIONS SEO
======================================== */

.seo-content {
  background: var(--clr-bg);
  padding: 4rem 0;
  border-top: 1px solid var(--clr-border);
}

.faq-section,
.themes-section {
  background: var(--clr-bg-secondary);
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-accent);
  position: relative;
  overflow: hidden;
}

.faq-section::before,
.themes-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-hover));
}

.faq-section h2,
.themes-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--ff-heading);
  color: var(--clr-text);
  margin-bottom: 2rem;
  text-align: center;
}

.faq-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--clr-accent-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--clr-accent);
}

.faq-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--ff-heading);
  color: var(--clr-accent);
  margin-bottom: 1rem;
}

.faq-item p {
  line-height: 1.6;
  color: var(--clr-text);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.theme-type {
  padding: 1.5rem;
  background: var(--clr-accent-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--clr-accent);
}

.theme-type h3 {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--ff-heading);
  color: var(--clr-accent);
  margin-bottom: 1rem;
}

.theme-type p {
  line-height: 1.6;
  color: var(--clr-text);
  font-size: 0.95rem;
}

/* Responsive pour les sections SEO */
@media (max-width: 768px) {
  .seo-content {
    padding: 2rem 0;
  }

  .faq-section,
  .themes-section {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }

  .faq-section h2,
  .themes-section h2 {
    font-size: 1.5rem;
  }

  .theme-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .faq-item,
  .theme-type {
    padding: 1rem;
  }
}
