@font-face {
    font-family: 'Tritopani';
    src: local('Tritopani'),
         url('../fonts/Tritopani.otf') format('opentype');
    font-display: swap;
}



.galerie {
    font-family: 'Tritopani', sans-serif;
    line-height: 1;
    font-size: min(16vh, 16vw);
    padding-top: 2.5rem;
}

/* CARTES CACHEES*/

.carte-cachee {
    position: absolute;
    z-index: 2;
    width: 50px;
    height: 70px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 6px;
    background: #000 url("../img/logo-du-p.png") center / 70% auto no-repeat;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transform: rotate(var(--rot, 8deg));
    transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    top: var(--haut, auto);
    bottom: var(--bas, auto);
    left: var(--gauche, auto);
    right: var(--droite, auto);
}


@media (max-width: 767.98px) {
    .carte-cachee {
        top: var(--haut-m, var(--haut, auto));
        bottom: var(--bas-m, var(--bas, auto));
        left: var(--gauche-m, var(--gauche, auto));
        right: var(--droite-m, var(--droite, auto));
    }
}


.carte-cachee:hover {
    transform: rotate(0deg) scale(1.15);
    box-shadow: 0 0 12px rgba(247, 176, 52, 0.7);
}

/* CARTE DEJA TROUVEE */
.carte-cachee.trouvee {
    opacity: 0.4;
}

.carte-cachee.trouvee::after {
    content: "✓";
    position: absolute;
    top: -8px;
    right: -8px;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: #000;
    background: #fff;
    border-radius: 50%;
}


/* GALERIE */

.page-galerie {
    padding-top: 8rem;
}

#galerie {
    scroll-margin-top: 8rem;
}


/* CARTE DANS LA GALERIE */

.wm-carte {
    --fond: #1b1712;
    --rarete: #adb5bd;

    position: relative;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 2 / 3;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    text-align: left;
    background:
        repeating-radial-gradient(circle at 15% 85%, transparent 0 14px, rgba(255, 255, 255, 0.045) 14px 15px),
        repeating-radial-gradient(circle at 90% 60%, transparent 0 18px, rgba(255, 255, 255, 0.035) 18px 19px),
        var(--fond);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wm-carte:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--rarete);
}


.wm-carte[data-rarete="C"] { --rarete: #adb5bd; }  /* commune */
.wm-carte[data-rarete="R"] { --rarete: #4dabf7; }  /* rare */
.wm-carte[data-rarete="E"] { --rarete: #b197fc; }  /* épique */
.wm-carte[data-rarete="L"] { --rarete: #f7b034; }  /* légendaire */


/* ILLUSTRATION */

.wm-image {
    position: relative;
    height: 52%;
    flex-shrink: 0;
}

.wm-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wm-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 55%, var(--fond) 100%);
}

.wm-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 1px 7px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--rarete);
    border: 1.5px solid var(--rarete);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
}

.wm-badge i {
    font-size: 0.65rem;
}


/* --- Étoile --- */

.wm-etoile {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 1;
    font-size: 1.3rem;
    color: #f7b034;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.wm-corps {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-top: -10px;
    padding: 0 12px;
}

.wm-nom {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 800;
}

.wm-carte .wm-desc {
    flex: 1;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.85);
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
    mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.wm-carte .wm-nom {
    margin: 0 0 4px;
    padding: 0;
}

.wm-pied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 10px;
}

.wm-pied img {
    height: 32px;
    width: auto;
    max-width: 45%;
    object-fit: contain;
}


/* CARTES PAS TROUVEES */

.wm-carte.verrouillee {
    color: rgba(255, 255, 255, 0.45);
}

.wm-carte.verrouillee .wm-corps {
    padding-bottom: 14px;
}

.wm-mystere {
    height: 52%;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}