
/* ---- CSS Reset ---- */

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

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


* {
    margin: 0;
    padding: 0;
}

:is(ul, ol) {
    padding-inline-start: 2em;
}

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/ */
/* mk2 */

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


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

.l_cluster {
    display: flex;
    flex-wrap: var(--l_cluster__wrap, wrap);
    gap: var(--l_cluster__gap, 1rem);
    justify-content: var(--l_cluster__jc, 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-start: var(--l_flow__space, 1em);
}


/* The Frame - frame images into a given aspect ratio */
/* https://every-layout.dev/layouts/frame/ */

.l_frame {
    --l_frame__n: 16;
    --l_frame__d: 9;
    --l_frame__fit: cover;
    aspect-ratio: var(--l_frame__n) / var(--l_frame__d);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.l_frame > img,
.l_frame > video {
    inline-size: 100%;
    block-size: 100%;
    object-fit: var(--l_frame__fit);
}

/* 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));
    align-items: stretch;
}

.l_grid > * {
    display: flex;
    flex-direction: column;
}

/* 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 */
/* mk2 */

.l_repel {
    display: flex;
    flex-wrap: var(--l_repel__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 */

/* font used in the La Fabrique Logo */
@font-face {
    font-family: 'Aharoni';
    src: url('/assets/fonts/ahronbd.ttf') format('truetype');
    font-weight: bold;
    font-display: swap;
}

/* https://www.brailleinstitute.org/freefont/ */
@font-face {
    font-family: 'Atkinson-Hyperlegible-Next';
    src: url('/assets/fonts/AtkinsonHyperlegibleNextVF-Variable.woff2') format('woff2'),
         url('/assets/fonts/AtkinsonHyperlegibleNextVF-Variable.ttf') format('truetype');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Atkinson-Hyperlegible-Next';
    src: url('/assets/fonts/AtkinsonHyperlegibleNext-RegularItalic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Atkinson-Hyperlegible-Next';
    src: url('/assets/fonts/AtkinsonHyperlegibleNext-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

:root {
    --font-family-primary: 'Atkinson-Hyperlegible-Next', sans-serif;

    --font-family-secondary: 'Atkinson-Hyperlegible-Next', sans-serif;

    --font-family-brand: 'Aharoni', Impact, sans-serif;
}

/* Custom Properties */

/* @link https://utopia.fyi/type/calculator?c=360,18,1.125,1240,20,1.2,7,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.8681rem, 0.8974rem + -0.0379vw, 0.8889rem);
  --step--1: clamp(1rem, 0.983rem + 0.0758vw, 1.0417rem);
  --step-0: clamp(1.125rem, 1.0739rem + 0.2273vw, 1.25rem);
  --step-1: clamp(1.2656rem, 1.1697rem + 0.4261vw, 1.5rem);
  --step-2: clamp(1.4238rem, 1.2699rem + 0.6839vw, 1.8rem);
  --step-3: clamp(1.6018rem, 1.3735rem + 1.0149vw, 2.16rem);
  --step-4: clamp(1.802rem, 1.4789rem + 1.4363vw, 2.592rem);
  --step-5: clamp(2.0273rem, 1.5842rem + 1.9693vw, 3.1104rem);
  --step-6: clamp(2.2807rem, 1.6868rem + 2.6396vw, 3.7325rem);
  --step-7: clamp(2.5658rem, 1.7831rem + 3.4785vw, 4.479rem);
}


/* @link https://utopia.fyi/space/calculator?c=360,18,1.2,1240,19,1.25,7,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.5369rem + 0.1136vw, 0.625rem);
  --space-xs: clamp(0.875rem, 0.875rem + 0vw, 0.875rem);
  --space-s: clamp(1.125rem, 1.0994rem + 0.1136vw, 1.1875rem);
  --space-m: clamp(1.6875rem, 1.6364rem + 0.2273vw, 1.8125rem);
  --space-l: clamp(2.25rem, 2.1989rem + 0.2273vw, 2.375rem);
  --space-xl: clamp(3.375rem, 3.2983rem + 0.3409vw, 3.5625rem);
  --space-2xl: clamp(4.5rem, 4.3977rem + 0.4545vw, 4.75rem);
  --space-3xl: clamp(6.75rem, 6.5966rem + 0.6818vw, 7.125rem);

  /* One-up pairs */
  --space-3xs-2xs: clamp(0.3125rem, 0.1847rem + 0.5682vw, 0.625rem);
  --space-2xs-xs: clamp(0.5625rem, 0.4347rem + 0.5682vw, 0.875rem);
  --space-xs-s: clamp(0.875rem, 0.7472rem + 0.5682vw, 1.1875rem);
  --space-s-m: clamp(1.125rem, 0.8438rem + 1.25vw, 1.8125rem);
  --space-m-l: clamp(1.6875rem, 1.4063rem + 1.25vw, 2.375rem);
  --space-l-xl: clamp(2.25rem, 1.7131rem + 2.3864vw, 3.5625rem);
  --space-xl-2xl: clamp(3.375rem, 2.8125rem + 2.5vw, 4.75rem);
  --space-2xl-3xl: clamp(4.5rem, 3.4261rem + 4.7727vw, 7.125rem);

  /* Custom pairs */
  --space-s-l: clamp(1.125rem, 0.6136rem + 2.2727vw, 2.375rem);
}
/* Sticky footer: body is a flex column, footer consumes leftover space above it */

body {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
}

footer {
    margin-block-start: auto;
}

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


:root {
    --color-dark: #0c0c0c;
    --color-dark-soft: #202020;
    --color-light: #ffffff;
    --color-light-soft: #d0d0d0;

    --color-primary: #ff6600;
    --color-primary-soft: #fff0e6;
    --color-secondary: #1a4a7a;
    --color-secondary-soft: #e6eef5;

    color: var(--color-dark);
    background: var(--color-light);
    font-family: var(--font-family-primary);
    font-size: var(--step-0);
    text-wrap: pretty;

    line-height: 1.5;
    --l_flow__space: 1em;
    --l_box__padding: 1rem;

    /* control the main template */
    --l_center__size: 45rem;
    --l_center__padding: var(--space-s);

}


: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 {
    font-size: var(--step-4);
}

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

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

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

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

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);
    font-family: var(--font-family-secondary);
}

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-secondary);
}

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

small {
    font-size: var(--step--1);
    color: var(--color-dark-soft);
}

pre {
    font-size: var(--step--1);
    padding: 1em;
}

hr {
    border: none;
    border-block-end: 3px dashed var(--color-primary);
}

p > picture,
figure {
    max-inline-size: calc(var(--l_center__size) * 2 / 3);
    margin-inline: auto;
}

figure {
    padding: var(--space-xs);
    border-radius: 20px;
    background-color: var(--color-primary-soft);
}

figcaption {
    text-align: center;
    font-size: var(--step--1);
    color: var(--color-dark-soft);
    padding-block-start: var(--space-2xs);
}
.b_card__cover {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    margin: calc(-1 * var(--l_box__padding, 1rem));
    margin-block-end: 0;
}

.b_card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.b_card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: var(--l_box__padding, 1rem);
    border: 2px solid var(--color-light-soft);
    transition: border-color 0.15s;
    flex: 1;
}

.b_card:hover {
    border-color: var(--color-primary);
}

.b_card__title {
    font-family: var(--font-family-secondary);
    font-size: var(--step-0);
}

.b_card__meta {
    font-size: var(--step--1);
    color: var(--color-dark-soft);
}

/* news listing: horizontal card, date left-aligned above title */
.b_card--news {
    flex-direction: row;
    align-items: baseline;
    gap: 1.5rem;
    padding-block: 1.25rem;
}

.b_card--news .b_card__meta {
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 10ch;
}

.b_card--news .b_card__title {
    font-size: var(--step-0);
}

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

.b_lede {
  color: var(--color-secondary);
  font-size: var(--step-2);
  font-style: italic;
  max-width: 45ch;
  text-wrap: wrap;
}

.b_lede+* {
  --l_flow__space: 2em;
}

.b_news-listing__title {
    margin-block-end: 2rem;
}

.b_news-listing__list {
    --l_flow__space: 0.25rem;
}

.b_post__back {
    font-size: var(--step--1);
    text-decoration: none;
    color: var(--color-dark-soft);
}

.b_post__back:hover {
    color: var(--color-primary);
}

.b_post__date {
    font-size: var(--step--1);
    color: var(--color-dark-soft);
    display: block;
}

.b_post__content picture,
.b_post__content img {
    border-radius: 2px;
    max-block-size: 60vh;
    object-fit: contain;
    margin-inline: auto;
}

.b_post__nav {
    margin-block-start: 2rem;
    padding-block-start: 1rem;
    border-block-start: 1px solid var(--color-light-soft);
    font-size: var(--step--1);
}

.b_post__nav a {
    text-decoration: none;
    color: var(--color-dark-soft);
}

.b_post__nav a:hover {
    color: var(--color-primary);
}

.b_realisation__back {
    font-size: var(--step--1);
    text-decoration: none;
    color: var(--color-dark-soft);
}

.b_realisation__back:hover {
    color: var(--color-primary);
}

.b_realisation__meta {
    font-size: var(--step--1);
    color: var(--color-dark-soft);
}


.b_site-footer {
    background-color: var(--color-light);
    color: var(--color-dark-soft);
    font-size: var(--step--1);
    border-block-start: 3px solid var(--color-primary);
}

.b_site-footer__membership {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: var(--color-dark-soft);
    font-size: var(--step--2);
}

.b_site-footer__membership img {
    height: var(--space-xl);
    width: auto;
    flex-shrink: 0;
}

.b_site-footer__membership span {
    font-size: var(--step---1);
}

.b_site-footer__nav {
    --l_cluster__gap: 0.25rem 1.5rem;
}

.b_site-footer__nav a {
    text-decoration: none;
    color: var(--color-dark-soft);
}

.b_site-footer__nav a:hover {
    color: var(--color-dark);
}

.b_site-footer__copy {
    color: #888;
}

.b_site-header {
    border-block-end: 3px dashed var(--color-primary);
}

.b_site-header a {
    text-decoration: none;
}

.b_site-header__primary {
    font-size: var(--step-1);
}

.b_site-header__main-item:hover {
    text-decoration: underline;
    text-decoration-color: var(--color-primary);
    text-decoration-thickness: 0.2ex;
    text-underline-offset: 0.3ex;
}

.b_site-header__main-item--active {
    font-weight: bold;
}

.b_site-header__logo img {
    height: var(--space-2xl);
    width: auto;
}

.b_site-header__subnav {
    overflow-x: auto;
    font-size: var(--step--1);
    border-block-start: 3px solid var(--color-primary);
}

.b_site-header__subnav-item {
    display: block;
    padding: 0.5rem 1.25rem;
    white-space: nowrap;
}

.b_site-header__subnav-item:hover {
    text-decoration: underline;
    text-decoration-color: var(--color-primary);
    text-decoration-thickness: 0.2ex;
    text-underline-offset: 0.3ex;
}

.b_site-header__subnav-item--active {
    font-weight: bold;
}


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

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

.u_text-align-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: '';
}
