/* ============================================
   STYLE RESSOURCES — Sélection utile
   ============================================ */

#ressources-wrap {
  max-width: 1400px;
  width: calc(100% - 32px);
  margin: 0 auto;
  padding: 110px 8px 100px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ressources-header {
  text-align: center;
  margin-bottom: 10px;
}
.ressources-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 800;
  color: #f0f4ff;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.ressources-header h1 .accent {
  background: linear-gradient(135deg, #d7dde6, #eef2f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ressources-header p {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  color: rgba(211, 220, 232, 0.75);
  letter-spacing: 0.03em;
}

.resource-section {
  background: rgba(16,20,28,0.5);
  border: 0.5px solid rgba(215,224,236,0.2);
  border-radius: 18px;
  padding: 22px;
  backdrop-filter: blur(14px);
}
.resource-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  margin-bottom: 14px;
  color: #edf2fa;
}

.resource-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.resource-item {
  border: 0.5px solid rgba(215,224,236,0.2);
  border-radius: 14px;
  background: rgba(11,14,21,0.46);
  padding: 14px;
}
.resource-item h3 {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  margin-bottom: 6px;
  color: #f2f6fc;
}
.resource-item p,
.resource-note {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(208, 218, 232, 0.82);
}

@media (max-width: 768px) {
  #ressources-wrap { width: calc(100% - 16px); padding: 90px 4px 90px; }
  .resource-list { grid-template-columns: 1fr; }
}

.music-source {
  display: none;
}

.music-player {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "button progress time";
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
}

.music-play {
  grid-area: button;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(215,224,236,0.18);
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: #f2f6fc;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.music-play:hover,
.music-play:focus {
  transform: scale(1.05);
  border-color: rgba(215,224,236,0.35);
  background: rgba(255,255,255,0.12);
}

.music-progress {
  grid-area: progress;
  position: relative;
  height: 22px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(215,224,236,0.12) 1px, transparent 1px),
              linear-gradient(90deg, rgba(215,224,236,0.12) 0.5px, transparent 0.5px);
  background-size: 12px 100%, 100% 100%;
  cursor: pointer;
  overflow: hidden;
  --progress-width: 0%;
}

.music-progress::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: rgba(255,255,255,0.05);
}

.music-progress::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--progress-width, 0%);
  background: linear-gradient(90deg, rgba(83,105,246,0.95), rgba(119,141,255,0.95));
  transition: width 0.1s ease;
}

.music-time {
  grid-area: time;
  min-width: 88px;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  color: rgba(208, 218, 232, 0.95);
  text-align: right;
}

.music-player[data-playing="true"] .music-play {
  background: rgba(83,105,246,0.16);
}

@media (max-width: 768px) {
  .music-player {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "button progress"
      "button time";
  }

  .music-time {
    text-align: left;
  }
}

/* Styles pour les iframes YouTube */
.resource-item iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  margin-top: 12px;
  border: none;
}