:root {
    --spacing: 1rem;
    
    /* petit texte */
    --fs-1: 1rem;
    --lh-1: 1.4rem;
    
    /* texte de labeur, 16pt */
    --fs-2: 1.333rem;
    --lh-2: 2rem;
    
    /* grand texte, 20pt */
    --fs-3: 1.667rem;
    --lh-3: 2.33rem;
    
    /* menu, 24pt */
    --fs-4: 2rem;
    --lh-4: 2rem;

    /* intro corporate, 60pt */
    --fs-5: 5rem;
    --lh-5: 5rem;

    --black: #b0b0b0;
    --white: white;
    --transparent: #FFFFFFD0;
}

@media(max-width:500px) {
    :root {
        --spacing: .7rem;
    }
}



/* times_newer_roman */
@font-face {
    font-family: "times_newer_roman";
    src: url("../fonts/times_newer_roman/TimesNewerRoman-Regular.otf") format("opentype");
    font-style: normal;
    font-weight: normal;
}
@font-face {
    font-family: "times_newer_roman";
    src: url("../fonts/times_newer_roman/TimesNewerRoman-Italic.otf") format("opentype");
    font-style: italic;
    font-weight: normal;
}
@font-face {
    font-family: "times_newer_roman";
    src: url("../fonts/times_newer_roman/TimesNewerRoman-Bold.otf") format("opentype");
    font-style: normal;
    font-weight: 900;
}
@font-face {
    font-family: "times_newer_roman";
    src: url("../fonts/times_newer_roman/TimesNewerRoman-BoldItalic.otf") format("opentype");
    font-style: italic;
    font-weight: 900;
}


* {
  box-sizing:border-box;
  transition: font-weight 0.1s, padding 0.1s;
}

body {
    font-family: "times_newer_roman";
    font-size: var(--fs-2);
    line-height: var(--lh-2);
}

a {
  text-decoration:none;
}




/* GRID */
.grid {
    list-style: none;
    margin: 0px calc(2 * var(--spacing));

    /* grille à max 4 colonnes */
    --col_width: 240px;
    --col_gap: calc(2 * var(--spacing));
    --min_cols: 1;
    --max_cols: 4;
    display: grid;
    gap: var(--col_gap);
    grid-template-columns: repeat(auto-fill, minmax(min((100%/var(--min_cols) - var(--col_gap)*(var(--min_cols) - 1)/var(--min_cols)), max(var(--col_width), (100%/var(--max_cols) - var(--col_gap)*(var(--max_cols) - 1)/var(--max_cols)))), 1fr));
    
    /* grille antérieure avec autant que colonnes que possible */
    /*
        --col_width: 240px;
        gap: calc(2 * var(--spacing));
        grid-template-columns: repeat(auto-fill, minmax(var(--col_width), 1fr));
    */
}

.grid img {
    object-fit: cover;
    aspect-ratio: 5/6;
    height: 100%;
    width: 100%;
}
.grid figcaption {
    margin-top: calc(.5 * var(--spacing));

    font-size: var(--fs-2);
    line-height: var(--lh-2);
    text-align: center;
}

/* DEUX COLONNES LAYOUT */

@media(max-width:960px){
  /*.projets main #slider img,*/
  .projet main #slider img, 
  .basic-page main #slider img
  {
    max-height:640px;
    padding: calc(var(--spacing) * 2);
  }
}

@media(min-width:960px) {
  /*.projets main,*/
  .projet main,
  .basic-page main
  {
    display:flex;
    padding-right: calc(var(--spacing) * 4);
  }
  /*.projets main #slider,*/
  .projet main #slider,
  .basic-page main #slider
  {
    margin-top:0;
    top:calc(var(--spacing) * 4 + var(--fs-4) * 2);
    position:sticky;
    flex: 2;
    height : calc(100vh - calc(var(--spacing) * 8 + var(--fs-4) * 2));
    margin-bottom: calc(var(--spacing) * 2);
  }
  /*.projets main article,*/
  .projet main article,
  .basic-page main article
  {
    flex: 1;
    margin-top:0;
  }
}
/*.projets main #slider img,*/
.projet main #slider img, 
.basic-page main #slider img
{
  width:100%;
  height:100%;
  object-fit:contain;
}
/*.projets main #slider img,*/
.projet main #slider img, 
.basic-page main #slider img
{
  cursor:pointer;
}

