/* =====================================================
   Tyshara — Page Réseaux (v1.0, juillet 2025)
   -----------------------------------------------------
   • Palette et variables globales
   • Wrapper & container
   • Sidebar navigation
   • Slides & animations
   • Typography & links
   • Responsive & accessibility helpers
   =====================================================*/

/* ----------  Root palette (Tyshara — capsule neutre) ---------- */
:root {
  --ts-bg-grad-start: #fdf7f2;
  --ts-bg-grad-end: #f8efea;
  --ts-accent: #d08f7b;        /* terracotta premier plan */
  --ts-accent-dark: #b56e5f;
  --ts-neutral-light: #fffaf7; /* blanc cassé */
  --ts-neutral: #faf2e7;       /* beige clair */
  --ts-text: #3a2b28;          /* brun profond lisible */
  --ts-shadow: 0 8px 24px rgba(0,0,0,.06);
}

/* ----------  Flow & global typography  ---------- */
.reseaux-carousel-wrapper {
  padding: clamp(2rem, 4vw, 4rem);
  /* hauteur auto — laisse respirer la page ; min-height garantit présence */
  min-height: calc(100vh - 120px);
  background: linear-gradient(135deg, var(--ts-bg-grad-start), var(--ts-bg-grad-end));
  font-family: 'Montserrat', sans-serif;
  color: var(--ts-text);
  border-radius: 1.5rem;
  box-shadow: var(--ts-shadow);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.reseaux-carousel-container {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  gap: 2rem;
  align-items: flex-start;
  max-width: 1600px;
}

/* ----------  Sidebar navigation  ---------- */
.reseaux-sidebar-nav {
  flex: 0 0 220px;
  background: var(--ts-neutral);
  padding: 1.25rem;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 120px; /* reste visible lors du scroll */
}

.reseaux-sidebar-nav button {
  all: unset;
  cursor: pointer;
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 99rem;
  text-align: left;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 500;
  background: var(--ts-neutral-light);
  color: var(--ts-text);
  border: 2px solid transparent;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.reseaux-sidebar-nav button:hover,
.reseaux-sidebar-nav button:focus-visible {
  background: var(--ts-accent-dark);
  color: #fff;
}

.reseaux-sidebar-nav button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.reseaux-sidebar-nav button.active {
  background: var(--ts-accent);
  color: #fff;
  font-weight: 600;
}

/* ----------  Slides container  ---------- */
.reseaux-carousel-slides {
  flex: 1 1 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  background: var(--ts-neutral-light);
  border-radius: 1rem;
  padding: clamp(1rem, 2vw, 2rem);
  position: relative;
}

/* ----------  Individual slide  ---------- */
.reseau-slide {
  width: 100%;
  max-width: 900px;
  display: none; /* masqué par défaut */
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: var(--ts-shadow);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  overflow-y: auto;
  max-height: 75vh;
}

.reseau-slide.active {
  display: block;
  animation: fadeIn .6s ease-in-out;
}

/* ----------  Typography & links ---------- */
.reseau-slide h2,
.reseau-slide h3 {
  font-family: 'Satisfy', cursive;
  margin-top: 0;
  margin-bottom: .75em;
  line-height: 1.25;
  color: var(--ts-accent-dark);
}

.reseau-slide p {
  margin-block: .75rem;
  line-height: 1.6;
  max-width: 65ch;
}

.reseau-slide a {
  color: var(--ts-accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s ease;
}

.reseau-slide a:hover,
.reseau-slide a:focus-visible {
  color: var(--ts-accent);
}

/* ----------  Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Respecte la préférence “réduire les animations” */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ----------  Responsive ---------- */
@media (max-width: 960px) {
  .reseaux-carousel-container {
    flex-direction: column;
  }

  .reseaux-sidebar-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: .75rem;
    width: 100%;
    top: 0;
    position: relative;
  }

  .reseaux-sidebar-nav button {
    flex: 1 0 auto;
    text-align: center;
    white-space: nowrap;
  }

  .reseaux-carousel-slides {
    max-height: none;
  }

  .reseau-slide {
    max-height: none;
  }
}

@media (max-width: 600px) {
  .reseaux-carousel-wrapper {
    padding: 1rem;
    border-radius: 0;
  }

  .reseaux-sidebar-nav {
    padding: .75rem;
  }
}

/* ===================================================== */
