/* ==========================================================================
   TripCooking — entête média social
   Toutes les classes sont isolées avec le préfixe tcs-
   ========================================================================== */

:root {
    --tcs-header-top-height: 72px;
    --tcs-header-nav-height: 52px;
    --tcs-header-height:
        calc(
            var(--tcs-header-top-height) +
            var(--tcs-header-nav-height)
        );

    --tcs-bg: #ffffff;
    --tcs-soft: #f3f5f4;
    --tcs-soft-strong: #e9eeeb;

    --tcs-line: #e4e8e5;
    --tcs-text: #151a17;
    --tcs-muted: #747b76;

    --tcs-green: #245f40;
    --tcs-green-dark: #19462f;
    --tcs-green-soft: #e9f2ec;

    --tcs-yellow: #e5b91b;
    --tcs-pink: #d94169;

    --tcs-radius: 16px;
    --tcs-shadow:
        0 18px 50px -38px
        rgba(14, 25, 18, 0.55);
}

/* ==========================================================================
   RESET LOCAL
   ========================================================================== */

.tcs-header,
.tcs-header *,
.tcs-header *::before,
.tcs-header *::after {
    box-sizing: border-box;
}

.tcs-header a {
    color: inherit;
    text-decoration: none;
}

.tcs-header button,
.tcs-header input {
    font: inherit;
}

.tcs-header button {
    cursor: pointer;
}

/* ==========================================================================
   CONTENEUR PRINCIPAL
   ========================================================================== */

.tcs-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;

    z-index: 3000;

    width: 100%;

    background:
        rgba(255, 255, 255, 0.97);

    color: var(--tcs-text);

    border-bottom:
        1px solid var(--tcs-line);

    box-shadow:
        var(--tcs-shadow);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);
}

/* ==========================================================================
   LIGNE PRINCIPALE
   ========================================================================== */

.tcs-header__inner {
    min-height:
        var(--tcs-header-top-height);

    padding:
        10px
        clamp(16px, 2.2vw, 38px);

    display: grid;

    grid-template-columns:
        minmax(210px, 0.65fr)
        minmax(340px, 1.5fr)
        minmax(360px, 1fr);

    align-items: center;

    gap: 22px;
}

/* ==========================================================================
   PARTIE GAUCHE
   ========================================================================== */

.tcs-header__left {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 15px;
}

/* Menu */

.tcs-menu {
    width: 42px;
    height: 42px;

    padding: 0;

    display: none;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 4px;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: var(--tcs-text);
}

.tcs-menu:hover {
    background:
        var(--tcs-soft);
}

.tcs-menu span {
    width: 19px;
    height: 2px;

    display: block;

    border-radius: 999px;

    background:
        currentColor;
}

/* ==========================================================================
   SIGNATURE TRIPCOOKING
   ========================================================================== */

.tcs-signature {
    position: relative;

    min-width: max-content;

    display: inline-flex;
    align-items: center;

    padding:
        3px 4px 8px;
}

.tcs-signature__name {
    position: relative;

    z-index: 2;

    color:
        var(--tcs-green);

    font-family:
        "Segoe Script",
        "Brush Script MT",
        "Lucida Handwriting",
        cursive;

    font-size:
        clamp(25px, 2vw, 34px);

    font-weight: 700;

    line-height: 1;

    letter-spacing:
        -0.075em;

    white-space: nowrap;

    transform:
        rotate(-2deg);

    transform-origin:
        left center;
}

.tcs-signature__line {
    position: absolute;

    left: 28px;
    right: 3px;
    bottom: 2px;

    height: 7px;

    border-bottom:
        3px solid
        var(--tcs-yellow);

    border-radius: 50%;

    transform:
        rotate(-2deg);
}

.tcs-signature__line::after {
    content: "";

    position: absolute;

    right: 11px;
    bottom: -5px;

    width: 6px;
    height: 6px;

    border-right:
        2px solid
        var(--tcs-green);

    border-bottom:
        2px solid
        var(--tcs-green);

    transform:
        rotate(28deg);
}

/* ==========================================================================
   RECHERCHE
   ========================================================================== */

.tcs-header__center {
    min-width: 0;
}

.tcs-search {
    position: relative;

    width: min(100%, 760px);

    margin: 0 auto;
}

.tcs-search__icon {
    position: absolute;

    top: 50%;
    left: 17px;

    z-index: 2;

    transform:
        translateY(-50%);

    color:
        #4d5550;

    font-size: 23px;

    line-height: 1;

    pointer-events: none;
}

