
@mixin write-grid($media: '') {
    .grid#{$media}-reg2 {grid-template-columns: repeat(2, 1fr);}
.grid#{$media}-reg3 {grid-template-columns: repeat(3, 1fr);}
.grid#{$media}-reg4 {grid-template-columns: repeat(4, 1fr);}
.grid#{$media}-reg5 {grid-template-columns: repeat(5, 1fr);}
.grid#{$media}-reg6 {grid-template-columns: repeat(6, 1fr);}
.grid#{$media}-1-2 { grid-template-columns: 1fr 2fr; }
.grid#{$media}-1-3 { grid-template-columns: 1fr 3fr; }
.grid#{$media}-1-4 { grid-template-columns: 1fr 4fr; }
.grid#{$media}-4-1 { grid-template-columns: 4fr 1fr; }
.grid#{$media}-3-1 { grid-template-columns: 3fr 1fr; }
.grid#{$media}-2-1 { grid-template-columns: 2fr 1fr; }

@each $nom, $size in $base_width {
    .grid-gap#{$media}-#{$nom} {gap: $size;}
} 
.grid#{$media}-align-start { align-items: start; }
.grid#{$media}-align-center { align-items: center; }
.grid#{$media}-align-end { align-items: end; }
}

@mixin write-flex($media: '') {
    .direction#{$media}-row { flex-direction: row; }
.direction#{$media}-column{ flex-direction: column; }
.direction#{$media}-column-reverse{ flex-direction: column-reverse; }
.direction#{$media}-column-reverse{ flex-direction: row-reverse; }
.align#{$media}-self-end { align-self:flex-end; }

.justify#{$media}-content-start {justify-content: flex-start;}
.justify#{$media}-content-end {justify-content: flex-end;}
.justify#{$media}-content-center {justify-content: center;}
.justify#{$media}-content-between {justify-content: space-between;}
.justify#{$media}-content-around {justify-content: space-around;}
.justify#{$media}-content-evenly {justify-content: space-evenly;}

.align#{$media}-items-start { align-items: flex-start; }
.align#{$media}-items-center { align-items: center; }
.align#{$media}-items-end { align-items: flex-end; }

.flex#{$media}-grow0 { flex-grow:0; }
.flex#{$media}-grow1 { flex-grow:1; }
.flex#{$media}-grow2 { flex-grow:2; }
.flex#{$media}-grow3 { flex-grow:3; }

.flex#{$media}-col-2 {
    width: calc(100% / 6);
}
.flex#{$media}-col-3 {
    width: calc(100% / 4);
}
.flex#{$media}-col-4 {
    width: calc(100% / 3);
}  
.flex#{$media}-col-5 {
    width: calc(100% *0.41666);
}
.flex#{$media}-col-6 {
    width: calc(100% / 2);
}
.flex#{$media}-col-7 {
    width: calc(100% * 0.583333);
}
.flex#{$media}-col-8 {
    width: calc(100% * 0.66666);
}
.flex#{$media}-col-9 {
    width: calc(100% * 0.75);
}
.flex#{$media}-col-10 {
    width: calc(100% * 0.83333);
}
.flex#{$media}-col-12 {
    width: 100%;
}

@each $nom, $size in $base_width {
    .flex-gap-#{$media}-#{$nom}{ gap: $size; }
} 


}
/* grid basis  - - - */
.grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
    column-gap:0;

}

@include write-grid();

/* flex basis */
.flex {
    display: flex;
    flex-direction: row;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
}

@each $nom, $size in $base_width {
    .flex-gap-#{$nom} {gap: $size;}
} 

@include write-flex();