/* ==========================================================
   KRILIH.MA
   css/global.css
   VERSION V7
   WINDOWS 10 / KRILIH GLOBAL
   ==========================================================

   RÔLE
   ----------------------------------------------------------
   - Reset
   - Typographie
   - Structure générale
   - Boutons
   - Formulaires
   - Cards génériques
   - Grid
   - Flex
   - Utilities
   - Responsive

   NE CONTIENT PAS :
   - Header
   - Footer
   - Marketplace spécifique
   - Notifications
   - Messages
   - Locations
   ========================================================== */


/* ==========================================================
   01 — RESET
   ========================================================== */

*,
*::before,
*::after {

    margin: 0;

    padding: 0;

    box-sizing: border-box;
}


html {

    font-size: 16px;

    scroll-behavior: smooth;

    -webkit-text-size-adjust: 100%;
}


body {

    min-height: 100vh;

    font-family:
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    background:
        var(--bg);

    color:
        var(--text);

    line-height: 1.5;

    overflow-x: hidden;

    text-rendering:
        optimizeLegibility;

    -webkit-font-smoothing:
        antialiased;

    -moz-osx-font-smoothing:
        grayscale;
}


/* ==========================================================
   02 — BASIC ELEMENTS
   ========================================================== */

img {

    display: block;

    max-width: 100%;

    height: auto;
}


video,
iframe,
canvas {

    display: block;

    max-width: 100%;
}


button,
input,
textarea,
select {

    font: inherit;
}


button {

    cursor: pointer;

    border: 0;

    background: transparent;
}


button:disabled {

    cursor: not-allowed;

    opacity: .6;
}


input,
textarea,
select {

    width: 100%;

    outline: none;
}


textarea {

    resize: vertical;
}


table {

    width: 100%;

    border-collapse: collapse;
}


ul,
ol {

    list-style: none;
}


a {

    color: inherit;

    text-decoration: none;
}


/* ==========================================================
   03 — TYPOGRAPHY
   ========================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {

    font-family:
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    color:
        var(--text);

    font-weight:
        600;

    line-height:
        1.25;
}


h1 {

    font-size:
        32px;
}


h2 {

    font-size:
        28px;
}


h3 {

    font-size:
        22px;
}


h4 {

    font-size:
        18px;
}


h5 {

    font-size:
        16px;
}


h6 {

    font-size:
        14px;
}


p {

    color:
        var(--text-light);

    margin-bottom:
        12px;
}


small {

    color:
        var(--text-muted);

    font-size:
        13px;
}


strong {

    color:
        var(--text);

    font-weight:
        600;
}


/* ==========================================================
   04 — LINKS
   ========================================================== */

a {

    transition:
        color .12s ease,
        background-color .12s ease,
        border-color .12s ease;
}


a:hover {

    color:
        var(--primary);
}


/* ==========================================================
   05 — CONTAINER
   ========================================================== */

.container {

    width:
        min(
            var(--container),
            92%
        );

    margin-left:
        auto;

    margin-right:
        auto;
}


/* ==========================================================
   06 — MAIN / SECTION
   ========================================================== */

main {

    min-height:
        calc(
            100vh - var(--header-height)
        );
}


section {

    position:
        relative;
}


/* ==========================================================
   07 — BUTTON BASE
   ========================================================== */

.btn {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        8px;

    min-height:
        40px;

    padding:
        9px 18px;

    border:
        1px solid transparent;

    border-radius:
        var(--radius-md);

    font-size:
        14px;

    font-weight:
        600;

    line-height:
        1;

    cursor:
        pointer;

    user-select:
        none;

    white-space:
        nowrap;

    transition:
        background-color .12s ease,
        border-color .12s ease,
        color .12s ease,
        box-shadow .12s ease;
}


.btn:hover {

    transform:
        none;
}


.btn:active {

    transform:
        translateY(1px);
}


.btn:disabled {

    opacity:
        .6;

    cursor:
        not-allowed;
}


/* ==========================================================
   08 — BUTTON SIZES
   ========================================================== */

.btn-sm {

    min-height:
        32px;

    padding:
        6px 12px;

    font-size:
        13px;
}


.btn-lg {

    min-height:
        46px;

    padding:
        11px 22px;

    font-size:
        15px;
}


/* ==========================================================
   09 — FORM STRUCTURE
   ========================================================== */

.input-group {

    display:
        flex;

    flex-direction:
        column;

    gap:
        6px;

    margin-bottom:
        18px;
}


.form {

    display:
        flex;

    flex-direction:
        column;

    gap:
        18px;
}


.form-row {

    display:
        grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap:
        18px;
}


.form-group {

    margin-bottom:
        18px;
}


label {

    display:
        block;

    margin-bottom:
        6px;

    color:
        var(--text);

    font-size:
        14px;

    font-weight:
        600;
}


/* ==========================================================
   10 — INPUTS
   ========================================================== */

input,
textarea,
select {

    min-height:
        40px;

    padding:
        9px 12px;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-md);

    background:
        var(--surface);

    color:
        var(--text);

    transition:
        border-color .12s ease,
        box-shadow .12s ease,
        background-color .12s ease;
}


