:root {
    /* polices */
    --police-corp-principal: 'Anek Latin', sans-serif;
    --police-titre: 'Montserrat', serif;

    /* coleurs */
    --blue-principal : #00247D;
    --blue-secondaire : #bad0dd;
    --gris-principal : #CFD2D6;
    --jaune-principal : #fddaa0;
    
    --rouge-principal : #CF142B;


    --texte-principal: #221f1f;
    --texte-gris: #484848;
    --texte-blanc-casse: var(--gris-principal);
    --texte-blanc: #fff;

    /* font-size et gutter, source type-scale.com #####################################################################*/
    /* font size scale, 1.250 – Major Third ###########################################################################*/
    --texte-1000: 4.5rem;
    --texte-900: 3.052rem;
    --texte-800: 2.441rem;
    --texte-700: 1.953rem;
    --texte-600: 1.563rem;
    --texte-500: 1.25rem;
    --texte-400: 1rem;
    --texte-300: 0.8rem;
    --texte-200: 0.64rem;
    --texte-100: 0.512rem;


    /* gutter 1.414 – Augmented Fourth ##################################################################################*/
    --goutiere-1000: 5.653rem;
    --goutiere-800: 3.998rem;
    --goutiere-600: 2.827rem;
    --goutiere-400: 1.999rem;
    --goutiere-300: 1.414rem;
    --goutiere-200: 1rem;
    --goutiere-100: 0.707rem;
    --goutiere-50: 0.500rem;

    line-height: 1.5625;
    color: var(--texte-principal);
}


*{
    margin: 0;
    padding: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    box-sizing: border-box;
    vertical-align: top;
}

body{
    font-family: var(--police-corp-principal);
    font-size: var(--texte-500);
    display: flex;
    flex-direction: column;
    margin: auto;
}

img{
    display: block;
    object-fit: cover;

    max-width: 100%;
    max-height: 100%;
    width: 5rem;
    background-color: rgba(0, 0, 0, 0.1);
    background-image: linear-gradient( to top left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) calc(50% - 1px), rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0) calc(50% + 1px), rgba(0, 0, 0, 0) 100% ), linear-gradient( to top right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) calc(50% - 1px), rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0) calc(50% + 1px), rgba(0, 0, 0, 0) 100% );
}

a > img, label > img{
    width: 2rem;
}

p{
    max-width: 30rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--police-titre);
    font-weight: 600;
    line-height: 1.25;
    color: var(--texte-gris);
    max-width: 40ch;
}

h1 {
    font-family: var(--police-titre);
    font-size: var(--texte-800);
    max-width: 40ch;
    font-weight: 900;
}

h2 {
    font-size: var(--texte-700);
}

h3 {
    font-size: var(--texte-600);
}

h4 {
    font-size: var(--texte-400);
}

p{
    max-width: 50rem;
}


body>*{
    margin: 0 auto;
    width:min(100%, 1280px);
}

body > * + *{
    margin-top: var(--goutiere-1000);
}

body > * > * + *{
    margin-top: 2rem;
}

input{
    font: inherit;
}

[type=checkbox]{
    display: none;
}


label, a, select{
    cursor: pointer;
    display: inline-block;
    color: inherit;
    padding: var(--goutiere-50);
    background-color: #959595 !important;
    color: #1c1c1c;
}

a:hover, label:hover, a:focus, label:focus{
    background-color: rgb(71, 70, 70) !important;
    color: white;
}


body > header nav{
    display: flex;
    justify-content: flex-end;
    gap: var(--goutiere-200);
    padding: var(--goutiere-100);
    background-color: gainsboro;
}

