@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-Regular.woff2") format("woff2");
    font-weight: 400;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-Medium.woff2") format("woff2");
    font-weight: 450;
    font-style: normal;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-ExtraBold.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
}

/* =================================================
   BASE
================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #F3F1EC; #f7f7f5;
    color: #333;

    font-family: "Montserrat", sans-serif;
}


/* =================================================
   CONTENEUR PRINCIPAL
================================================= */

.page {
    width: min(1180px, calc(100% - 60px));

    margin: 0 auto;

    padding: 58px 0 35px;
}


/* =================================================
   TITRE
================================================= */

header {
    text-align: center;

    padding-bottom: 34px;
}

header h1 {
    margin: 0;

    font-size: 30px;
    line-height: 1.2;

    font-weight: 400;

    letter-spacing: 0.01em;

    color: #536B73; #4F646B;
}

header::after {
    content: "";
    display: block;
    width: 80px;
    height: 2px;
    margin: 18px auto 0;
    background: #B4775C;
}

/* =================================================
   FILETS HORIZONTAUX
================================================= */

.separator {
    height: 1px;

    background: #d5d1ca;

    margin: 0;
}


/* =================================================
   GRILLE
================================================= */

.sites {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);
}


/* =================================================
   ÉLÉMENT
================================================= */

.site {
    position: relative;

    min-height: 108px;

    padding: 25px 30px 22px;

    text-align: center;
}

.site-centre {
    grid-column: 1 / -1;
}

/*
   Séparations horizontales uniquement
*/

.site:nth-child(n + 5) {
    border-top: 1px solid #d5d1ca; #e1e1de;
}


/* =================================================
   LIEN
================================================= */

.site a {
    display: inline-block;

    position: relative;

    color: #333;

    text-decoration: none;

    transition:
        color 0.25s ease;
}

/* .site a:hover,
.site a:focus-visible {
    color: #607980; #777;
} */

.site a:hover,
.site a:focus-visible {
    color: #3F7183;
}

.site a:hover .site-subtitle,
.site a:focus-visible .site-subtitle {
    color: #6E929E;
}


/* =================================================
   INTITULÉ
================================================= */

/*.site-title {
    display: block;

    font-size: 1rem; 22px;

    line-height: 1.18;

    font-weight:500; 800;
}*/

.site-title {
    position: relative;
}

.site-title::after {
    content: "";

    display: block;

    width: 0;
    height: 2px;

    margin: 6px auto 0;

    background: #3F7183;

    transition: width 0.25s ease;
}

.site a:hover .site-title::after,
.site a:focus-visible .site-title::after {
    width: 28px;
}


/* =================================================
   SOUS-TITRE
================================================= */

.site-subtitle {
    display: block;

    margin-top: 8px;

    font-family: "Montserrat", sans-serif;

    font-size: 14px;

    line-height: 1.3;

    color: #777;

    transition:
        color 0.25s ease;
}

.site a:hover .site-subtitle,
.site a:focus-visible .site-subtitle {
    color: #888;
}


/* =================================================
   POPUP
================================================= */

.site-popup {

    position: absolute;

    z-index: 20;

    left: 50%;

    top: calc(100% + 15px);

    width: min(400px, 72vw);

    padding: 18px 21px;

    transform:
        translateX(-50%)
        translateY(-4px);

    background: rgba(255, 255, 255, 0.97);

    color: #555;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 13px;

    line-height: 1.55;

    font-weight: normal;

    text-align: left;

    border: 1px solid rgba(0, 0, 0, 0.08);

    border-radius: 16px;

    box-shadow:
        0 10px 32px rgba(0, 0, 0, 0.18);

    opacity: 0;

    visibility: hidden;

    display: none;

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}


/* =================================================
   POPUP VISIBLE
================================================= */

.site-popup.visible {

    display: block;

    opacity: 1;

    visibility: visible;

    transform:
        translateX(-50%)
        translateY(0);
}


/* =================================================
   POPUP AU-DESSUS
================================================= */

.site-popup.above {

    top: auto;

    bottom: calc(100% + 15px);

    transform:
        translateX(-50%)
        translateY(4px);
}


.site-popup.above.visible {

    transform:
        translateX(-50%)
        translateY(0);
}

/* =================================================
   POPUP AU-DESSUS DU LIEN
================================================= */

.site a.popup-above::after {

    top: auto;

    bottom: calc(100% + 15px);

    transform:
        translateX(-50%)
        translateY(4px);
}


.site a.popup-above:hover::after,
.site a.popup-above:focus-visible::after {

    transform:
        translateX(-50%)
        translateY(0);
}

/* =================================================
   PIED DE PAGE
================================================= */

footer {

    margin-top: 0;

    padding-top: 20px;

    border-top: 1px solid #d5d5d2;

    text-align: center;

    font-family: "Montserrat", sans-serif;

    font-size: 12px;

    color: #918c83; #6a6a6a;
}


/* =================================================
   ÉCRANS INTERMÉDIAIRES : 3 COLONNES
================================================= */

@media (max-width: 950px) {

    .sites {
        grid-template-columns:
            repeat(3, 1fr);
    }

    .site:nth-child(n + 4) {
        border-top: 1px solid #d8d8d5;
    }

    .site:nth-child(-n + 3) {
        border-top: none;
    }
}


/* =================================================
   TABLETTES : 2 COLONNES
================================================= */

@media (max-width: 700px) {

    .page {
        width: min(100% - 30px, 560px);

        padding-top: 38px;
    }

    header {
        padding-bottom: 28px;
    }

    header h1 {
        font-size: 27px;
    }

    .sites {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .site:nth-child(n + 3) {
        border-top: 1px solid #d8d8d5;
    }

    .site:nth-child(-n + 2) {
        border-top: none;
    }

    .site {
        padding-left: 15px;
        padding-right: 15px;
    }

    .site-title {
        font-size: 20px;
    }
}


/* =================================================
   TÉLÉPHONES : 1 COLONNE
================================================= */

@media (max-width: 480px) {

    .page {
        width: calc(100% - 30px);

        padding-top: 30px;
    }

    header {
        padding-bottom: 25px;
    }

    header h1 {
        font-size: 25px;
    }

    .sites {
        grid-template-columns: 1fr;
    }

    .site:nth-child(n + 2) {
        border-top: 1px solid #d8d8d5;
    }

    .site:first-child {
        border-top: none;
    }

    .site {
        min-height: auto;

        padding: 24px 10px;
    }

    .site-title {
        font-size: 20px;
    }

    /*
       Popup adapté aux petits écrans
    */

.site-popup {

    width: min(320px, 85vw);

    font-size: 13px;

    padding: 15px 17px;

    border-radius: 14px;
}

}


/* =================================================
   ACCESSIBILITÉ
================================================= */

@media (prefers-reduced-motion: reduce) {

    .site a,
    .site a::after,
    .site-subtitle {
        transition: none;
    }
}