/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: #f4f7fb;
    --card: #ffffff;
    --text: #172033;
    --text-light: #667085;
    --border: #e4e8ef;
    --primary: #4f46e5;
    --shadow: 0 8px 25px rgba(30, 41, 59, 0.08);
}

body.dark {
    --background: #10131a;
    --card: #181c25;
    --text: #f5f7fa;
    --text-light: #9ca3af;
    --border: #292f3b;
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}


/* =========================
   BODY
========================= */

body {
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;

    transition:
        background 0.3s ease,
        color 0.3s ease;
}


/* =========================
   HEADER
========================= */

.header {
    width: 100%;
    padding: 20px 6%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;
    background: var(--primary);

    font-size: 25px;
}

.logo h1 {
    font-size: 21px;
}

.logo p {
    margin-top: 2px;
    color: var(--text-light);
    font-size: 13px;
}


/* =========================
   THEME BUTTON
========================= */

.theme-button {
    width: 45px;
    height: 45px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--background);
    color: var(--text);

    cursor: pointer;
    font-size: 19px;

    transition: 0.2s;
}

.theme-button:hover {
    transform: scale(1.08);
}


/* =========================
   CONTAINER
========================= */

.container {
    width: min(1200px, 90%);
    margin: auto;
}


/* =========================
   HERO
========================= */

.hero {
    text-align: center;
    padding: 55px 0 40px;
}

.hero h2 {
    font-size: clamp(26px, 4vw, 38px);
    margin-bottom: 10px;
}

.hero p {
    color: var(--text-light);
    margin-bottom: 28px;
}


/* =========================
   SEARCH
========================= */

.search-box {
    width: min(600px, 100%);
    height: 55px;

    margin: auto;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 18px;

    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 15px;

    box-shadow: var(--shadow);
}

.search-box span {
    font-size: 20px;
}

.search-box input {
    width: 100%;
    height: 100%;

    border: none;
    outline: none;

    background: transparent;
    color: var(--text);

    font-size: 16px;
}

.search-box input::placeholder {
    color: var(--text-light);
}


/* =========================
   CATEGORIES
========================= */

.categories {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(210px, 1fr));

    gap: 18px;

    padding-bottom: 50px;
}


/* =========================
   CATEGORY CARD
========================= */

.category-card {
    min-height: 190px;

    padding: 25px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    text-decoration: none;

    background: var(--card);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 20px;

    box-shadow: var(--shadow);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-7px);

    box-shadow:
        0 18px 35px rgba(30, 41, 59, 0.15);

    border-color: var(--primary);
}


/* =========================
   CARD ICON
========================= */

.card-icon {
    width: 55px;
    height: 55px;

    margin-bottom: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    font-size: 27px;
}


/* Couleurs */

.blue       { background: #dbeafe; }
.orange     { background: #ffedd5; }
.red        { background: #fee2e2; }
.cyan       { background: #cffafe; }
.purple     { background: #ede9fe; }
.green      { background: #dcfce7; }
.dark-blue  { background: #dbeafe; }
.yellow     { background: #fef3c7; }
.violet     { background: #ede9fe; }
.pink       { background: #fce7f3; }
.gold       { background: #fef3c7; }
.teal       { background: #ccfbf1; }
.aqua       { background: #cffafe; }
.brown      { background: #fef3c7; }
.steel      { background: #e5e7eb; }
.lime       { background: #ecfccb; }
.indigo     { background: #e0e7ff; }
.magenta    { background: #fae8ff; }
.light      { background: #fef9c3; }
.sound      { background: #e0e7ff; }
.kitchen    { background: #ffedd5; }
.car        { background: #dbeafe; }
.electric   { background: #fef3c7; }
.download   { background: #dcfce7; }
.money      { background: #d1fae5; }


/* =========================
   CARD TEXT
========================= */

.category-card h3 {
    font-size: 18px;
    margin-bottom: 7px;
}

.category-card p {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.4;
}


/* =========================
   NO RESULT
========================= */

.no-result {
    display: none;

    padding: 50px 20px;

    text-align: center;

    color: var(--text-light);
    font-size: 17px;
}


/* =========================
   FOOTER
========================= */

footer {
    padding: 25px;

    text-align: center;

    border-top: 1px solid var(--border);

    color: var(--text-light);
    font-size: 13px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 600px) {

    .header {
        padding: 15px 5%;
    }

    .logo h1 {
        font-size: 18px;
    }

    .logo-icon {
        width: 42px;
        height: 42px;
    }

    .hero {
        padding-top: 40px;
    }

    .categories {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 12px;
    }

    .category-card {
        min-height: 165px;
        padding: 18px;
    }

    .category-card h3 {
        font-size: 16px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 23px;
    }
}