body > header nav + nav{
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

body >header > nav .logo{
    margin-inline-end: auto;
}



.button{
    background-size: 1.8rem;
    background-color: var(--rouge-secondaire);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    overflow: hidden;
    color: transparent;
}
.button img{
    display: inline-block;
}

@media screen and (min-width:960px) {
    .button{
        height: 3rem;
    width: initial;
    border-radius: .52rem;
    background-position: .5rem 50%;
    color: initial;
    }
}

.filtreHeader > div{
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    gap: var(--goutiere-200);
    padding: 0 var(--goutiere-200);
}

.filtreHeader div :is(select, label, input){
    border-radius: 1rem;
    padding: 0.5rem;
    background-color: var(--blue-secondaire);
    border: none;
}

.filtreHeader .recherche, .filtreHeader .recherche + span{
    display: flex;
    gap: var(--goutiere-100);
}
.filtreHeader .recherche + span{
    flex: 1;
    justify-content: flex-end;
}
.filtreHeader .recherche input[type=text]{
    background-color: white;
    border: 1px solid var(--texte-gris);
}
.filtreHeader .recherche input[type=submit]{
    background-image: url(./svg/recherche.svg);
}

.filtreHeader div select{
    width: 5rem;
}

.filtreHeader > div + div{
    display: none;
    flex-flow: row wrap;
    justify-content: flex-start;
    gap: var(--goutiere-200) var(--goutiere-400);
    margin-top: var(--goutiere-200);
}

.filtreHeader > div + div label{
    border-radius: .5rem;
}

.filtreHeader .filter-button:checked + div + div{
    display: flex;
}

.grille > article{
    display: flex;
    flex-flow: column;
    width: min(18rem, 100%);
    border: 1px solid;
    margin: auto;
    border-radius: 1rem;
    overflow: hidden;
}

.grille > article + article{
    margin-top: var(--goutiere-600);
}

.grille > article > img{
    height: 20rem;
    width: inherit;
}

.grille > article > div{
    padding: var(--goutiere-200);
}

.grille > article > div footer{
    display: flex;
    justify-content: flex-end;
    gap: var(--goutiere-200);
    margin-top: var(--goutiere-400);
}

.grille > label{
    display: block;
    margin: var(--goutiere-800) auto 0 auto;
    width: max-content;
}


body > article > h2{
    padding: 0 var(--goutiere-300);
}

body > article > section{
    display: flex;
    flex-flow: column;
    gap: var(--goutiere-300);
    padding: 0 var(--goutiere-300);
}




body > footer {
    background-color: #959595;
}

body > footer > div {
    display: flex;
    justify-content: space-around;
    gap: var(--goutiere-300);
    padding: var(--goutiere-100);
    width: max-content;
    margin: auto;
}

body > footer > p{
    margin-inline: var(--goutiere-200);
}

body > footer > *:last-child{
    margin-bottom: var(--goutiere-1000);
    font-size: var(--texte-400);
}


@media screen and (min-width:1200px) {
    body > header {
        display: flex;
        justify-content: space-between;
        background-color: rgb(182, 176, 176);
        padding: 1rem;
    }
    body > header > nav + nav {
        position: static;
        margin: 0;
    }


    .grille{
        display: grid;
        grid-template-columns: repeat(4, 18rem);
        justify-content: center;
        gap: var(--goutiere-400);
    }
    .grille > article + article{
        margin: 0;
    }
    .grille > label{
        grid-column: -1 / 1;
    }
}






.fiche-enchere{
    max-width: 35rem;
}

.timbres-image{
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--jaune-secondair);
    padding-block: var(--goutiere-300);
}

.timbres-image > header{
    margin: 0;
    padding: 0.125rem 1rem;
    background-color: var(--blue-principal);
    color: white;
    font-weight: 700;
    position: absolute;
    left: 50%;
    top: 1rem;
    z-index: 1;
    transform: translate(-50%, 0);
    width: 10rem;
    font-size: .8rem;
    border-radius: 1rem;
}

