/* ==========================================
   STUDIO CACAO — CATALOGUE DES POSTURES
   Palette A : blanc, crème, cacao, bleu, ocre
   ========================================== */
:root {
    --pose-muted: #766F69;
    --pose-border: #E7E1D9;

    --pose-radius: 16px;
    --pose-shadow: 0 6px 24px rgba(53, 38, 32, 0.045);
    --pose-shadow-hover: 0 16px 36px rgba(53, 38, 32, 0.10);
}

/* BASE */
.pose-library {
    width: min(1640px, 100%);
    margin: 0 auto;
    padding: 0 5% 90px;
    color: var(--cacao);
    background: var(--white);
    font-family: "Instrument Sans", sans-serif;
}

.pose-library *,
.pose-library *::before,
.pose-library *::after {
    box-sizing: border-box;
}

.pose-library a {
    color: inherit;
    text-decoration: none;
}

.pose-library h1,
.pose-library h2,
.pose-library h3,
.pose-library p {
    margin-top: 0;
}

.pose-library h1,
.pose-library h2,
.pose-library h3 {
    font-family: "Instrument Serif", serif;
    font-weight: 400;
}

.pose-library img {
    display: block;
    max-width: 100%;
    object-fit: contain;
}

.pose-library button,
.pose-library input {
    font: inherit;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================
   1. INTRODUCTION
   ========================================== */
.pose-library__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding: 66px 0 38px;
    border-bottom: 1px solid var(--pose-border);
}

.pose-library__intro {
    max-width: 760px;
}

.pose-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--blue);
    font-size: 0.69rem;
    font-weight: 600;
    letter-spacing: 0.15em;
}

.pose-eyebrow__dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--blue);
}

.pose-library__header h1 {
    margin: 20px 0 14px;
    font-size: clamp(3.1rem, 5.5vw, 5rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.pose-library__header h1 em {
    color: var(--apricot);
    font-weight: 400;
}

.pose-library__intro > p {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--pose-muted);
    font-size: 0.98rem;
    line-height: 1.85;
}

.pose-library__count {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding: 20px 5px;
    border: 3px solid var(--cream);
    border-radius: 48% 48% 12px 12px;
}

.pose-library__count-number {
    color: var(--blue);
    font-family: "Instrument Serif", serif;
    font-size: 2.6rem;
    line-height: 1;
}

.pose-library__count-label {
    margin-top: 7px;
    color: var(--pose-muted);
    font-size: 0.78rem;
}

/* ==========================================
   2. RECHERCHE & FILTRES
   ========================================== */
.pose-toolbar {
    padding: 27px 0 45px;
}

.pose-search {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 60px;
    padding: 7px 8px 7px 20px;
    border: 1px solid var(--pose-border);
    border-radius: 12px;
    background: var(--white);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.pose-search:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(64, 93, 112, 0.09);
}

.pose-search > i {
    flex-shrink: 0;
    color: var(--blue);
}

.pose-search input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--cacao);
    font-size: 0.91rem;
}

.pose-search input::placeholder {
    color: #968D85;
}

.pose-search input:focus-visible {
    outline: none;
}

.pose-search__clear {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    color: var(--pose-muted) !important;
}

.pose-search__clear:hover {
    background: var(--cream);
    color: var(--cacao) !important;
}

.pose-search__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 0 22px;
    margin-top: 20px;

    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: var(--white);

    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pose-search__button:hover {
    background: var(--blue-dark);
}

.pose-search__button:focus-visible,
.pose-card a:focus-visible,
.pose-empty a:focus-visible {
    outline: 3px solid var(--apricot);
    outline-offset: 3px;
}


/* ==========================================
   3. TITRE DES RÉSULTATS
   ========================================== */
.pose-results__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.pose-results__heading h2 {
    margin-bottom: 7px;
    font-size: clamp(2rem, 3vw, 2.65rem);
    line-height: 1.1;
}

