:root {
    --primary: #0f3d2e;
    --primary-dark: #09291f;
    --accent: #d4a017;

    --light: #f5f7f6;
    --white: #ffffff;

    --text: #1f2933;
    --muted: #6b7280;
    --border: #e5e7eb;
}


/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: var(--light);
    color: var(--text);

    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}


/* =========================
   HEADER
========================= */

.site-header {
    background: var(--white);

    border-bottom: 1px solid var(--border);

    position: sticky;
    top: 0;

    z-index: 1000;
}

.header-container {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.logo {
    display: flex;
    flex-direction: column;

    line-height: 1;
}

.logo-main {
    font-size: 22px;
    font-weight: 800;

    color: var(--primary);

    letter-spacing: 1px;
}

.logo-sub {
    margin-top: 5px;

    font-size: 10px;
    font-weight: 700;

    color: var(--accent);

    letter-spacing: 2px;
}

.main-nav {
    display: none;
}

.nav-link {
    font-weight: 600;
    color: var(--text);

    transition: color .2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.btn-login {
    display: none;

    background: var(--primary);
    color: var(--white);

    padding: 10px 18px;

    border-radius: 8px;

    font-weight: 700;

    transition:
        background .2s ease,
        transform .2s ease;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.menu-toggle {
    border: 0;
    background: transparent;

    font-size: 28px;

    cursor: pointer;

    color: var(--primary);
}


/* =========================
   HERO
========================= */

.hero {
    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    color: var(--white);

    padding: 70px 0 80px;
}

.hero-content {
    max-width: 760px;
}

.hero-badge {
    display: inline-block;

    padding: 7px 12px;

    background: rgba(255, 255, 255, .12);

    border: 1px solid rgba(255, 255, 255, .20);

    border-radius: 30px;

    font-size: 13px;
    font-weight: 600;

    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(34px, 8vw, 62px);

    line-height: 1.05;

    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 17px;

    color: rgba(255, 255, 255, .85);

    max-width: 650px;
}


/* =========================
   SEARCH
========================= */

.search-box {
    margin-top: 35px;

    background: var(--white);

    color: var(--text);

    padding: 18px;

    border-radius: 14px;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, .15);
}

.search-grid {
    display: grid;

    gap: 12px;
}

.search-field {
    display: flex;
    flex-direction: column;

    gap: 5px;
}

.search-field label {
    font-size: 12px;

    font-weight: 700;

    color: var(--muted);
}

.search-field select,
.search-field input {
    width: 100%;

    padding: 13px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: var(--white);

    color: var(--text);

    font-size: 15px;

    outline: none;
}

.search-field select:focus,
.search-field input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(15, 61, 46, .08);
}

.btn-search {
    width: 100%;

    border: 0;

    background: var(--accent);

    color: #17120a;

    padding: 13px;

    border-radius: 8px;

    font-weight: 800;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.btn-search:hover {
    transform: translateY(-1px);

    filter: brightness(.96);
}


/* =========================
   SECTIONS
========================= */

.section {
    padding: 65px 0;
}

.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    color: var(--primary);

    font-size: 30px;
}

.section-header p {
    color: var(--muted);

    margin-top: 5px;
}


/* =========================
   CATEGORIES
========================= */

.categories-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 14px;
}

.category-card {
    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 22px;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.category-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, .08);
}

.category-icon {
    font-size: 30px;

    margin-bottom: 10px;
}

.category-card h3 {
    color: var(--primary);

    font-size: 17px;
}

.category-card p {
    color: var(--muted);

    font-size: 13px;
}


/* =========================
   CATALOGUE IMMOBILIER
========================= */

.catalog-hero {
    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    color: var(--white);

    padding: 55px 0;
}

.catalog-hero-content {
    max-width: 750px;
}

.catalog-hero h1 {
    margin-top: 15px;

    font-size: clamp(32px, 6vw, 48px);

    line-height: 1.1;
}

.catalog-hero p {
    margin-top: 15px;

    color: rgba(255, 255, 255, .82);

    max-width: 650px;
}

.catalog-section {
    background: var(--light);
}

.catalog-toolbar {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 30px;
}

.catalog-toolbar h2 {
    color: var(--primary);

    font-size: 28px;
}

.catalog-toolbar p {
    color: var(--muted);

    margin-top: 3px;
}


/* =========================
   GRILLE DES BIENS
========================= */

.properties-grid {
    display: grid;

    grid-template-columns: 1fr;

    gap: 22px;
}

.property-card {
    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 15px;

    overflow: hidden;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.property-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, .08);
}


/* =========================
   IMAGE DU BIEN
========================= */

