/* ============================================================
   KITVIA FRONT — en-tête, menu mobile, pied de page
   Charte « Clinique lumière » : bleu Kitvia #75CBF4 (principale),
   bleu nuit #33325A (secondaire), Archivo.
   ============================================================ */

@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/archivo-latin.woff2') format('woff2');
}

/* Cookie (signature manuscrite) : disponible pour les autres plugins KITVIA (dashboard…) */
@font-face {
    font-family: 'Cookie';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/cookie-latin.woff2') format('woff2');
}

.kitvia-front {
    --kf-blue: #75CBF4;
    --kf-blue-soft: #A9DEF8;
    --kf-night: #33325A;
    --kf-night-deep: #17162E;
    --kf-pale: #EEF7FD;
    --kf-grey: #F6F9FB;
    --kf-text-2: #5A5A7E;
    --kf-line: #DCE3EC;
    --kf-line-2: #E6ECF2;
    --kf-link: #1A72A6;
    --kf-max: 1400px;
    --kf-gutter: max(20px, calc((100vw - var(--kf-max)) / 2));
    font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    color: var(--kf-night);
    -webkit-font-smoothing: antialiased;
}

.kitvia-front *,
.kitvia-front *::before,
.kitvia-front *::after {
    box-sizing: border-box;
}

.kitvia-front [hidden] {
    display: none !important;
}

.kf-wrap {
    max-width: var(--kf-max);
    margin: 0 auto;
    padding-left: var(--kf-gutter);
    padding-right: var(--kf-gutter);
}

body .kitvia-front a {
    color: var(--kf-night);
    text-decoration: none;
}

body .kitvia-front button {
    font-family: inherit;
    margin: 0;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
}

body .kitvia-front a:focus-visible,
body .kitvia-front button:focus-visible {
    outline: 3px solid var(--kf-blue);
    outline-offset: 2px;
}

body .kitvia-front .kf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--kf-night);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 15px;
    transition: background 0.15s;
}

body .kitvia-front .kf-btn:hover {
    background: var(--kf-night-deep);
    color: #FFFFFF;
}

body .kitvia-front .kf-btn--light {
    background: var(--kf-blue);
    color: var(--kf-night);
}

body .kitvia-front .kf-btn--light:hover {
    background: var(--kf-blue-soft);
    color: var(--kf-night);
}

/* En-tête / pied de page du thème masqués (thème autre que Kadence) */
body.kitvia-front-hide-theme #masthead,
body.kitvia-front-hide-theme header.site-header,
body.kitvia-front-hide-theme #colophon,
body.kitvia-front-hide-theme footer.site-footer {
    display: none;
}

/* ============================================================
   BARRE DU HAUT
   ============================================================ */

.kf-topbar {
    background: var(--kf-night);
    color: #FFFFFF;
    font-size: 13px;
}

.kf-topbar .kf-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 24px;
    padding-top: 9px;
    padding-bottom: 9px;
}

.kf-topbar__text:empty {
    display: none;
}

body .kitvia-front .kf-topbar__contact a {
    color: var(--kf-blue);
    font-weight: 700;
}

/* ============================================================
   EN-TÊTE
   ============================================================ */

.kf-header {
    background: #FFFFFF;
    border-bottom: 1px solid var(--kf-line-2);
}

.kf-header .kf-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.kf-logo {
    display: block;
    flex-shrink: 0;
}

.kf-logo img {
    display: block;
    height: 34px;
    width: auto;
}

.kf-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 28px;
    font-size: 15px;
    font-weight: 600;
}

body .kitvia-front .kf-nav a {
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s, color 0.15s;
}

body .kitvia-front .kf-nav a:hover {
    border-bottom-color: var(--kf-line);
}

body .kitvia-front .kf-nav a.is-current {
    border-bottom-color: var(--kf-blue);
}

.kf-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

body .kitvia-front .kf-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.25;
    padding: 4px 8px 4px 4px;
    border-radius: 999px;
    transition: background 0.15s;
}

body .kitvia-front .kf-user:hover {
    background: var(--kf-grey);
}

.kf-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--kf-blue);
    color: var(--kf-night);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.kf-user__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kf-user__text strong {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.kf-user__text span {
    color: var(--kf-text-2);
    font-size: 13px;
}

body .kitvia-front .kf-cart {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--kf-night);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    transition: background 0.15s;
}

body .kitvia-front .kf-cart:hover {
    background: var(--kf-night-deep);
    color: #FFFFFF;
}

.kf-cart__total {
    color: var(--kf-blue);
}

.kf-cart__total:empty {
    display: none;
}

.kf-cart__total .woocommerce-Price-amount,
.kf-cart__total .amount,
.kf-cart__total bdi {
    color: inherit;
    font-weight: inherit;
}