.tcs-search input {
    width: 100%;
    height: 48px;

    padding:
        0 74px 0 49px;

    border:
        1px solid transparent;

    border-radius: 999px;

    outline: none;

    background:
        var(--tcs-soft);

    color:
        var(--tcs-text);

    font-size: 14px;
    font-weight: 600;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.tcs-search input::placeholder {
    color:
        #878e89;

    opacity: 1;
}

.tcs-search input:hover {
    background:
        #eef1ef;
}

.tcs-search input:focus {
    background:
        #ffffff;

    border-color:
        rgba(36, 95, 64, 0.28);

    box-shadow:
        0 0 0 4px
        rgba(36, 95, 64, 0.08);
}

.tcs-search__shortcut {
    position: absolute;

    top: 50%;
    right: 12px;

    transform:
        translateY(-50%);

    padding:
        4px 8px;

    border:
        1px solid #d9ddda;

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.88);

    color:
        #707772;

    font-size: 10px;
    font-weight: 800;

    pointer-events: none;
}

/* Résultats du moteur */

.tcs-search__results {
    position: absolute;

    top: calc(100% + 9px);
    right: 0;
    left: 0;

    z-index: 100;

    max-height: 420px;

    overflow-y: auto;

    border:
        1px solid
        var(--tcs-line);

    border-radius:
        18px;

    background:
        #ffffff;

    box-shadow:
        0 25px 70px -34px
        rgba(16, 24, 20, 0.55);
}

.tcs-search__results ul {
    margin: 0;
    padding: 8px;

    list-style: none;
}

/* ==========================================================================
   PARTIE DROITE
   ========================================================================== */

.tcs-header__right {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 9px;
}

/* Bouton publier */