.pose-results__heading p {
    margin-bottom: 0;
    color: var(--pose-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

.pose-results__total {
    flex-shrink: 0;
    padding: 8px 13px;
    background-color: var(--apricot);
    border: 1px solid var(--pose-border);
    border-radius: 999px;
    color: var(--cacao);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ==========================================
   4. GRILLE
   ========================================== */
.pose-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 25px;
}

/* ==========================================
   5. CARTE
   ========================================== */
.pose-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--pose-border);
    border-radius: var(--pose-radius);
    background: var(--white);
    box-shadow: var(--pose-shadow);
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}

.pose-card:hover {
    transform: translateY(-4px);
    border-color: #D8D0C7;
    box-shadow: var(--pose-shadow-hover);
}

/* Visuel */
.pose-card__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background:
        radial-gradient(
            ellipse at 50% 45%,
            rgba(213, 160, 109, 0.13),
            transparent 66%
        ),
        #EDF0ED;
}

.pose-card__visual img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.4s ease;
}

.pose-card:hover .pose-card__visual img {
    transform: scale(1.045);
}

.pose-card__visual-index {
    position: absolute;
    z-index: 2;
    top: 13px;
    left: 13px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--apricot);
    font-size: 0.7rem;
    font-weight: 600;
}

.pose-card__visual-action {
    position: absolute;
    z-index: 2;
    right: 13px;
    bottom: 13px;
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: var(--white);
    color: var(--blue);
    opacity: 0;
    transform: translateY(5px);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.pose-card:hover .pose-card__visual-action,
.pose-card:focus-within .pose-card__visual-action {
    opacity: 1;
    transform: translateY(0);
}

/* Visuel de remplacement sans image */
.pose-card__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    width: 100%;
    height: 100%;
    color: var(--blue);
}

.pose-card__placeholder-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border: 1px solid rgba(64, 93, 112, 0.18);
    border-radius: 50%;
    font-size: 1.7rem;
}

.pose-card__placeholder-text {
    color: var(--pose-muted);
    font-family: "Instrument Serif", serif;
    font-size: 1.15rem;
}

/* Contenu */

.pose-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 23px 23px 21px;
}

.pose-card__title {
    width: 100%;
}

.pose-card__title h3 {
    margin-bottom: 5px;
    font-size: 1.75rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.pose-card__title h3 a {
    transition: color 0.2s ease;
}

.pose-card__title h3 a:hover {
    color: var(--blue);
}

.pose-card__sanskrit {
    margin-bottom: 0;
    color: var(--blue);
    font-size: 0.82rem;
    font-style: italic;
    letter-spacing: 0.025em;
}

.pose-card__description {
    display: -webkit-box;
    width: 100%;
    margin: 17px 0 21px;
    overflow: hidden;
    color: var(--pose-muted);
    font-size: 0.86rem;
    line-height: 1.75;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* Informations pédagogiques */
.pose-card__taxonomy {
    width: 100%;
    margin-bottom: 17px;
}

.pose-card__label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--cacao);
    font-size: 0.74rem;
    font-weight: 600;
}

.pose-card__label i {
    color: var(--blue);
    font-size: 0.8rem;
}

.pose-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pose-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.7rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.pose-tag--benefit {
    border-color: #DDE5E9;
    background: #F0F4F6;
    color: #385568;
}

.pose-tag--zone {
    border-color: #E7E1D9;
    background: #FAF7F2;
    color: #65574D;
}

.pose-tag--more {
    border-color: var(--pose-border);
    background: var(--white);
    color: var(--pose-muted);
}

/* Thèmes */
.pose-card__themes {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    width: 100%;
    margin-top: auto;
    padding-top: 3px;
}

.pose-theme {
    color: #90612F;
    font-size: 0.72rem;
    font-weight: 600;
}

.pose-theme:not(:last-child)::after {
    content: "·";
    margin-left: 7px;
    color: var(--apricot);
}

