/* ============================================
   PARTENAIRE PROJETS — RESSOURCES PAGE
   Styles spécifiques à la page Ressources
   Hérite des variables CSS de style.css
   ============================================ */

/* ============================================
   NAV ACTIVE STATE
   ============================================ */
.nav-desktop a.nav-active,
.nav-mobile a.nav-active {
  color: var(--orange-deep);
  font-weight: 600;
}
.nav-desktop a.nav-active::after {
  width: 100% !important;
}

/* ============================================
   HERO RESSOURCES
   ============================================ */
.res-hero {
  position: relative;
  padding: calc(110px + 2.5rem) 0 4rem;
  background: linear-gradient(180deg, var(--cream) 0%, var(--off-white) 100%);
  overflow: hidden;
}

.res-hero-diamond {
  position: absolute;
  border-radius: 18%;
  z-index: 0;
  pointer-events: none;
}
.res-hero-diamond-1 {
  width: 480px; height: 480px;
  top: -140px; right: -180px;
  background: var(--orange);
  opacity: 0.12;
  transform: rotate(45deg);
  animation: float 18s ease-in-out infinite;
}
.res-hero-diamond-2 {
  width: 200px; height: 200px;
  bottom: -60px; left: -60px;
  background: var(--teal);
  opacity: 0.09;
  transform: rotate(45deg);
  animation: float 22s ease-in-out infinite reverse;
}

.res-hero .container {
  position: relative;
  z-index: 2;
}

.res-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 1.8rem;
  padding: 0.5rem 0.9rem 0.5rem 0.7rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  transition: all 0.25s var(--ease);
  text-decoration: none;
}
.res-back:hover {
  color: var(--orange-deep);
  border-color: var(--orange);
  transform: translateX(-3px);
}
.res-back svg { transition: transform 0.25s var(--ease); }
.res-back:hover svg { transform: translateX(-2px); }

.res-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--teal-dark);
  margin: 0.8rem 0 1.3rem;
  max-width: 800px;
}
.res-hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--orange-deep);
}

.res-hero-lead {
  font-size: 1.1rem;
  color: var(--gray-700);
  line-height: 1.6;
  max-width: 720px;
  margin-bottom: 2rem;
}
.res-hero-lead strong {
  color: var(--teal-dark);
  font-weight: 600;
}

.res-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--gray-700);
  box-shadow: var(--shadow-sm);
}
.meta-pill svg {
  color: var(--orange-deep);
  flex-shrink: 0;
}
.meta-pill strong {
  color: var(--teal-dark);
  font-weight: 600;
}

/* ============================================
   LÉGENDE BAND
   ============================================ */
.res-legend {
  background: var(--teal-dark);
  padding: 1.1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 2px solid var(--orange);
}
.res-legend .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}
.legend-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-right: 0.5rem;
}

.access-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1;
}
.access-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Free — teal-tint background with teal-dark text (brand-coherent green-ish) */
.access-free {
  background: var(--teal-tint);
  color: var(--teal-dark);
  border: 1px solid #B4D2D5;
}
.access-free svg { color: var(--teal-dark); }

/* Mixed — orange-tint background with orange-deep text (warning-ish brand color) */
.access-mixed {
  background: var(--orange-tint);
  color: var(--orange-deep);
  border: 1px solid #F5D9A8;
}
.access-mixed svg { color: var(--orange-deep); }

/* Paid — dark teal with cream text (premium feel) */
.access-paid {
  background: var(--teal-dark);
  color: var(--orange);
  border: 1px solid var(--teal-dark);
}
.access-paid svg { color: var(--orange); }

/* ============================================
   MAIN CONTENT
   ============================================ */
.res-main {
  padding: 4rem 0 5rem;
  background: var(--cream);
}

.res-section {
  margin-bottom: 4rem;
}
.res-section:last-of-type {
  margin-bottom: 3rem;
}

.res-section-head {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--orange);
}
@media (max-width: 600px) {
  .res-section-head {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
}

.res-section-icon {
  width: 56px;
  height: 56px;
  background: var(--teal-dark);
  color: var(--orange);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.res-section-icon::before {
  content: '';
  position: absolute;
  inset: -3px;
  border: 1px dashed var(--orange);
  border-radius: calc(var(--radius-md) + 3px);
  opacity: 0.4;
}
.res-section-icon svg {
  width: 26px;
  height: 26px;
}

.res-section-info {
  flex: 1;
  min-width: 0;
}
.res-section-info h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 600;
  color: var(--teal-dark);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.res-section-info p {
  font-size: 0.92rem;
  color: var(--gray-500);
  line-height: 1.4;
  margin: 0;
}

.res-section-count {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-deep);
  background: var(--orange-tint);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .res-section-count { margin-left: 56px + 1.2rem; }
}

/* ============================================
   TABLE
   ============================================ */
.res-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

.res-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 720px;
}