input:hover,
textarea:hover,
select:hover {

    border-color:
        var(--border-dark);
}


input:focus,
textarea:focus,
select:focus {

    border-color:
        var(--primary);

    box-shadow:
        0 0 0 2px var(--focus-ring);
}


::placeholder {

    color:
        var(--text-muted);

    opacity:
        1;
}


textarea {

    min-height:
        120px;
}


/* ==========================================================
   11 — ACCESSIBILITY
   ========================================================== */

:focus-visible {

    outline:
        2px solid var(--accent);

    outline-offset:
        2px;
}


/* ==========================================================
   12 — CARD BASE
   ========================================================== */

.card {

    background:
        var(--surface);

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-lg);

    box-shadow:
        var(--shadow-xs);

    overflow:
        hidden;

    transition:
        border-color .12s ease,
        box-shadow .12s ease;
}


.card:hover {

    border-color:
        var(--border-dark);

    box-shadow:
        var(--shadow-sm);
}


.card-body {

    padding:
        20px;
}


.card-title {

    margin-bottom:
        8px;

    color:
        var(--text);

    font-size:
        18px;

    font-weight:
        600;
}


.card-text {

    color:
        var(--text-light);
}


/* ==========================================================
   13 — GRID
   ========================================================== */

.grid {

    display:
        grid;
}


.grid-2 {

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
}


.grid-3 {

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
}


.grid-4 {

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );
}


.grid-auto {

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                260px,
                1fr
            )
        );
}


.grid-gap {

    gap:
        20px;
}


/* ==========================================================
   14 — FLEX
   ========================================================== */

.flex {
    display: flex;
}


.flex-column {
    flex-direction: column;
}


.flex-wrap {
    flex-wrap: wrap;
}


.justify-start {
    justify-content: flex-start;
}


.justify-center {
    justify-content: center;
}


.justify-between {
    justify-content: space-between;
}


.justify-end {
    justify-content: flex-end;
}


.align-start {
    align-items: flex-start;
}


.align-center {
    align-items: center;
}


.align-end {
    align-items: flex-end;
}


/* ==========================================================
   15 — GAP
   ========================================================== */

.gap-1 {
    gap: 8px;
}


.gap-2 {
    gap: 12px;
}


.gap-3 {
    gap: 16px;
}


.gap-4 {
    gap: 24px;
}


/* ==========================================================
   16 — WIDTH
   ========================================================== */

.w-100 {
    width: 100%;
}


.w-50 {
    width: 50%;
}


.max-w {

    max-width:
        var(--container);
}


/* ==========================================================
   17 — TEXT UTILITIES
   ========================================================== */

.text-center {
    text-align: center;
}


.text-left {
    text-align: left;
}


.text-right {
    text-align: right;
}


.text-primary {

    color:
        var(--primary) !important;
}


.text-accent {

    color:
        var(--accent) !important;
}


.text-success {

    color:
        var(--success) !important;
}


.text-danger {

    color:
        var(--danger) !important;
}


.text-muted {

    color:
        var(--text-muted) !important;
}


/* ==========================================================
   18 — FONT WEIGHT
   ========================================================== */

.fw-400 {
    font-weight: 400;
}


.fw-500 {
    font-weight: 500;
}


.fw-600 {
    font-weight: 600;
}


.fw-700 {
    font-weight: 700;
}


.fw-800 {
    font-weight: 800;
}


/* ==========================================================
   19 — MARGIN
   ========================================================== */

.mt-1 {
    margin-top: 8px;
}


.mt-2 {
    margin-top: 12px;
}


.mt-3 {
    margin-top: 16px;
}


.mt-4 {
    margin-top: 24px;
}


.mt-5 {
    margin-top: 32px;
}


.mb-1 {
    margin-bottom: 8px;
}


.mb-2 {
    margin-bottom: 12px;
}


.mb-3 {
    margin-bottom: 16px;
}


.mb-4 {
    margin-bottom: 24px;
}


.mb-5 {
    margin-bottom: 32px;
}


.ml-auto {
    margin-left: auto;
}


.mr-auto {
    margin-right: auto;
}


.mx-auto {

    margin-left:
        auto;

    margin-right:
        auto;
}


/* ==========================================================
   20 — PADDING
   ========================================================== */

.p-1 {
    padding: 8px;
}


.p-2 {
    padding: 12px;
}


.p-3 {
    padding: 16px;
}


.p-4 {
    padding: 24px;
}


.p-5 {
    padding: 32px;
}


/* ==========================================================
   21 — RADIUS
   ========================================================== */

.rounded-sm {

    border-radius:
        var(--radius-sm);
}


.rounded {

    border-radius:
        var(--radius-md);
}


.rounded-lg {

    border-radius:
        var(--radius-lg);
}


.rounded-full {

    border-radius:
        50%;
}


/* ==========================================================
   22 — SHADOW
   ========================================================== */

.shadow-sm {

    box-shadow:
        var(--shadow-sm);
}


.shadow {

    box-shadow:
        var(--shadow-md);
}


.shadow-lg {

    box-shadow:
        var(--shadow-lg);
}