.timbres-image > header span{
    background-image: url(./svg/coup-coeur.svg);
    width: 3rem;
    height: 3rem;
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.timbres-image picture{
    width: min(50rem, 100%);
    position: relative;
}

.timbres-image picture .certifie{
    background-color: #ffffff;
    width: 6rem;
    height: 6rem;
    position: absolute;
    bottom: 1rem;
    left: 2rem;
    border-radius: 50%;
    background-image: url(./svg/certifie.svg);
}

.timbres-image picture img{
    width: 100%;
}

.timbres-image footer{
    display: flex;
    gap: var(--goutiere-200);
    flex-direction: row;
    overflow-x: auto;
    justify-content: flex-start;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-inline: var(--goutiere-200);
    margin-top: var(--goutiere-100);
}

.timbres-image footer img{
    border-radius: 1rem;
    overflow: hidden;
    scroll-snap-align: center;
    flex: 0 0 5rem;
    cursor: pointer;
}


.enchere-description{
}

.enchere-description > *{
    margin-inline: var(--goutiere-300);
}

.enchere-description > * + *{
    margin-top: var(--goutiere-300);
}

.enchere-description > footer{
    display: flex;
    white-space: nowrap;
    justify-content: space-around;
    gap: var(--goutiere-50);
}

@media screen and (min-width: 425px) {
    .enchere-description > footer a{
        min-width: 11rem;
    text-align: center;
    }
    
}

.enchere-description > footer a{
    padding-inline-start: 2rem;
    background-image: url(./svg/ajout-favoris.svg);
    background-position: 0.2rem 50%;
    background-size: 1.5rem;
}


.enchere-description > footer .placer-mise{
    position: relative;
    background-image: url(./svg/dollar.svg);
}

.enchere-description > footer .placer-mise span{
    position: absolute;
    left: 1rem;
    color: #9b9b9b;
    font-size: .7rem;
    bottom: -45%;
    font-weight: 100;
}

.mises {
    margin-inline: 0;
    padding: var(--goutiere-100) var(--goutiere-300);
}

.dates{
    display: flex;
    justify-content: space-around;
    border-bottom: 2px solid;
    max-width: 20rem;
    margin: auto;
}


.prix{
    display: flex;
    flex-flow: column;
    align-items: center;
}

.prix b{
    font-size: var(--texte-800);
}

.prix > div {
    display: flex;
    align-items: baseline;
    gap: var(--goutiere-50);
}

.prix footer{
    padding: 0.5rem var(--goutiere-400);
    border-radius: 2rem;
    text-align: center;
    margin-top: var(--goutiere-200);
}
.prix footer div{
    position: relative;
}

.prix footer div sub{
    position: absolute;
    bottom: 0;
    right: 0.2rem;
}

.enchere-description
{
    font-size: var(--texte-400);
}

.enchere-description li {
    list-style: none;
    display: flex;
    align-items: center;
    transition: height .2s ease-in;
}

.enchere-description li:first-of-type {
    font-weight: 600;
}

.enchere-description li span{
    width: 10rem;
    display: inline-block;
}

.enchere-description label{
    font-size: var(--texte-400);
    text-decoration: underline;
}

.enchere-description li + li{
    height: 0;
    overflow: hidden;
}

#tous-mise:checked + ul li{
    height: 2rem;
}

#tous-mise:checked + ul li + li{
    margin-top: var(--goutiere-100);
}
#tous-mise:checked + ul + label{
    display: none;
}

.timbre-description{
    padding: var(--goutiere-300);
}

.timbre-description > * + *{
    margin-top: var(--goutiere-300);
}

.timbre-description header{
    font-weight: bold;
    font-size: var(--texte-700);
}

.timbre-description table{
    font-size: var(--texte-400);
}

.timbre-description table td{
    padding: var(--goutiere-50);
}


.encheres-pertinents{
    margin-top: var(--goutiere-1000);
    padding-inline: var(--goutiere-400);
    font-weight: bold;
}


@media screen and (min-width: 1024px) {
    .fiche-enchere{
        max-width: 85rem;
        display: grid;
        grid-template-columns: 35rem auto;
        gap: var(--goutiere-600);
        padding-inline: var(--goutiere-600);
    }
    .fiche-enchere > *{
        margin: 0;
    }
    .timbres-image {
        grid-row: 1 / 3;
    }
    .timbre-description {
        background-color: transparent;
        grid-column: 2/3;
        grid-row: 2 /3;
    }

    .timbres-image footer{
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
        place-items: stretch;
        max-height: 30rem;
    }
    .timbres-image footer img{
        width: initial;
    }
    
}

/* ================================= zoom =============================== */
.timbres-image picture .libele-zoom{
    position: absolute;
    background-color: #ffffff;
    padding: var(--goutiere-400);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url(./svg/zoom.svg);
    opacity: .5;
}
.timbres-image .libele-zoom + .libele-zoom{
    background-image: url(./svg/fermer.svg);
    opacity: 1;
    background-color: var(--rouge-principal);
    padding:  var(--goutiere-200);
}

.timbres-image picture .libele-zoom + .libele-zoom, #zoom:checked + picture .libele-zoom, #zoom:checked + picture .certifie{
    display: none;
}

#zoom:checked + picture{
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: white;
    overflow: scroll;
    z-index: 2;
}

#zoom:checked + picture img {
    width: initial;
    max-width: inherit;
    min-width: 100vw;
    max-height: initial;
}

#zoom:checked + picture .libele-zoom + .libele-zoom{
    display: inline-block;
    position: fixed;
    left: initial;
    right: var(--goutiere-300);
    top: var(--goutiere-300);
    transform: none;
}


.grille > article > div p {
    font-size: var(--texte-400);
    max-height: 3rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grille > article > div {
    padding: var(--goutiere-200);
    display: flex;
    flex-flow: column;
}

.filtreHeader > h4 {
    text-align: center;
    font-weight: bold;
    padding: var(--goutiere-50);
    min-width: 100%;
}