/* =========================================================
   AMO-TE OLHÃO — CALENDRIER DES MARCHÉS
   CSS COMPLET — ANNULE ET REMPLACE
   ========================================================= */


/* =========================
   CONTENEUR GÉNÉRAL
   ========================= */

.ato-market-calendar {
    width: 100%;
    margin: 35px 0 40px;
    box-sizing: border-box;
}

.ato-market-calendar h2 {
    margin: 0 0 24px;
}

.ato-market-note {
    margin: 16px 0 0;
    font-size: 12px;
    line-height: 1.6;
    opacity: 0.70;
}


/* =========================================================
   DESKTOP / TABLETTE
   ========================================================= */

.ato-market-table-wrap {
    display: block !important;
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e1e6ec;
    border-radius: 8px;
    box-sizing: border-box;
}

.ato-market-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: auto;
    margin: 0 !important;
    background: #ffffff;
}


/* EN-TÊTE */

.ato-market-table thead th {
    padding: 15px 18px !important;

    background: #f4f9ff !important;
    color: #222222 !important;

    text-align: left !important;
    vertical-align: middle !important;

    font-size: 15px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;

    border-right: 1px solid #e1e6ec !important;
    border-bottom: 2px solid #006ff9 !important;
}

.ato-market-table thead th:last-child {
    border-right: 0 !important;
}


/* LIGNES */

.ato-market-table tbody td {
    padding: 18px 18px !important;

    background: #ffffff !important;
    color: #222222 !important;

    vertical-align: middle !important;

    font-size: 15px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;

    border-right: 1px solid #edf0f3 !important;
    border-bottom: 1px solid #e7eaee !important;
}

.ato-market-table tbody td:last-child {
    border-right: 0 !important;
}

.ato-market-table tbody tr:last-child td {
    border-bottom: 0 !important;
}


/* Très léger contraste une ligne sur deux */

.ato-market-table tbody tr:nth-child(even) td {
    background: #fafcff !important;
}


/* COLONNES */

.ato-market-table tbody td:first-child {
    width: 35%;
    font-weight: 600 !important;
}

.ato-market-table tbody td:nth-child(2) {
    width: 23%;
}

.ato-market-table tbody td:nth-child(3) {
    width: 20%;
}

.ato-market-table tbody td:nth-child(4) {
    width: 22%;

    color: #006ff9 !important;
    font-weight: 600 !important;

    white-space: nowrap;
}


/* CARTES CACHÉES SUR DESKTOP */

.ato-market-cards {
    display: none !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media screen and (max-width: 767px) {

    .ato-market-calendar {
        margin: 24px 0 30px;
    }

    .ato-market-calendar h2 {
        margin: 0 0 20px;

        font-size: 25px;
        line-height: 1.25;
    }


    /* Le tableau disparaît totalement */

    .ato-market-table-wrap {
        display: none !important;
    }


    /* Les cartes apparaissent */

    .ato-market-cards {
        display: block !important;
    }


    /* CARTE */

    .ato-market-card {
        width: 100%;
        margin: 0 0 11px;

        background: #ffffff;

        border: 1px solid #e1e8f0;
        border-radius: 9px;

        overflow: hidden;
        box-sizing: border-box;

        box-shadow: 0 2px 7px rgba(0, 0, 0, 0.035);
    }


    /* JOUR */

    .ato-market-day {
        padding: 9px 14px;

        background: #f1f6fd;
        color: #006ff9;

        font-size: 13px;
        line-height: 1.3;
        font-weight: 700;
    }


    /* CORPS DE CARTE */

    .ato-market-card-main {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;

        width: 100%;

        padding: 12px 14px !important;

        gap: 12px;

        box-sizing: border-box;
    }


    /* BLOC GAUCHE */

    .ato-market-card-main > div:first-child {
        display: block !important;

        flex: 1 1 auto;

        min-width: 0;

        white-space: normal !important;
    }


    /* LIEU */

    .ato-market-card-main strong {
        display: block !important;

        margin: 0 !important;

        color: #111111;

        font-size: 16px !important;
        line-height: 1.15 !important;
        font-weight: 700 !important;
    }


    /* PAS DE TIRET */

    .ato-market-card-main strong::after {
        content: none !important;
        display: none !important;
    }


    /* TYPE DE MARCHÉ — PLUS PROCHE DU LIEU */

    .ato-market-card-main span {
        display: block !important;

        margin: 1px 0 0 !important;

        color: #444444 !important;
        opacity: 1 !important;

        font-size: 14px !important;
        line-height: 1.15 !important;
        font-weight: 400 !important;
    }


    /* HORAIRES À DROITE */

    .ato-market-hours {
        display: block !important;

        flex: 0 0 auto;

        min-width: 58px;

        padding-left: 13px;

        border-left: 1px solid #e3e7eb;

        color: #006ff9 !important;

        text-align: right !important;
        white-space: nowrap;

        font-size: 14px !important;
        line-height: 1.3 !important;
        font-weight: 700 !important;
    }


    /* NOTE */

    .ato-market-note {
        margin-top: 15px;

        font-size: 12px;
        line-height: 1.5;
    }
}


/* =========================================================
   PETITS MOBILES
   ========================================================= */

@media screen and (max-width: 380px) {

    .ato-market-card-main {
        padding: 11px 12px !important;
        gap: 8px;
    }

    .ato-market-card-main strong {
        font-size: 15px !important;
    }

    .ato-market-card-main span {
        font-size: 13px !important;
    }

    .ato-market-hours {
        min-width: 53px;
        padding-left: 9px;

        font-size: 13px !important;
    }
}

/* Ajustement lisibilité tableau marchés */

.ato-market-table thead th {
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}

.ato-market-table tbody td:first-child {
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}

.ato-market-table tbody td:nth-child(4) {
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}
