html {
    scroll-behavior: smooth;
}

.ressources-navbar {
    margin: 32px 0 24px 0;
}
.navbar-list {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 8px;
}
.nav-item {
    padding: 0;
}
.nav-item a {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px 6px 0 0;
    background: #eee;
    text-decoration: none;
    color: #337ab7;
    font-weight: 500;
    transition: background 0.2s;
}
.nav-item a:hover {
    background: #d8e6fa;
}
.nav-item.active a {
    background: #157DBE;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ressources-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
  margin-bottom: 64px;
}
.ressources-card {
  width: 260px;
  background: #fff;
  border: 1px solid #d2d2d2;
  border-radius: 7px;
  box-shadow: 0 2px 7px #0001;
  padding: 24px 18px 14px 18px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  transition: box-shadow 0.2s;
}
.ressources-card-locked {
  opacity: 0.5;
  filter: grayscale(70%);
  pointer-events: none;
}
.card-actions {
  margin-top: 12px;
}
.card-disabled span {
  color: #999;
  font-size: 0.95em;
}


.layout-ressources {
    display: flex;
    gap: 2em;
    align-items: flex-start;
}

.nav-ressources-menu {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: 80vh;
    overflow-y: auto;
    border-right: 2px solid #d8bba2;
    padding-right: 1em;
}

.nav-ressources-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-ressources-menu li {
    margin-bottom: 0.5em;
}

.nav-ressources-menu li a {
    display: block;
    padding: 0.4em;
    background: #f0f4f8;
    border-radius: 6px;
    color: #456980;
    text-decoration: none;
    transition: background 0.3s;
    padding-left: 10px;
}

.nav-ressources-menu li a:hover {
    background: #d8bba2;
    color: #000;
}

.nav-ressources-menu a.active {
    background: #456980;
    color: #fff;
}

.ressources-contenu {
    flex-grow: 1;
    max-width: 900px;
    max-height: calc(100vh - 220px); /* ajuste selon ton header + titre + breadcrumb */
    overflow-y: auto;
    padding-right: 1em; /* pour ne pas masquer la scrollbar */
}

.ressources-contenu::-webkit-scrollbar {
    width: 8px;
}
.ressources-contenu::-webkit-scrollbar-track {
    background: #f0f4f8;
    border-radius: 4px;
}
.ressources-contenu::-webkit-scrollbar-thumb {
    background: #688ea6;
    border-radius: 4px;
}
.ressources-contenu::-webkit-scrollbar-thumb:hover {
    background: #3F6E91;
}

/* Firefox */
.ressources-contenu {
    scrollbar-width: thin;
    scrollbar-color: #305A74 #f0f4f8;
}

audio, video {
    width: 100%;
    margin: 1em 0;
}


.monespace-ressource-card {
    background: #f9f9f7;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(80,110,150,0.22), 0 4px 16px rgba(180,200,230,0.5);
    
    width: 100%;
    max-width: 250px;
    position: relative;
    margin-top: 70px;
    padding-top: 50px;
    display: flex;
    flex-direction: column;
    font-family: system-ui, sans-serif;
    height: 280px; /* hauteur fixe */
}
.monespace-ressource-card .monespace-ressource-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* centre verticalement */
    align-items: center; /* centre horizontalement */
    padding: 0 1rem;
}
.monespace-ressource-circle {
    width: 110px;
    height: 110px;
    background: #e2e7ed;
    border-radius: 50%;
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid #f9f9f7;
    z-index: 2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.monespace-ressource-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.monespace-ressource-title {
    color: #3f6e91;
    font-size: 2rem;
    line-height: 1.15;
    font-weight: bold;
    margin: 1rem 0 .7rem 0;
    padding: 1rem 0;
    text-align: center;

    min-height: 3.8em; /* fixe la hauteur */
    display: flex;
    align-items: center;
    justify-content: center;
}
.monespace-ressource-btn {
    background: linear-gradient(90deg, #d9e4f2, #b6c7e2);
    color: #3f6e91;
    font-weight: bold;
    border-radius: 18px;
    border: none;
    padding: 8px 18px;
    font-size: 1.35rem;
    margin-bottom: 1.2rem;
    transition: background 0.2s;
    box-shadow: 0 2px 6px rgba(160,180,210,0.13);
    cursor: pointer;
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.monespace-ressource-btn:hover {
    background: linear-gradient(90deg, #b6c7e2, #d9e4f2);
    color: #2c4864;
}
.monespace-ressource-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.65em;
    flex-wrap: wrap;
    font-size: 1.15rem; /* Texte plus gros */
    font-weight: 500;
    margin-bottom: 0;
}
.monespace-ressource-icons span {
    color: #4a5e6a;
    display: flex;
    align-items: center;
    gap: 5px;
}
.monespace-ressource-footer {
    background: #e9eff6;
    border-radius: 0 0 24px 24px;
    border-top: none;
    padding: 14px 0;
    margin-top: 0;
    width: 100%;
}
.monespace-ressource-card-locked {
    filter: grayscale(0.5) brightness(1.15);
    opacity: 0.7;
    cursor: not-allowed;
}

.monespace-ressource-card-locked .monespace-ressource-btn {
    background: #ddd !important;
    color: #999 !important;
    cursor: not-allowed;
    box-shadow: none;
}
.monespace-ressource-card-locked .monespace-ressource-btn:hover {
    background: #ddd;
    color: #999;
}
.monespace-ressource-lock {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 34px;
    height: 34px;
    background: rgba(160,180,210,0.22);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    color: #999;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    z-index: 3;
}
@media (max-width: 480px) {
    .monespace-ressource-card { max-width: 98vw; height: auto;}
    .monespace-ressource-title { font-size: 1.02rem; }
    .monespace-ressource-btn { font-size: 0.93rem; }
    .monespace-ressource-circle { max-width: 75px; height: 75px; top: -37px;}
    .monespace-ressource-icons { font-size: 0.9rem; }
}