/* * {
    outline: 1px solid red;
} */

:root {
    --bg: #f7f7f9;
    --card-bg: rgba(255, 255, 255, 0.68);
    --nav-bg: rgba(245, 245, 247, 0.96);
    --blur: 20px;
    --shadow: 0 4px 32px 0 rgba(33, 37, 41, 0.08), 0 1.5px 6px 0 rgba(33, 37, 41, 0.02);
    --primary: #0071e3;
    --primary-dark: #0366d6;
    --border-radius: 22px;
    --border-radius-small: 11px;
    --text-main: #181818;
    --text-secondary: #646468;
    --text-link: #0071e3;
    --card-padding: 34px 24px 22px;
    --transition: 0.17s cubic-bezier(.68, .11, .63, .99);
    --about-card-bg: rgba(255, 255, 255, 0.77);
    --about-shadow: 0 4px 24px 0 rgba(80, 80, 95, 0.13);
    --about-accent: #1162f7;
    --about-muted: #6b7280;
    --about-divider: #e1e1e8;
}

/* Native dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #101013;
        --card-bg: rgba(26, 27, 31, 0.78);
        --nav-bg: rgba(17, 17, 20, 0.98);
        --text-main: #fcfcfd;
        --text-secondary: #babac0;
        --text-link: #44aaff;
        --shadow: 0 8px 36px 0 rgba(0, 0, 0, 0.28), 0 1.5px 6px 0 rgba(33, 37, 41, 0.13);
        --about-card-bg: rgba(22, 24, 28, 0.86);
        --about-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.33);
        --about-accent: #58a6ff;
        --about-muted: #c3cad7;
        --about-divider: #23232c;
    }
}

@font-face {
    font-family: 'ClashRegular';
    src: url('../assets/fonts/Clash_Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html {
    overflow-y: scroll;
}

/* Base */
html,
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    scroll-behavior: smooth;
}

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2vw;
    background: var(--nav-bg);
    backdrop-filter: blur(var(--blur));
    box-shadow: 0 1.5px 11px 0 rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(110, 110, 120, 0.05);
}

.navbar__logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.01em;
    color: var(--primary);
}

.navbar__links {
    display: flex;
    gap: 0.7rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar__link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--border-radius-small);
    transition: background var(--transition), color var(--transition);
}

.navbar__link--active,
.navbar__link:hover,
.navbar__link:focus {
    background: rgba(0, 113, 227, 0.08);
    color: var(--primary);
}

.navbar__toggle,
.navbar__burger {
    display: none;
}

/* Hamburger for mobile */
@media (max-width: 720px) {
    .navbar__links {
        display: none;
        position: absolute;
        background: var(--nav-bg);
        box-shadow: var(--shadow);
        right: 12px;
        top: 58px;
        flex-direction: column;
        min-width: 150px;
        border-radius: var(--border-radius);
        z-index: 101;
        padding: 10px 0;
    }

    .navbar__toggle:checked~.navbar__links {
        display: flex;
    }

    .navbar__burger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 4px;
        margin-left: 12px;
    }

    .navbar__burger-line {
        display: block;
        width: 26px;
        height: 3.5px;
        background: var(--primary);
        border-radius: 2px;
        transition: all var(--transition);
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 38px 18px 70px;
    box-sizing: border-box;
}

/* Accueil : Centered */
.container--centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

/* TITRE / SOUS-TITRE */
.title {
    font-family: 'ClashRegular', system-ui, sans-serif;
    font-size: 2.25rem;
    margin-bottom: 0.75em;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-align: center;
    line-height: 1.12;
}

.subtitle {
    font-size: 1.13rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
    margin-bottom: 2.1em;
}

/* GRID / CARDS ACCUEIL */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid--potions {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-top: 2.5em;
    width: 100%;
    max-width: 900px;
}

.card {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: transform var(--transition), box-shadow var(--transition), border var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(var(--blur));
    border: 1.5px solid rgba(160, 160, 170, 0.04);
    max-width: 440px;
}

