

/* ---- My light CSS Reset ---- */

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

html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}


body {
    margin: 0;
}

img,
picture,
video {
    display: block;
    max-inline-size: 100%;
    block-size: auto;
}

pre {
    overflow-x: auto;
}

input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

a {
    color: currentColor;
}


/* The Box - Padding around block */
/* https://every-layout.dev/layouts/box/ */

.l_box {
    padding: var(--l_box__padding, 1rem);
}

/* The Center - horizontal centering */
/* https://every-layout.dev/layouts/center/ */

.l_center {
    max-inline-size: var(--l_center__size, 65ch);
    margin-inline: auto;
}


/* The cluster - horizontal wrapping */
/* https://every-layout.dev/layouts/cluster/ */

.l_cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--l_cluster__gap, 1rem);
    justify-content: flex-start;
    align-items: center;
}

/* The Cover - Vertical centering */
/* https://every-layout.dev/layouts/cover/ */

.l_cover {
    display: flex;
    flex-direction: column;
    min-block-size: var(--l_cover__size, 100vh);
    padding: 1rem;
}

.l_cover>* {
    margin-block: 1rem;
}

.l_cover> :first-child:not(.l_cover__main) {
    margin-block-start: 0;
}

.l_cover> :last-child:not(.l_cover__main) {
    margin-block-end: 0;
}

.l_cover>.l_cover__main {
    margin-block: auto;
}

/* The Flow layout (aka The Stack layout) - vertical spacing between block */
/* https://bell.bz/my-favourite-3-lines-of-css/ */
/* https://every-layout.dev/layouts/stack/ */

.l_flow>* {
    margin-block: 0;
}

/* TODO il>li>p ont trop de marge */

.l_flow>*+* {
    margin-block-start: var(--l_flow__space, 1em);
}


/* The Grid - A grid of content */
/* https://every-layout.dev/layouts/grid/ */

.l_grid {
    display: grid;
    gap: var(--l_grid__gap, 1rem);
    grid-template-columns: repeat(auto-fit, minmax(min(var(--l_grid__size, 25ch), 100%), 1fr));
}

/* Repel - pushes items away from each other where there is space
           in the viewport and stacks on small viewports */
/* https://piccalil.li/blog/reality-check-1-building-out-a-furniture-site-from-dribbble/#repel */


.l_repel {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: var(--l_repel__alignment, center);
    gap: var(--l_repel__gap, 1rem);
}

.l_repel[data-repel-variant='vertical'] {
    --l_repel__alignment: stretch;
    flex-direction: column;
}



/* The Sidebar - sidebar that switch to vertical */
/* https://every-layout.dev/layouts/sidebar/ */

.l_sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--l_sidebar__gap, 1rem);
}

.l_sidebar>.l_sidebar__side {
    flex-basis: var(--l_sidebar__width, 20rem);
    flex-grow: 1;
}

.l_sidebar>.l_sidebar__main {
    flex-basis: 0;
    flex-grow: 999;
    min-inline-size: 50%;
}

/* The Switcher - one row that switch to one column */
/* https://every-layout.dev/layouts/switcher/ */

.l_switcher {
    display: flex;
    flex-wrap: wrap;
    gap: var(--l_switcher__gap, 1rem);
}

.l_switcher>* {
    flex-grow: 1;
    flex-basis: calc((var(--l_switcher__breakpoint, 30rem) - 100%) * 999);
}



/* Fonts */

/* from https://modernfontstacks.com/ */

/*
System UI
system-ui, sans-serif; 

Transitional
Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;

Old Style
'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif; 

Humanist
Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif; 

Geometric Humanist
Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;

Classical Humanist
Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif;

Neo-Grotesque
Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;

Monospace Slab Serif
'Nimbus Mono PS', 'Courier New', monospace;

Monospace Code
ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;

Industrial
Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif;

Rounded Sans
ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif; 

Slab Serif
Rockwell, 'Rockwell Nova', 'Roboto Slab', 'DejaVu Serif', 'Sitka Small', serif;

Antique
Superclarendon, 'Bookman Old Style', 'URW Bookman', 'URW Bookman L', 'Georgia Pro', Georgia, serif;

Didone
Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif;

Handwritten
'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive; 
*/

:root {
    --font-family-primary:
        /* Transitional */ Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;

    --font-family-secondary:
        /*Humanist*/ Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif; 

}
/* Custom Properties */

/* Sizes */

/* @link https://utopia.fyi/type/calculator?c=320,18,1.2,1240,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */

:root {
    --step--2: clamp(0.7813rem, 0.7747rem + 0.0326vw, 0.8rem);
    --step--1: clamp(0.9375rem, 0.9158rem + 0.1087vw, 1rem);
    --step-0: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
    --step-1: clamp(1.35rem, 1.2761rem + 0.3696vw, 1.5625rem);
    --step-2: clamp(1.62rem, 1.5041rem + 0.5793vw, 1.9531rem);
    --step-3: clamp(1.944rem, 1.771rem + 0.8651vw, 2.4414rem);
    --step-4: clamp(2.3328rem, 2.0827rem + 1.2504vw, 3.0518rem);
    --step-5: clamp(2.7994rem, 2.4462rem + 1.7658vw, 3.8147rem);
}


/* @link https://utopia.fyi/space/calculator?c=320,18,1.2,1240,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */

