@font-face {
    font-family: "Atkinson Hyperlegible";
    font-style: normal;
    font-weight: 400;
    src:
        url(../fonts/Atkinson-Hyperlegible-Regular-102a.woff2) format("woff2"),
        url(../fonts/Atkinson-Hyperlegible-Regular-102a.ttf) format("truetype");
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    font-style: normal;
    font-weight: 800;
    src:
        url(../fonts/Atkinson-Hyperlegible-Bold-102a.woff2) format("woff2"),
        url(../fonts/Atkinson-Hyperlegible-Bold-102a.ttf) format("truetype");
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    font-style: italic;
    font-weight: 400;
    src:
        url(../fonts/Atkinson-Hyperlegible-Italic-102a.woff2) format("woff2"),
        url(../fonts/Atkinson-Hyperlegible-Italic-102a.ttf) format("truetype");
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    font-style: italic;
    font-weight: 800;
    src:
        url(../fonts/Atkinson-Hyperlegible-BoldItalic-102a.woff2) format("woff2"),
        url(../fonts/Atkinson-Hyperlegible-BoldItalic-102a.ttf) format("truetype");
}

:root {
    --unit:16px;
    --text-color:var(--dark);
    --text-color-light:var(--light-blue);
    --accent-color:var(--accent);
    --background-light:var(--light);
    --background-dark:var(--bg-dark);
    /* base colors light */
    --dark: #861330;
    --bg-dark: #861330;
    --light-blue: #ebecb4;
    --light:#eeeeee;
    --accent:#eb4569;
    --accent-gradient-end:#eb9045;
}

@media (prefers-color-scheme: dark) {
    :root {
        --dark: #F2E9E0;
        --light-blue: #f7f4c6;
        --light:#2b2b2b;
        --accent:#db8db2;
        --accent-gradient-end:#ecb486;
        --bg-dark: #ecb486;
    }
    .logo {
        background-image: url('../media/logo-light.png') !important;
    }
}

*, html, body {
    font-size: var(--unit);
    line-height: 1.2;
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    font-family: "Atkinson Hyperlegible", Arial, Helvetica, sans-serif;
}

body {
    background-color: var(--background-light);
    color: var(--text-color);
}

::-moz-selection { /* Code for Firefox */
    color: var(--background-light);
    background: var(--text-color);
    -webkit-background-clip: none;
    -webkit-text-fill-color: var(--background-light);
  }

::selection {
    color: var(--background-light);
    background: var(--text-color);
    -webkit-background-clip: text;
    -webkit-text-fill-color: var(--background-light);
}