/* Lien de bas de carte */
.pose-card__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-top: 23px;
    padding-top: 16px;
    border-top: 1px solid var(--pose-border);
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 600;
}

.pose-card__link i {
    transition: transform 0.25s ease;
}

.pose-card__link:hover i {
    transform: translateX(5px);
}

/* ==========================================
   6. AUCUN RÉSULTAT
   ========================================== */
.pose-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 310px;
    padding: 45px 20px;
    border: 1px dashed #D8D0C7;
    border-radius: var(--pose-radius);
    background: #FCFAF7;
    text-align: center;
}

.pose-empty__icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: #E8EEF1;
    color: var(--blue);
    font-size: 1.2rem;
}

.pose-empty h3 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.pose-empty p {
    max-width: 420px;
    margin-bottom: 23px;
    color: var(--pose-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

.pose-empty__button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--blue);
    color: var(--white);
    font-size: 0.84rem;
    font-weight: 600;
}

.pose-empty__button:hover {
    background: var(--blue-dark);
}

/* ==========================================
   7. RESPONSIVE
   ========================================== */
@media (max-width: 1100px) {
    .pose-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .pose-library__header {
        padding-top: 55px;
    }
}

@media (max-width: 650px) {
    .pose-library {
        padding-right: 5%;
        padding-left: 5%;
        padding-bottom: 60px;
    }

    .pose-library__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;
        padding: 43px 0 28px;
    }

    .pose-library__header h1 {
        margin-top: 17px;
        font-size: clamp(2.9rem, 12vw, 4rem);
    }

    .pose-library__intro > p {
        font-size: 0.9rem;
    }

    .pose-library__count {
        align-items: flex-start;
        flex-direction: row;
        gap: 10px;
    }

    .pose-library__count-number {
        font-size: 1.6rem;
    }

    .pose-library__count-label {
        align-self: center;
        margin-top: 0;
    }

    .pose-toolbar {
        padding: 22px 0 35px;
    }

    .pose-search {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 12px;
    }

    .pose-search input {
        flex: 1;
    }

    .pose-search__button {
        width: 100%;
    }

    .pose-results__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .pose-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pose-card__visual {
        aspect-ratio: 4 / 3;
    }

    .pose-card__visual-action {
        opacity: 1;
        transform: none;
    }

    .pose-card__body {
        padding: 21px 20px;
    }

    .pose-card__title h3 {
        font-size: 1.8rem;
    }
}

/* Bande crème des filtres du catalogue */
.pose-filters {
    background-color: #F5EEE5;
    padding: 28px 32px;
    margin: 32px 0 40px;
    border-radius: 16px;
}

/* ========================================
 BARRE DE RECHERCHE ET FILTRES
======================================== */
.pose-toolbar {
    background: #F7F1E8;
    border-radius: 24px;
    padding: 32px;
    margin: 32px 0;
}

.pose-filters {
    width: 100%;
}