/* ==========================================================
   23 — DISPLAY
   ========================================================== */

.d-none {
    display: none !important;
}


.d-block {
    display: block !important;
}


.d-inline {
    display: inline !important;
}


.d-inline-block {
    display: inline-block !important;
}


.d-flex {
    display: flex !important;
}


.d-grid {
    display: grid !important;
}


.hidden {
    display: none !important;
}


.visible {
    display: block !important;
}


/* ==========================================================
   24 — UTILITIES
   ========================================================== */

.pointer,
.cursor-pointer {

    cursor:
        pointer;
}


.cursor-default {

    cursor:
        default;
}


.overflow-hidden {

    overflow:
        hidden;
}


.opacity-0 {
    opacity: 0;
}


.opacity-25 {
    opacity: .25;
}


.opacity-50 {
    opacity: .5;
}


.opacity-75 {
    opacity: .75;
}


.opacity-100 {
    opacity: 1;
}


.transition {

    transition:
        var(--transition);
}


/* ==========================================================
   25 — DIVIDERS
   ========================================================== */

.divider {

    width:
        100%;

    height:
        1px;

    margin:
        20px 0;

    background:
        var(--border);
}


hr {

    border:
        none;

    border-top:
        1px solid var(--border);

    margin:
        24px 0;
}


/* ==========================================================
   26 — AVATAR
   ========================================================== */

.avatar {

    width:
        44px;

    height:
        44px;

    border-radius:
        50%;

    object-fit:
        cover;

    overflow:
        hidden;
}


/* ==========================================================
   27 — LOADER
   ========================================================== */

.loader {

    width:
        36px;

    height:
        36px;

    border:
        3px solid var(--border);

    border-top-color:
        var(--primary);

    border-radius:
        50%;

    animation:
        spin .8s linear infinite;
}


@keyframes spin {

    to {

        transform:
            rotate(360deg);
    }

}


/* ==========================================================
   28 — SKELETON
   ========================================================== */

.skeleton {

    background:
        linear-gradient(
            90deg,
            #eeeeee,
            #f8f8f8,
            #eeeeee
        );

    background-size:
        200% 100%;

    animation:
        skeleton-loading 1.4s infinite;
}


@keyframes skeleton-loading {

    0% {

        background-position:
            200% 0;
    }

    100% {

        background-position:
            -200% 0;
    }

}


/* ==========================================================
   29 — ANIMATIONS
   ========================================================== */

.fade-in {

    animation:
        fadeIn .20s ease;
}


.slide-up {

    animation:
        slideUp .20s ease;
}


.zoom-in {

    animation:
        zoomIn .15s ease;
}


@keyframes fadeIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


@keyframes slideUp {

    from {

        opacity: 0;

        transform:
            translateY(6px);
    }

    to {

        opacity: 1;

        transform:
            translateY(0);
    }

}


@keyframes zoomIn {

    from {

        opacity: 0;

        transform:
            scale(.99);
    }

    to {

        opacity: 1;

        transform:
            scale(1);
    }

}


/* ==========================================================
   30 — SCROLLBAR
   ========================================================== */

::-webkit-scrollbar {

    width:
        10px;
}


::-webkit-scrollbar-track {

    background:
        #eeeeee;
}


::-webkit-scrollbar-thumb {

    background:
        #b8b8b8;

    border-radius:
        0;
}


::-webkit-scrollbar-thumb:hover {

    background:
        #999999;
}


/* ==========================================================
   31 — SELECTION
   ========================================================== */

::selection {

    background:
        var(--primary);

    color:
        #ffffff;
}


/* ==========================================================
   32 — RESPONSIVE 992px
   ========================================================== */

@media (max-width: 992px) {

    .grid-4 {

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .grid-3 {

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .form-row {

        grid-template-columns:
            1fr;
    }

}


/* ==========================================================
   33 — RESPONSIVE 768px
   ========================================================== */

@media (max-width: 768px) {

    html {

        font-size:
            15px;
    }


    h1 {

        font-size:
            28px;
    }


    h2 {

        font-size:
            24px;
    }


    h3 {

        font-size:
            20px;
    }


    .container {

        width:
            100%;

        padding-left:
            16px;

        padding-right:
            16px;
    }


    .grid-2,
    .grid-3,
    .grid-4 {

        grid-template-columns:
            1fr;
    }


    .btn {

        min-height:
            40px;
    }

}


/* ==========================================================
   34 — RESPONSIVE 480px
   ========================================================== */

@media (max-width: 480px) {

    body {

        font-size:
            14px;
    }


    .btn {

        width:
            100%;
    }

}


/* ==========================================================
   35 — PRINT
   ========================================================== */

@media print {

    header,
    footer,
    nav,
    .btn {

        display:
            none !important;
    }


    body {

        background:
            #ffffff !important;

        color:
            #000000 !important;
    }

}


/* ==========================================================
   36 — REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        animation:
            none !important;

        transition:
            none !important;

        scroll-behavior:
            auto !important;
    }

}


/* ==========================================================
   FIN GLOBAL.CSS V7
   ========================================================== */