.card--main {
    min-height: 154px;
    cursor: pointer;
    border: 1.5px solid transparent;
}

.card--main:hover,
.card--main:focus {
    transform: translateY(-4px) scale(1.035);
    box-shadow: 0 8px 36px 0 rgba(0, 0, 0, 0.09);
    border: 1.5px solid var(--primary);
}

.card__title {
    font-weight: 600;
    font-size: 1.14rem;
    margin-top: 1.2em;
    color: var(--primary);
}

.card__icon {
    width: 54px;
    height: 54px;
    margin-bottom: 10px;
    background: linear-gradient(150deg, #e9e9ea 40%, #d1d1d7 100%);
    border-radius: 16px;
    box-shadow: 0 6px 18px 0 rgba(120, 120, 135, 0.09);
    opacity: 0.85;
    filter: blur(0.2px) saturate(1.12);
}

.card__icon--simple {
    background: linear-gradient(120deg, #d4e3fb, #dde6ef 82%);
}

.card__icon--builder {
    background: linear-gradient(120deg, #fff1d6, #e8e1d1);
}

.card__icon--research {
    background: linear-gradient(120deg, #e2f6e8, #dbeee8);
}

.card__icon--pet {
    background: linear-gradient(120deg, #fae2e6, #eed5d6);
}

.card__icon--img {
    width: 54px;
    height: 54px;
    margin-bottom: 10px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 6px 18px 0 rgba(120, 120, 135, 0.09);
    background: none !important;
    filter: none;
    opacity: 1;
    display: block;
}

.card--content {
    min-width: 220px;
}

.card--result {
    margin-top: 2.4em;
}

/* FORMULAIRES */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    /* width: 100%; */
    margin: 2.2em auto 0;
}


.form__row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
    min-width: 80px;
    max-width: 120px;
    flex: 1 1 80px;
}


.form__label {
    font-size: 1.01rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    margin-bottom: 1px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 3.6rem;
}

.form__input {
    font-size: 1.08rem;
    border-radius: var(--border-radius-small);
    border: 1.5px solid rgba(190, 190, 210, 0.15);
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.70);
    color: var(--text-main);
    outline: none;
    font-weight: 500;
    box-shadow: 0 1.5px 8px 0 rgba(160, 160, 180, 0.07);
    transition: border var(--transition), box-shadow var(--transition), background var(--transition);
    width: 56px;
    text-align: center;
}

@media (prefers-color-scheme: dark) {
    .form__input {
        background: rgba(22, 23, 30, 0.70);
        color: var(--text-main);
    }
}

.form__input:focus {
    border: 1.5px solid var(--primary);
    background: rgba(246, 248, 254, 0.93);
}

@media (prefers-color-scheme: dark) {
    .form__input:focus {
        background: rgba(24, 32, 48, 0.88);
    }
}

/* BOUTONS */
.btn {
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius-small);
    padding: 12px 26px;
    background: linear-gradient(120deg, var(--primary) 70%, var(--primary-dark) 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2.5px 12px 0 rgba(0, 113, 227, 0.11);
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn--primary:hover,
.btn--animated:active {
    background: var(--primary-dark);
    transform: scale(1.04);
}

/* RESULT */
.result {
    margin: 2.2em auto 0;
    padding: 1.15em 1.1em;
    font-size: 1.13em;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    animation: fadein 0.7s;
    transition: opacity var(--transition);
    color: var(--text-main);
    backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(160, 160, 170, 0.04);
}

.result--hidden {
    display: none;
}

@keyframes fadein {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

/* TABS */
.tabs {
    display: flex;
    gap: 1.14rem;
    justify-content: center;
    margin: 1.6em 0 0.3em;
}

.tabs__btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.06rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.77em 1.42em;
    border-radius: var(--border-radius-small);
    transition: background var(--transition), color var(--transition);
    border: 1px solid transparent;
}

.tabs__btn--active,
.tabs__btn:hover {
    background: var(--primary);
    color: #fff;
}

.form--hidden {
    display: none;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 18px 3vw 48px;
    }

    .card {
        padding: 22px 8px 14px;
    }
}

/* Petits détails pour Apple vibes */
::-webkit-input-placeholder {
    color: #b7bac2;
    opacity: 1;
}

::-moz-placeholder {
    color: #b7bac2;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #b7bac2;
    opacity: 1;
}

::placeholder {
    color: #b7bac2;
    opacity: 1;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover,
a:focus {
    color: var(--primary-dark);
}

::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(120, 130, 150, 0.10);
    border-radius: 6px;
}

.split-layout {
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.split-layout__left,
.split-layout__right {
    width: 100%;
}

/* Desktop/large screen : active split */
@media (min-width: 900px) {
    .split-layout {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 2.8rem;
        min-height: 400px;
        /* optionnel */
    }

    .split-layout__left,
    .split-layout__right {
        width: 50%;
        max-width: 420px;
    }

    .split-layout__left {
        padding-right: 1.4rem;
    }

    .split-layout__right {
        padding-left: 1.4rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
}

/* ABOUT PAGE */
.about__card {
    max-width: 540px;
    margin: 2.5em auto 0;
    padding: 2.3rem 2.1rem;
    font-size: 1.12rem;
    text-align: left;
    background: var(--about-card-bg);
    box-shadow: var(--about-shadow);
    border-radius: 1.5rem;
}

.about__link {
    color: var(--about-accent);
    text-decoration: underline dotted;
    transition: color 0.18s;
}

.about__link:hover {
    color: #38a2ff;
}

.about__disclaimer {
    color: var(--about-muted);
    font-size: 0.97em;
    line-height: 1.5;
}

.about__divider {
    border: none;
    border-top: 1px solid var(--about-divider);
    margin: 1.6em 0;
}

.about__meta {
    font-size: 0.99em;
    color: var(--about-muted);
}

.about__support {
    margin-top: 2.3em;
    text-align: center;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.18), rgba(200, 200, 230, 0.12));
    padding: 1.3em 1.2em 1em 1.2em;
    border-radius: 1em;
    box-shadow: 0 2px 8px 0 rgba(90, 90, 120, 0.07);
}

.about__support-title {
    font-family: inherit;
    font-size: 1.17em;
    margin-bottom: 0.3em;
    letter-spacing: 0.01em;
    color: var(--about-accent, #1162f7);
}

.about__support-link {
    font-size: 1.09em;
    color: var(--about-accent, #1162f7);
    word-break: break-all;
    text-decoration: underline wavy;
    font-weight: 600;
}

.about__support-link:hover {
    color: #38a2ff;
}

.about__support-thanks {
    font-size: 1.01em;
    margin-top: 1.2em;
    color: var(--about-muted, #6b7280);
}

@media (prefers-color-scheme: dark) {
    .about__support {
        background: linear-gradient(120deg, rgba(38, 44, 66, 0.42), rgba(44, 52, 68, 0.24));
    }
}

.subtitle--center {
    text-align: center;
    font-size: 1.17rem;
    color: var(--muted, #575a);
    margin-bottom: 1.5em;
}

.result__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    padding: 2em 1em;
}

.result__icon {
    width: auto;
    height: 54px;
    max-width: 100px;
    margin-bottom: 0.6em;
    opacity: 0.65;
    display: block;
    object-fit: contain;
}

.result__text {
    font-size: 1.08em;
    color: var(--muted, #9094a0);
}

/* New result layout */
.result__list {
    display: flex;
    flex-direction: column;
    gap: 0.45em;
    margin-top: 0.5em;
}

.result__row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed var(--about-divider);
    padding: 0.3em 0;
    flex-wrap: wrap;
}

.result__row--stack {
    flex-direction: column;
    align-items: flex-start;
}

.result__row--stack .result__value {
    margin-top: 0.2em;
}

.result__row:last-child {
    border-bottom: none;
}

.result__label {
    color: var(--text-secondary);
}

.result__value {
    font-weight: 600;
}