/* --- TITRES DE SECTIONS --- */
.ws-resource-section h2 {
    display: flex;
    align-items: center;
    /* 1.4rem = 22.4px */
    font-size: calc(22.4 / 16 * 1rem);
    color: var(--color-ws-ressource-section-h2);
    border-bottom: 3px solid var(--color-ws-ressource-section-h2-border);
    /* 10px = 0.625rem | 20px = 1.25rem */
    padding-bottom: calc(10 / 16 * 1rem);
    margin-bottom: calc(20 / 16 * 1rem);
    margin-top: var(--space-xl-plus);
}

.ws-resource-section:first-of-type h2 {
    margin-top: 0;
}

.ws-section-title-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 45px / 16 = 2.8125rem */
    width: calc(45 / 16 * 1rem);
    height: calc(45 / 16 * 1rem);
    background-color: var(--color-ws-section-title-icon-box);
    border: calc(2 / 16 * 1rem) solid var(--color-ws-section-title-icon-box-border);
    border-radius: var(--radius-sm);
    /* 15px = 0.9375rem */
    margin-right: calc(15 / 16 * 1rem);
    font-size: 1.1em;
    flex-shrink: 0;
    box-shadow: var(--shadow-z1);
}

.ws-section-title-text {
    line-height: 1.2;
}

/* Description de section */
.ws-resource-section .ws-description {
    text-align: center;
    color: var(--color-description);
    /* 800px = 50rem */
    max-width: calc(800 / 16 * 1rem);
    margin-left: auto;
    margin-right: auto;
    /* 25px = 1.5625rem */
    margin-bottom: calc(25 / 16 * 1rem);
}

/* --- GRILLE ET CARTES --- */
.ws-cards-grid {
    display: grid;
    /* 320px = 20rem */
    grid-template-columns: repeat(auto-fill, minmax(calc(320 / 16 * 1rem), 1fr));
    /* 15px = 0.9375rem */
    gap: calc(15 / 16 * 1rem);
}

.ws-card {
    display: block;
    /* 15px = 0.9375rem */
    padding: calc(15 / 16 * 1rem);
    border: calc(1 / 16 * 1rem) solid var(--color-ws-card);
    border-radius: var(--radius-md);
    background-color: var(--source-color-white-transparent) !important;
    cursor: default;
    overflow: hidden;
    box-shadow: var(--shadow-z2);
    position: relative;
}

/* --- BLOC IMAGE ET BOUTON (Flottant à droite) --- */
.ws-card-right-block {
    float: right;
    /* 160px = 10rem */
    width: calc(160 / 16 * 1rem);
    /* 15px = 0.9375rem | 10px = 0.625rem */
    margin-left: calc(15 / 16 * 1rem);
    margin-bottom: calc(10 / 16 * 1rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.ws-card-image-icon {
    /* 150px = 9.375rem */
    width: calc(150 / 16 * 1rem);
    height: calc(150 / 16 * 1rem);
    object-fit: cover;
    border-radius: 50%;
    border: solid calc(2 / 16 * 1rem) #000;
    box-shadow: var(--shadow-z2);
}

.ws-card-action-btn {
    /* 10px = 0.625rem */
    margin-top: calc(10 / 16 * 1rem);
    /* 5px 10px = 0.3125rem 0.625rem */
    padding: calc(5 / 16 * 1rem) calc(10 / 16 * 1rem);
    background-color: var(--color-acrd-action-btn);
    color: var(--color-ws-card-action-btn);
    font-size: 0.9em;
    font-weight: normal;
    border-radius: var(--radius-sm);
    text-align: center;
    text-decoration: none;
    display: flex;
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 11;
    box-shadow: var(--shadow-z2);
}

.ws-card-action-btn::before {
    content: "";
    background-image: url("/asset/img/gl/hand-pointer.svg");
    display: inline-block;
    width: 1.3em;
    height: 1.3em;
    /* 5px = 0.3125rem */
    margin-right: calc(5 / 16 * 1rem);
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

/* --- TEXTE DE LA CARTE --- */
.ws-card-title {
    /* 1.4rem = 22.4px */
    font-size: calc(22.4 / 16 * 1rem);
    color: var(--color-website-card-title);
    /* 5px = 0.3125rem */
    margin-bottom: calc(5 / 16 * 1rem);
    line-height: 1.2;
    margin-top: 0;
}

.ws-card-title-meta {
    font-size: 0.75em;
    color: var(--color-ws-card-title-meta);
    font-style: italic;
    /* 5px = 0.3125rem | 10px = 0.625rem */
    margin-top: calc(5 / 16 * 1rem);
    margin-bottom: calc(10 / 16 * 1rem);
    display: block;
}

.ws-card-desc {
    display: block;
    font-size: 0.95em;
    line-height: 1.4;
    /* 15px = 0.9375rem | 8px = 0.5rem */
    padding-top: calc(15 / 16 * 1rem);
    margin-top: calc(8 / 16 * 1rem);
    position: relative;
    color: var(--color-ws-card-desc);
}

/* Ligne décorative */
.ws-card-desc::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 39%;
    height: 3px;
    background-image: linear-gradient(to right, var(--color-ws-card-desc) 65%, rgba(255,255,255,0) 0%);
    /* 15px 2px = 0.9375rem 2px */
    background-size: calc(15 / 16 * 1rem) 2px;
    background-repeat: repeat-x;
}

/* ================================================= */
/* === MODE SOMBRE === */
/* ================================================= */
html[data-theme="dark"] .ws-card {
    background-color: black !important;
}

html[data-theme="dark"] .ws-resource-section h2 {
    color: #8ba0ff;
    font-weight: var(--fw-normal);
}

html[data-theme="dark"] .ws-card-desc::before {
    background-image: linear-gradient(to right, #939393 65%, rgba(255,255,255,0) 0%);
}

html[data-theme="dark"] .ws-resource-section h2 {
    border-bottom: 3px solid #8ba0ff;
}

html[data-theme="dark"] .ws-card-title {
    font-weight: var(--fw-normal);
    color: #90EE90;
}

html[data-theme="dark"] .ws-card-desc {
    color: white;
}