:root {
    --space-3xs: clamp(0.3125rem, 0.3125rem + 0vw, 0.3125rem);
    --space-2xs: clamp(0.5625rem, 0.5408rem + 0.1087vw, 0.625rem);
    --space-xs: clamp(0.875rem, 0.8533rem + 0.1087vw, 0.9375rem);
    --space-s: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
    --space-m: clamp(1.6875rem, 1.6223rem + 0.3261vw, 1.875rem);
    --space-l: clamp(2.25rem, 2.163rem + 0.4348vw, 2.5rem);
    --space-xl: clamp(3.375rem, 3.2446rem + 0.6522vw, 3.75rem);
    --space-2xl: clamp(4.5rem, 4.3261rem + 0.8696vw, 5rem);
    --space-3xl: clamp(6.75rem, 6.4891rem + 1.3043vw, 7.5rem);

    /* One-up pairs */
    --space-3xs-2xs: clamp(0.3125rem, 0.2038rem + 0.5435vw, 0.625rem);
    --space-2xs-xs: clamp(0.5625rem, 0.4321rem + 0.6522vw, 0.9375rem);
    --space-xs-s: clamp(0.875rem, 0.7446rem + 0.6522vw, 1.25rem);
    --space-s-m: clamp(1.125rem, 0.8641rem + 1.3043vw, 1.875rem);
    --space-m-l: clamp(1.6875rem, 1.4049rem + 1.413vw, 2.5rem);
    --space-l-xl: clamp(2.25rem, 1.7283rem + 2.6087vw, 3.75rem);
    --space-xl-2xl: clamp(3.375rem, 2.8098rem + 2.8261vw, 5rem);
    --space-2xl-3xl: clamp(4.5rem, 3.4565rem + 5.2174vw, 7.5rem);

    /* Custom pairs */
    --space-s-l: clamp(1.125rem, 0.6467rem + 2.3913vw, 2.5rem);
}
:root {
    --color-dark: #11002b;
    --color-light: #ebe3c2;
    --color-primary: #ffc400;

    --l_center__size: 70ch;
    --l_cover__size: 60vh;

    --l_flow__space: 1em;
}

/* global font, color and vertical rythmn */
/* A lot come from https://piccalil.li/blog/some-simple-ways-to-make-content-look-good/ */

body {
    color: var(--color-light);
    background: var(--color-dark);
    font-family: var(--font-family-primary);
    font-size: var(--step-0);
    line-height: 1.5;
    text-wrap: pretty;
}

:is(h1, h2, h3, h4, h5, h6) {
    font-family: var(--font-family-secondary);
    line-height: 1.1;
    text-wrap: balance;
    hyphens: auto;
}

/* réduire la hauteur de ligne des titres */
:is(h1, h2, h3, h4, h5, h6, blockquote) {
    --l_flow__space: 1.25em;
}

/* rapprocher le titre avec le texte qui suit */
:is(h1, h2, h3, h4, h5, h6)+* {
    --l_flow__space: 0.5em;
}

h1 {
    text-align: center;
    font-size: var(--step-5);
}

h2 {
    font-size: var(--step-4);
}

h3 {
    font-size: var(--step-3);
}

h4 {
    font-size: var(--step-2);
}

h5 {
    font-size: var(--step-1);
}

h6 {
    font-size: var(--step-0);
}

:is(ul, ol) {
    /* se rapprocher de la ligne du dessus */
    --l_flow__space: 0.25em;

}

ol {
    /* pour que les numéro des ol soit plus à droite */
    list-style-position: inside; 
}

blockquote {
    padding-inline-start: 1em;
    border-inline-start: 0.3em solid var(--color-primary);
    font-style: italic;
    font-size: var(--step-1);
}

a {
    color: currentColor;
    text-decoration-color: var(--color-primary);
    text-decoration-thickness: 0.2ex;
    text-underline-offset: 0.2ex;
}

/* style français */
ul {
    list-style-type: '- ';
}

em {
    color: var(--color-primary);
}

strong {
    color: var(--color-primary);
}

pre {
    font-size: var(--step--1);
    background-color: var(--color-light);
    color: var(--color-dark);
    padding: 1em;
    border-radius: 0.5rem;
}



/* intro paragraph */
/* from https://piccalil.li/blog/some-simple-ways-to-make-content-look-good/ */

.b_lede {
  font-size: var(--size-step-1);
  font-style: italic;
  max-inline-size: 45ch;
  text-wrap: balance;
}

.b_lede + * {
  --l_flow-space: 2em;
}



/* b_logo_img */

.logo_img {
    block-size: var(--space-2xl-3xl);
    border-radius: var(--space-s);
}


/* texicon */

.texicon svg {
    height: 1lh;
    transform: translateY(1ex);
}

/* texicon_v */

.texicon_v {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}




/* ---- CSS Utilities ---- */

.u_ta-center {
    text-align: center;
}

.u_ta-right {
    text-align: right;
}

.u_list-style-none {
    list-style: none;
}

.u_reset-marg-pad {
    margin: 0;
    padding: 0;
}

.u_margin-inline-auto {
    margin-inline: auto;
}

.u_text-decoration-none {
    text-decoration: none;
}

.u_empty_list-style {
    list-style-type: '';
}

.u_text-align-center{
    text-align: center
}