.tcs-create {
    min-height: 43px;

    padding:
        0 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    border: 0;

    border-radius:
        999px;

    background:
        var(--tcs-green);

    color:
        #ffffff;

    font-size: 12px;
    font-weight: 850;

    white-space: nowrap;

    box-shadow:
        0 13px 27px -19px
        rgba(25, 71, 47, 0.95);

    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.tcs-create:hover {
    background:
        var(--tcs-green-dark);

    transform:
        translateY(-1px);
}

.tcs-create__plus {
    font-size: 19px;
    line-height: 1;
}

/* Messages et notifications */

.tcs-action {
    position: relative;

    width: 41px;
    height: 41px;

    padding: 0;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border:
        1px solid transparent;

    border-radius: 50%;

    background:
        transparent;

    color:
        #171c19;

    font-size: 19px;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.tcs-action:hover {
    border-color:
        var(--tcs-line);

    background:
        var(--tcs-soft);
}

.tcs-action__badge {
    position: absolute;

    top: -1px;
    right: -2px;

    min-width: 18px;
    height: 18px;

    padding:
        0 5px;

    display: grid;
    place-items: center;

    border:
        2px solid #ffffff;

    border-radius:
        999px;

    background:
        var(--tcs-pink);

    color:
        #ffffff;

    font-size: 9px;
    font-weight: 900;
}

/* ==========================================================================
   PROFIL
   ========================================================================== */

.tcs-profile {
    min-width: 0;

    margin-left: 4px;
    padding:
        4px 5px 4px 14px;

    display: flex;
    align-items: center;

    gap: 9px;

    border-left:
        1px solid
        var(--tcs-line);

    border-radius:
        13px;

    transition:
        background 0.15s ease;
}

.tcs-profile:hover {
    background:
        var(--tcs-soft);
}

.tcs-profile__photo,
.tcs-profile__avatar {
    width: 42px;
    height: 42px;

    flex: 0 0 auto;

    border-radius: 50%;
}

.tcs-profile__photo {
    display: block;

    object-fit: cover;
}

.tcs-profile__avatar {
    display: grid;
    place-items: center;

    background:
        var(--tcs-green-soft);

    color:
        var(--tcs-green);

    font-size: 11px;
    font-weight: 900;
}

.tcs-profile__text {
    min-width: 0;
}

.tcs-profile__text strong,
.tcs-profile__text small {
    display: block;

    max-width: 120px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.tcs-profile__text strong {
    font-size: 12px;
    line-height: 1.2;
}

.tcs-profile__text small {
    margin-top: 3px;

    color:
        var(--tcs-muted);

    font-size: 9px;
}

.tcs-profile__arrow {
    color:
        #616863;

    font-size: 15px;
}

/* ==========================================================================
   VISITEUR
   ========================================================================== */

.tcs-login,
.tcs-register {
    min-height: 41px;

    padding:
        0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius:
        999px;

    font-size: 12px;
    font-weight: 850;

    white-space: nowrap;
}

.tcs-login:hover {
    background:
        var(--tcs-soft);
}

.tcs-register {
    background:
        var(--tcs-pink);

    color:
        #ffffff !important;

    box-shadow:
        0 12px 25px -19px
        rgba(218, 61, 104, 0.9);
}

/* ==========================================================================
   NAVIGATION INFÉRIEURE
   ========================================================================== */

.tcs-navigation {
    min-height:
        var(--tcs-header-nav-height);

    padding:
        0 clamp(16px, 2.2vw, 38px);

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: center;

    border-top:
        1px solid
        rgba(228, 232, 229, 0.75);
}

.tcs-navigation__links {
    justify-self: center;

    height: 100%;

    display: flex;
    align-items: stretch;

    gap: 6px;
}

.tcs-navigation__item {
    position: relative;

    min-width: 110px;
    min-height:
        var(--tcs-header-nav-height);

    padding:
        0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    color:
        #515954;

    font-size: 12px;
    font-weight: 800;

    transition:
        color 0.15s ease,
        background 0.15s ease;
}

.tcs-navigation__item::after {
    content: "";

    position: absolute;

    right: 20px;
    bottom: -1px;
    left: 20px;

    height: 3px;

    border-radius:
        3px 3px 0 0;

    background:
        transparent;
}

.tcs-navigation__item > span {
    font-size: 18px;
    line-height: 1;
}

.tcs-navigation__item:hover {
    color:
        var(--tcs-green);

    background:
        linear-gradient(
            to top,
            rgba(36, 95, 64, 0.055),
            transparent
        );
}

.tcs-navigation__item.is-active {
    color:
        var(--tcs-green);
}

.tcs-navigation__item.is-active::after {
    background:
        var(--tcs-green);
}

/* ==========================================================================
   OUTILS DROITE DE LA NAVIGATION
   ========================================================================== */

.tcs-navigation__tools {
    display: flex;
    align-items: center;

    gap: 12px;
}

/* Langue */

.tcs-language {
    padding: 3px;

    display: inline-flex;

    border:
        1px solid
        var(--tcs-line);

    border-radius:
        999px;

    background:
        #ffffff;
}

.tcs-language a {
    min-width: 31px;
    height: 25px;

    display: grid;
    place-items: center;

    border-radius:
        999px;

    color:
        var(--tcs-muted);

    font-size: 9px;
    font-weight: 900;
}

.tcs-language a.is-on {
    background:
        var(--tcs-green);

    color:
        #ffffff;
}

/* Horloge */

.tcs-clock {
    min-width: 72px;

    display: inline-flex;
    align-items: center;

    gap: 7px;

    color:
        var(--tcs-muted);

    font-size: 10px;
    font-weight: 800;
}

.tcs-clock__dot {
    width: 7px;
    height: 7px;

    flex: 0 0 auto;

    border-radius: 50%;

    background:
        #38a169;

    box-shadow:
        0 0 0 4px
        rgba(56, 161, 105, 0.12);
}

/* ==========================================================================
   DÉCALAGE DU CONTENU
   ========================================================================== */

body {
    padding-top:
        var(--tcs-header-height) !important;
}

/*
La page recette avait anciennement une marge correspondant
à l'ancien entête. On l'annule pour éviter le double espace.
*/

.recette-voyage.tc-recipe-layout {
    margin-top: 0 !important;

    min-height:
        calc(
            100vh -
            var(--tcs-header-height)
        ) !important;
}

.tc-recipe-sidebar,
.tc-recipe-right {
    top:
        var(--tcs-header-height) !important;

    height:
        calc(
            100vh -
            var(--tcs-header-height)
        ) !important;
}

.tc-recipe-tabs {
    top:
        var(--tcs-header-height) !important;
}

/* ==========================================================================
   ÉCRANS INTERMÉDIAIRES
   ========================================================================== */

@media (max-width: 1320px) {

    .tcs-header__inner {
        grid-template-columns:
            minmax(180px, 0.55fr)
            minmax(300px, 1.25fr)
            auto;

        gap: 14px;
    }

    .tcs-signature__name {
        font-size: 28px;
    }

    .tcs-profile__text,
    .tcs-profile__arrow,
    .tcs-search__shortcut {
        display: none;
    }

    .tcs-navigation__item {
        min-width: 96px;

        padding-inline: 11px;
    }

}

/* ==========================================================================
   TABLETTE
   ========================================================================== */

@media (max-width: 1020px) {

    :root {
        --tcs-header-top-height: 66px;
        --tcs-header-nav-height: 0px;
    }

    .tcs-header__inner {
        grid-template-columns:
            auto
            minmax(220px, 1fr)
            auto;

        gap: 11px;
    }

    .tcs-menu {
        display: flex;
    }

    .tcs-signature__name {
        font-size: 0;
    }

    .tcs-signature__name::after {
        content: "TC";

        font-family:
            Inter,
            system-ui,
            sans-serif;

        font-size: 20px;
        font-weight: 950;

        letter-spacing:
            -0.07em;
    }

    .tcs-signature__line {
        left: 2px;
    }

    .tcs-create {
        width: 42px;
        height: 42px;

        min-height: 42px;

        padding: 0;

        border-radius: 50%;
    }

    .tcs-create__label {
        display: none;
    }

    .tcs-navigation {
        position: relative;

        display: block;

        min-height: 0;

        padding: 0;

        border-top: 0;
    }

    .tcs-navigation__links {
        position: fixed;

        top:
            var(--tcs-header-top-height);

        right: 12px;
        left: 12px;

        z-index: 3010;

        height: auto;

        padding: 9px;

        display: none;

        flex-direction: column;
        align-items: stretch;

        border:
            1px solid
            var(--tcs-line);

        border-radius:
            17px;

        background:
            #ffffff;

        box-shadow:
            0 25px 65px -34px
            rgba(13, 24, 18, 0.75);
    }

    /*
    Le bouton burger actuel porte l'identifiant #burger.
    Si ton ancien cookingMap.js ouvre déjà le rail, tu peux
    conserver ce fonctionnement. Pour ouvrir ce menu précis,
    il faudra ajouter une petite classe en JS.
    */

    .tcs-header.is-menu-open
    .tcs-navigation__links {
        display: flex;
    }

    .tcs-navigation__item {
        min-width: 0;
        min-height: 45px;

        justify-content: flex-start;

        border-radius: 11px;
    }

    .tcs-navigation__item::after {
        display: none;
    }

    .tcs-navigation__item.is-active {
        background:
            var(--tcs-green-soft);
    }

    .tcs-navigation__tools {
        display: none;
    }

    body {
        padding-top:
            var(--tcs-header-top-height) !important;
    }

    .recette-voyage.tc-recipe-layout {
        min-height:
            calc(
                100vh -
                var(--tcs-header-top-height)
            ) !important;
    }

    .tc-recipe-sidebar,
    .tc-recipe-right {
        top:
            var(--tcs-header-top-height) !important;

        height:
            calc(
                100vh -
                var(--tcs-header-top-height)
            ) !important;
    }

    .tc-recipe-tabs {
        top:
            var(--tcs-header-top-height) !important;
    }

}

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 700px) {

    .tcs-header__inner {
        padding-inline: 10px;

        grid-template-columns:
            auto
            minmax(0, 1fr)
            auto;

        gap: 7px;
    }

    .tcs-header__left {
        gap: 4px;
    }

    .tcs-menu {
        width: 38px;
        height: 38px;
    }

    .tcs-signature {
        display: none;
    }

    .tcs-search input {
        height: 42px;

        padding:
            0 12px 0 40px;

        font-size: 12px;
    }

    .tcs-search__icon {
        left: 13px;

        font-size: 19px;
    }

    .tcs-header__right {
        gap: 2px;
    }

    .tcs-action {
        width: 37px;
        height: 37px;
    }

    .tcs-profile,
    .tcs-login {
        display: none;
    }

    .tcs-register {
        min-height: 38px;

        padding-inline: 12px;

        font-size: 10px;
    }

    .tcs-create {
        width: 38px;
        height: 38px;

        min-height: 38px;
    }

}

/* ==========================================================================
   TRÈS PETIT MOBILE
   ========================================================================== */

@media (max-width: 470px) {

    .tcs-action {
        display: none;
    }

    .tcs-register {
        padding-inline: 10px;
    }

}