.res-table thead {
  background: var(--teal-dark);
  color: var(--cream);
}
.res-table thead th {
  padding: 1rem 1.1rem;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--orange);
  white-space: nowrap;
}
.res-table thead th:first-child { border-top-left-radius: var(--radius-md); }
.res-table thead th:last-child { border-top-right-radius: var(--radius-md); }

.res-table tbody tr {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s var(--ease);
}
.res-table tbody tr:last-child { border-bottom: none; }
.res-table tbody tr:nth-child(even) { background: var(--off-white); }
.res-table tbody tr:hover {
  background: var(--orange-tint);
}

.res-table td {
  padding: 0.95rem 1.1rem;
  vertical-align: top;
  line-height: 1.5;
}

.res-table td.name {
  font-weight: 600;
  min-width: 180px;
  max-width: 220px;
}
.res-table td.name a {
  color: var(--orange-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s var(--ease);
  word-break: break-word;
}
.res-table td.name a:hover {
  color: var(--teal-dark);
  border-bottom-color: var(--orange);
}

.res-table td.desc {
  color: var(--gray-700);
  min-width: 240px;
  max-width: 360px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.res-table td.geo {
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--gray-500);
  font-weight: 500;
}

.res-table td.lang {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-family: 'DM Sans', monospace;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ============================================
   TIPS BOX
   ============================================ */
.res-tips {
  background: var(--teal-dark);
  color: var(--cream);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin: 3rem 0 2.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.res-tips::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 220px; height: 220px;
  background: var(--orange);
  opacity: 0.1;
  transform: rotate(45deg);
  border-radius: 18%;
  pointer-events: none;
}
@media (max-width: 700px) {
  .res-tips {
    grid-template-columns: 1fr;
    padding: 2rem 1.6rem;
    gap: 1.2rem;
  }
}

.res-tips-icon {
  width: 64px;
  height: 64px;
  background: var(--orange);
  color: var(--teal-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.res-tips-content {
  position: relative;
  z-index: 1;
}
.res-tips-content h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.9rem;
  letter-spacing: -0.01em;
}
.res-tips-content p {
  font-size: 0.95rem;
  color: rgba(255, 249, 240, 0.85);
  line-height: 1.65;
  margin-bottom: 0.8rem;
}
.res-tips-content p:last-child { margin-bottom: 0; }
.res-tips-content strong {
  color: var(--orange);
  font-weight: 600;
}
.res-tips-content em {
  color: var(--cream);
  font-style: italic;
  font-weight: 500;
}

/* ============================================
   CTA TO MAIN SITE
   ============================================ */
.res-cta {
  background: var(--orange);
  color: var(--teal-dark);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  margin-top: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.res-cta::before {
  content: '';
  position: absolute;
  bottom: -100px; left: -50px;
  width: 240px; height: 240px;
  background: var(--teal-dark);
  opacity: 0.1;
  transform: rotate(45deg);
  border-radius: 18%;
  pointer-events: none;
}

.res-cta-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 880px) {
  .res-cta { padding: 2.5rem 1.8rem; }
  .res-cta-inner {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
}

.res-cta-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--teal-dark);
  margin-bottom: 0.6rem;
}
.res-cta-text h2 em {
  font-style: italic;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--teal-dark);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.res-cta-text p {
  font-size: 1rem;
  color: var(--teal);
  line-height: 1.6;
}

.res-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.res-cta-actions .btn-primary {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--cream);
}
.res-cta-actions .btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}
.res-cta-actions .btn-ghost-light {
  color: var(--teal-dark);
  border-color: var(--teal-dark);
  background: transparent;
}
.res-cta-actions .btn-ghost-light:hover {
  background: var(--teal-dark);
  color: var(--orange);
}

/* ============================================
   MOBILE TWEAKS
   ============================================ */
@media (max-width: 600px) {
  .res-hero { padding: calc(90px + 2rem) 0 3rem; }
  .res-legend { padding: 0.85rem 0; }
  .res-legend .container { gap: 0.5rem; }
  .legend-title {
    width: 100%;
    margin-bottom: 0.3rem;
    margin-right: 0;
  }
  .access-badge {
    font-size: 0.74rem;
    padding: 0.28rem 0.7rem;
  }
  .res-main { padding: 2.5rem 0 3rem; }
  .res-section { margin-bottom: 2.5rem; }
  .res-section-icon { width: 48px; height: 48px; }
  .res-section-icon svg { width: 22px; height: 22px; }
  .res-table-wrap {
    margin: 0 calc(-1 * var(--container-pad));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}