.pose-filters__title {
    margin: 0 0 20px;
    color: #352620;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Recherche */
.pose-search {
    margin-bottom: 20px;
}

.pose-search__input {
    display: block;
    width: 100%;
    min-height: 58px;
    padding: 16px 20px;
    border: 1px solid #E7D9CC;
    border-radius: 14px;
    background: #FFFDF9;
    color: #352620;
    font: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.pose-search__input::placeholder {
    color: #A39487;
}

.pose-search__input:focus {
    outline: none;
    border-color: #D99A91;
    box-shadow: 0 0 0 3px rgb(217 154 145 / 18%);
}

/* Catégories */
.filters-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.filter-panel {
    min-width: 0;
    border: 1px solid #E7D9CC;
    border-radius: 14px;
    background: var(--white);
    overflow: hidden;
}

/* Bouton d'ouverture */
.filter-panel__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 16px;
    color: #352620;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    transition: background 0.2s ease;
}

.filter-panel__toggle::-webkit-details-marker {
    display: none;
}

.filter-panel__toggle::marker {
    content: "";
}

.filter-panel__toggle:hover {
    background: #F7F1E8;
}

.filter-panel__toggle > span:first-child {
    flex: 1;
}

.filter-panel__toggle > i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.filter-panel[open] .filter-panel__toggle > i {
    transform: rotate(180deg);
}

/* Nombre d'options */
.filter-panel__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 50px;
    background: #F7F1E8;
    color: #73594B;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contenu déroulant */
.filter-panel__content {
    border-top: 1px solid #EFE4D9;
    padding: 12px 16px 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 6px;
}

/* Cases à cocher */
.form-categories {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #514138;
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-categories input[type="checkbox"] {
    flex-shrink: 0;
    margin: 4px 0 0;
    accent-color: #73594B;
    cursor: pointer;
}

.form-categories label {
    cursor: pointer;
}

/* Défilement interne */
.filter-group {
    scrollbar-width: thin;
    scrollbar-color: #D8C5B5 transparent;
}

.filter-group::-webkit-scrollbar {
    width: 5px;
}

.filter-group::-webkit-scrollbar-thumb {
    background: #D8C5B5;
    border-radius: 10px;
}

/* Actions */
.filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 22px;
}

.filter-submit {
    min-height: 44px;
    padding: 12px 22px;
    border: 1px solid #352620;
    border-radius: 50px;
    background: #352620;
    color: #FFFDF9;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease,
    color 0.2s ease;
}

.filter-submit:hover {
    background: #73594B;
    border-color: #73594B;
}

.filter-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #73594B;
    font-size: 0.9rem;
    text-decoration: none;
}

.filter-reset:hover {
    color: #352620;
    text-decoration: underline;
}

/* Accessibilité clavier */
.filter-panel__toggle:focus-visible,
.filter-submit:focus-visible,
.filter-reset:focus-visible {
    outline: 2px solid #D99A91;
    outline-offset: 3px;
}

/* Tablettes */
@media (max-width: 900px) {
    .filters-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobiles */
@media (max-width: 600px) {
    .pose-toolbar {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .filters-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .filter-panel__toggle {
        min-height: 54px;
    }

    .filter-group {
        max-height: 200px;
    }

    .filter-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .filter-submit {
        width: 100%;
    }

    .filter-reset {
        justify-content: center;
    }
}


/* ========================================
   Catalogue — amélioration visuelle
======================================== */
/* Fond derrière les cartes */
.pose-grid-wrapper {
    padding: 20px;
    border-radius: 18px;
    background: var(--cream);
}

/* Cartes */
.pose-card {
    border: 1px solid #E9E0D7;
    box-shadow: 0 3px 12px rgba(53, 38, 32, 0.035);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.pose-card:hover {
    transform: translateY(-5px);
    border-color: #D9B8A7;
    box-shadow: 0 12px 28px rgba(53, 38, 32, 0.08);
}

/* Compteur de résultats */
.pose-results-count {
    background: #F3E5D8;
    border: 1px solid #EBD5C5;
    color: #795743;
}

/* Responsive */
@media (max-width: 650px) {
    .pose-grid-wrapper {
        padding: 10px;
        border-radius: 12px;
    }
}

@media (max-width: 600px) {
    .pose-filters {
        padding: 22px 18px;
        margin: 24px 0 30px;
        border-radius: 12px;
    }

    .pose-filters__options {
        gap: 8px;
    }

    .pose-filters__option {
        padding: 8px 13px;
        font-size: 0.85rem;
    }
}

/* Accessibilité : réduire les animations si demandé */
@media (prefers-reduced-motion: reduce) {
    .pose-library *,
    .pose-library *::before,
    .pose-library *::after {
        scroll-behavior: auto;
        transition-duration: 0.01ms ;
        animation-duration: 0.01ms;
    }
}