body .kitvia-front .kf-burger {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--kf-pale);
    color: var(--kf-night);
    align-items: center;
    justify-content: center;
}

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

.kf-drawer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.25s;
}

.kf-drawer.is-open {
    opacity: 1;
}

body .kitvia-front .kf-drawer__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: rgba(23, 22, 46, 0.5);
}

.kf-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(100%, 420px);
    display: flex;
    flex-direction: column;
    background: var(--kf-night);
    color: #FFFFFF;
    overflow: hidden;
    transform: translateX(30px);
    transition: transform 0.25s ease;
}

.kf-drawer.is-open .kf-drawer__panel {
    transform: translateX(0);
}

.kf-drawer__disc {
    position: absolute;
    left: -120px;
    bottom: -140px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: var(--kf-blue);
    pointer-events: none;
}

.kf-drawer__head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 12px 20px;
}

.kf-drawer__logo {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: #FFFFFF;
}

.kf-drawer__head img {
    display: block;
    height: 24px;
    width: auto;
}

body .kitvia-front .kf-drawer__close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kf-drawer__nav {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 24px 0;
}

body .kitvia-front .kf-drawer__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

body .kitvia-front .kf-drawer__nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0 13px 22px;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

body .kitvia-front .kf-drawer__nav li.is-main a {
    padding-left: 0;
    font-weight: 800;
    font-size: 26px;
}

body .kitvia-front .kf-drawer__nav li.is-current a {
    color: var(--kf-blue);
}

.kf-drawer__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--kf-blue);
    flex-shrink: 0;
}

.kf-drawer__foot {
    position: relative;
    padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kf-drawer__user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: #FFFFFF;
    color: var(--kf-night);
    font-size: 14px;
    line-height: 1.25;
}

.kf-drawer__user .kf-user__text {
    flex: 1 1 auto;
}

.kf-drawer__user .kf-user__text strong {
    max-width: none;
    white-space: normal;
}

body .kitvia-front .kf-drawer__logout {
    font-size: 14px;
    font-weight: 700;
    padding: 12px 4px;
    white-space: nowrap;
}

body.kf-drawer-open {
    overflow: hidden;
}

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

.kf-footer {
    background: var(--kf-grey);
    border-top: 1px solid var(--kf-line-2);
    margin-top: 48px;
}

.kf-footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    padding-top: 64px;
    padding-bottom: 40px;
}

.kf-footer__brand {
    grid-column: span 2;
    min-width: 0;
}

.kf-footer__brand img {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
}

body .kitvia-front .kf-footer__brand p {
    margin: 24px 0 0;
    max-width: 380px;
    color: var(--kf-text-2);
    font-size: 15px;
    line-height: 1.6;
}

body .kf-footer h2 {
    margin: 0 0 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.3;
    color: var(--kf-night);
}

body .kitvia-front .kf-footer__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    font-size: 15px;
}

body .kitvia-front .kf-footer__nav a {
    color: var(--kf-text-2);
}

body .kitvia-front .kf-footer__nav a:hover,
body .kitvia-front .kf-footer__legal a:hover {
    color: var(--kf-night);
}

body .kitvia-front .kf-footer__contact address {
    font-style: normal;
    color: var(--kf-text-2);
    font-size: 15px;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body .kitvia-front .kf-footer__contact a {
    color: var(--kf-text-2);
}

body .kitvia-front .kf-footer__phone {
    color: var(--kf-night) !important;
    font-weight: 700;
}

.kf-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px 32px;
    padding-top: 22px;
    padding-bottom: 36px;
    border-top: 1px solid var(--kf-line-2);
    font-size: 13px;
    color: var(--kf-text-2);
}

.kf-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

body .kitvia-front .kf-footer__legal a {
    color: var(--kf-text-2);
}

body .kitvia-front .kf-footer__site {
    font-weight: 600;
}

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

@media (max-width: 968px) {
    .kf-topbar__contact {
        display: none;
    }

    .kf-header .kf-wrap {
        padding-top: 10px;
        padding-bottom: 10px;
        gap: 8px;
    }

    .kf-logo img {
        height: 26px;
    }

    .kf-nav,
    .kf-user {
        display: none !important;
    }

    body .kitvia-front .kf-cart {
        padding: 10px 14px;
        font-size: 14px;
        gap: 8px;
    }

    .kf-cart__total {
        display: none;
    }

    body .kitvia-front .kf-burger {
        display: flex;
    }

    .kf-footer {
        margin-top: 32px;
    }

    .kf-footer__grid {
        gap: 28px;
        padding-top: 40px;
        padding-bottom: 28px;
    }

    .kf-footer__brand {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .kf-cart__count {
        display: none;
    }

    body .kitvia-front .kf-cart {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kf-drawer,
    .kf-drawer__panel {
        transition: none;
    }
}