/* Mise en forme textes */
em {
    color: var(--accent-color);
    font-size: inherit;
    font-style: normal;
    background: linear-gradient(to right, var(--accent-color), var(--accent-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text.as-title {
    font-size: 3rem;
    font-weight: 800;
}

h1 {
    font-size: 1.5rem;
}

header h2 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
}

a, div, span {
    font-size: inherit;
    color: inherit;
}

p {
    margin-bottom: 1rem;
}

/* buttons */

.is-custom {
    background-color: inherit;
    font-size: 1.2em;
    font-weight: 800;
    color:inherit;
    border-radius: .5rem;
    border:2px solid var(--background-dark);
    box-shadow: -3px 5px 0px var(--background-dark);
    padding: .5rem 1rem;
    transition: all .2s;
}

.is-custom:hover {
    box-shadow: -1px 2px 0px var(--background-dark);
    transition: all .2s;
}

.is-custom.in-header {
    font-size: 1.5rem;
    box-shadow: -5px 8px 0px var(--background-dark);
    padding: 1rem 2rem;
    transition: all .2s;
}

.is-custom.in-header:hover {
    box-shadow: -2px 4px 0px var(--background-dark);
    transition: all .2s;
}

/* Layout */

body {
    display: grid;
    grid-template-columns: 300px 1fr;
}
nav {
    max-width: 350px;
    padding:2.5rem;
    position: fixed;
    display: flex;
    flex-direction: column;
    gap:2rem;
    font-size: 1.2rem;
    font-weight: 800;
}
nav a {
    text-decoration: none;
}

nav a:hover, nav a:active {
    text-decoration: underline;
}

header, section {
    grid-column: 2/3;
    padding: 6rem;
    padding-left:3rem;
}

header h2 {
    margin-top: 3rem;
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
}

header h2 div:last-child {
    grid-column: 2/3;
}

header .logo {
    display: none;
}

.logo {
    height: 80px;
    width: 100%;
    background-image: url('../media/logo-colored.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

footer {
    grid-column: 2/4;
    padding: 3rem;
    margin-top: 4rem;
}

section:not(header) {
    padding-top:3rem;
    padding-bottom:3rem;
}

section.as-gallery .swiffy-slider {
    max-width: 1180px;
}

.slider-indicators button:focus, .slider-indicators button:hover {
    opacity: 1;
}

.centered {
    display: flex;
    justify-content: center;
}

ul li {
    padding-bottom: .5rem;
}

/* card styles */

section.with-cards>div {
    display: flex;
    justify-content: space-evenly;
}

section.with-cards h2 {
    text-align: center;
}

.card {
    display: flex;
    flex-direction: column;
    gap:1.5rem;
    max-width: 600px;
    height: auto;
    padding: 2rem;
    border:3px solid var(--background-dark);
    box-shadow: -5px 8px 0px var(--background-dark);
    transition: all .2s;
}

.card:hover {
    box-shadow: -2px 4px 0px var(--background-dark);
    transition: all .2s;
}

/* section with columns */

section.with-columns {
    display: grid;
}

section.with-two-columns {
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 4rem;
}

section h2 {
    margin-bottom: 2rem;
}

section.with-two-columns p, section.with-four-columns p {
    margin-bottom: 1rem;
}

section.with-two-columns figure img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
}

section.with-four-columns div:not(.centered) {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-column-gap: 1.5rem;
}

section.with-four-columns {
    min-width: 220px;
}

/* Media queries */

@media screen and (max-width: 1200px) {
    .card {
        max-width: 90%;
    }
    section.with-four-columns div:not(.centered) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        grid-column-gap: 1.5rem;
        grid-row-gap: 2rem ;
    }
}

@media screen and (max-width: 1024px) {
    section.with-four-columns div:not(.centered) {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-column-gap: 1.5rem;
        grid-row-gap: 2rem ;
    }
    section.with-two-columns {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-row-gap: 2rem;
        grid-column-gap: 4rem;
    }
    section.with-two-columns figure img {
        max-height: 300px;
    }
    nav {
        display: none;
    }
    header, section, footer {
        grid-column: 1/3;
        padding: 2rem;
        padding-left:2rem;
    }
    header .logo {
        display: block;
        height: 100px;
        object-fit: contain;
        text-align: center;
        width: 100%;
        margin-bottom: 2rem;
    }
}

@media screen and (max-width: 760px) {
    header h2 {
        margin-top: 3rem;
        margin-bottom: 3rem;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    header h2 div {
        grid-column: 1/3;
    }
}

/* header animation */

.animation-container {
    font-size: inherit;
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    height: 1.5rem;
}
.content__container__list {
    margin-top: 0;
    text-align: left;
    list-style: none;
    -webkit-animation-name: change;
    -webkit-animation-duration: 10s;
    -webkit-animation-iteration-count: infinite;
    animation-name: change;
    animation-duration: 10s;
    animation-iteration-count: infinite;
}
.content__container__list__item {
    line-height:1.2;
    margin:0;
    font-size: 1.5rem;
}

  @-webkit-keyframes change {
    0%, 12.66%, 100% {transform:translate3d(0,0,0);}
    16.66%, 29.32% {transform:translate3d(0,-25%,0);}
    33.32%,45.98% {transform:translate3d(0,-50%,0);}
    49.98%,62.64% {transform:translate3d(0,-75%,0);}
    66.64%,79.3% {transform:translate3d(0,-50%,0);}
    83.3%,95.96% {transform:translate3d(0,-25%,0);}
  }

  @-o-keyframes change {
    0%, 12.66%, 100% {transform:translate3d(0,0,0);}
    16.66%, 29.32% {transform:translate3d(0,-25%,0);}
    33.32%,45.98% {transform:translate3d(0,-50%,0);}
    49.98%,62.64% {transform:translate3d(0,-75%,0);}
    66.64%,79.3% {transform:translate3d(0,-50%,0);}
    83.3%,95.96% {transform:translate3d(0,-25%,0);}
  }

  @-moz-keyframes change {
    0%, 12.66%, 100% {transform:translate3d(0,0,0);}
    16.66%, 29.32% {transform:translate3d(0,-25%,0);}
    33.32%,45.98% {transform:translate3d(0,-50%,0);}
    49.98%,62.64% {transform:translate3d(0,-75%,0);}
    66.64%,79.3% {transform:translate3d(0,-50%,0);}
    83.3%,95.96% {transform:translate3d(0,-25%,0);}
  }


  @keyframes change {
    0%, 12.66%, 100% {transform:translate3d(0,0,0);}
    16.66%, 29.32% {transform:translate3d(0,-25%,0);}
    33.32%,45.98% {transform:translate3d(0,-50%,0);}
    49.98%,62.64% {transform:translate3d(0,-75%,0);}
    66.64%,79.3% {transform:translate3d(0,-50%,0);}
    83.3%,95.96% {transform:translate3d(0,-25%,0);}
  }