.property-image {
    height: 220px;

    position: relative;

    background:
        linear-gradient(
            135deg,
            #e7eee9,
            #d5e2db
        );

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.property-placeholder {
    font-size: 65px;
}

.property-featured {
    position: absolute;

    top: 14px;
    left: 14px;

    background: var(--accent);

    color: #17120a;

    padding: 6px 10px;

    border-radius: 20px;

    font-size: 12px;

    font-weight: 800;
}


/* =========================
   CONTENU DU BIEN
========================= */

.property-content {
    padding: 20px;
}

.property-reference {
    color: var(--muted);

    font-size: 11px;

    font-weight: 700;

    text-transform: uppercase;
}

.property-title {
    color: var(--primary);

    font-size: 20px;

    line-height: 1.3;

    margin-top: 6px;
}

.property-location {
    margin-top: 8px;

    color: var(--muted);

    font-size: 13px;
}

.property-description {
    color: #59636e;

    font-size: 14px;

    margin-top: 12px;
}


/* =========================
   CARACTÉRISTIQUES
========================= */

.property-features {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 15px;
}

.property-features span {
    background: var(--light);

    border-radius: 7px;

    padding: 6px 9px;

    font-size: 12px;

    font-weight: 600;
}


/* =========================
   PRIX + BOUTON
========================= */

.property-footer {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-top: 20px;

    padding-top: 15px;

    border-top: 1px solid var(--border);
}

.property-price {
    color: var(--primary);

    font-weight: 800;

    font-size: 17px;
}

.property-price small {
    display: block;

    color: var(--accent);

    font-size: 10px;

    margin-top: 2px;
}

.property-button {
    background: var(--primary);

    color: var(--white);

    padding: 10px 14px;

    border-radius: 8px;

    font-size: 13px;

    font-weight: 700;

    white-space: nowrap;

    transition:
        background .2s ease,
        transform .2s ease;
}

.property-button:hover {
    background: var(--primary-dark);

    transform: translateY(-1px);
}


/* =========================
   AUCUN BIEN
========================= */

.empty-state {
    text-align: center;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 15px;

    padding: 70px 20px;
}

.empty-icon {
    font-size: 55px;

    margin-bottom: 15px;
}

.empty-state h3 {
    color: var(--primary);
}

.empty-state p {
    color: var(--muted);

    margin-top: 5px;
}


/* =========================
   FOOTER
========================= */

.site-footer {
    background: var(--primary);

    color: var(--white);
}

.footer-grid {
    display: grid;

    gap: 35px;

    padding: 50px 0;
}

.footer-logo {
    font-size: 22px;

    font-weight: 800;
}

.site-footer h3 {
    margin-bottom: 12px;
}

.site-footer a {
    display: block;

    color: rgba(255, 255, 255, .75);

    margin-bottom: 7px;

    transition: color .2s ease;
}

.site-footer a:hover {
    color: var(--white);
}

.site-footer p {
    color: rgba(255, 255, 255, .75);
}

.footer-bottom {
    border-top:
        1px solid rgba(255, 255, 255, .12);

    padding: 18px 0;

    font-size: 13px;
}


/* =========================
   TABLET
========================= */

@media (min-width: 768px) {

    .menu-toggle {
        display: none;
    }

    .main-nav {
        display: flex;

        align-items: center;

        gap: 25px;
    }

    .btn-login {
        display: inline-block;
    }

    .search-grid {
        grid-template-columns:
            1fr
            1fr
            1fr
            auto;

        align-items: end;
    }

    .btn-search {
        width: auto;

        padding-left: 25px;
        padding-right: 25px;
    }

    .categories-grid {
        grid-template-columns:
            repeat(4, 1fr);
    }

    .footer-grid {
        grid-template-columns:
            2fr
            1fr
            1fr;
    }

    .properties-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }
}


/* =========================
   DESKTOP
========================= */

@media (min-width: 1050px) {

    .properties-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }
}


/* =========================
   PETITS ÉCRANS
========================= */

@media (max-width: 480px) {

    .container {
        width: min(
            100% - 24px,
            1120px
        );
    }

    .hero {
        padding:
            50px 0
            60px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .catalog-hero {
        padding: 45px 0;
    }

    .property-image {
        height: 200px;
    }

    .property-footer {
        align-items: flex-start;

        flex-direction: column;
    }

    .property-button {
        width: 100%;

        text-align: center;
    }

    .catalog-toolbar {
        display: block;
    }
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
}

.logout {
    background: #e2a916;
    color: #173c33;
    padding: 9px 14px;
    border-radius: 7px;
    font-weight: 700;
}

.logout:hover {
    opacity: .9;
}
