﻿/* ============================================================
   VARIABLES
============================================================ */
:root {
    --teal: #009F9D;
    --orange: #FF9D00;
    --bg: #ffffff;
    --muted: #F5F7FB;
    --text: #2E2E2E;
    --border: #E6EBF5;
    --radius: 18px;
    --radius-xl: 26px;
    --shadow: 0 20px 60px rgba(0,0,0,0.08);
}

/* ============================================================
   RESET
============================================================ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", sans-serif;
    color: var(--text);
    background: var(--bg);
}

/* ============================================================
   HERO
============================================================ */
header.hero {
    padding: 88px 20px 110px;
    text-align: center;
    color: #fff;
    background: radial-gradient(1200px 600px at 10% -10%, rgba(255,255,255,.15), transparent), linear-gradient(135deg, var(--teal) 0%, var(--orange) 100%);
}

.hero h1 {
    font-size: clamp(28px, 5vw, 52px);
    margin: 0 0 12px;
}

.hero p {
    font-size: 18px;
    opacity: .95;
    margin: 0;
}

/* ============================================================
   TOGGLE
============================================================ */
.toggle {
    display: inline-flex;
    gap: 12px;
    padding: 8px;
    background: rgba(255,255,255,.15);
    border-radius: 999px;
    margin-top: 26px;
}

    .toggle button {
        border: 2px solid #fff;
        background: transparent;
        color: #fff;
        padding: 10px 20px;
        border-radius: 999px;
        font-weight: 800;
        cursor: pointer;
        transition: .25s;
    }

        .toggle button.active,
        .toggle button:hover {
            background: #fff;
            color: var(--teal);
        }

/* ============================================================
   WRAPPER
============================================================ */
.wrap {
    max-width: 1200px;
    margin: -70px auto 60px;
    padding: 0 20px;
}

    .wrap > section {
        margin-bottom: 42px;
    }

/* ============================================================
   PANELS & CARDS
============================================================ */
.panel,
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    margin-bottom: 32px;
}

.panel {
    padding: 26px;
}

    .panel h3 {
        margin: 0 0 12px;
        color: var(--teal);
    }

.card header {
    padding: 22px 26px;
    border-bottom: 1px solid var(--border);
}

.card .title {
    font-weight: 1000;
    font-family: 'Cabin';
    color: #ff7d00;
}

.card .desc {
    margin-top: 6px;
    font-size: 14px;
    color: #069398;
    font-family: 'Cabin';
}

/* ============================================================
   STEPS
============================================================ */
.steps {
    display: grid;
    gap: 16px;
}

.step {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: var(--muted);
    border-radius: 14px;
}

    .step::before {
        content: counter(s);
        counter-increment: s;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 2px solid var(--teal);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 900;
        color: var(--teal);
        background: #fff;
    }

.step-body strong {
    display: block;
    margin-bottom: 4px;
}

/* ============================================================
   FORMS
============================================================ */
.form-section {
    margin-top: 26px;
}

form {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    row-gap: 22px;
    column-gap: 22px;
    padding: 26px;
    color: #e5a020 !important;
}

    /* Each field */
    form > div {
        margin-bottom: 6px;
    }

label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #069398 !important;
    font-family: 'Cabin';
}

.form-section {
    border: 2px solid #e5a020;
    border-radius: 20px;
}


input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 14px;
    transition: .2s;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 18%, transparent);
    outline: none;
}

.row-2 {
    grid-column: span 2;
}

.section#form-agence {
    border: 2px solid #e5a020;
}

/* ============================================================
   ACTION ROW
============================================================ */
.row-accept {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 14px;
    margin-top: 18px;
    border-top: 1px dashed var(--border);
}

.checkbox-line {
    display: flex;
    gap: 10px;
    align-items: center;
}

    .checkbox-line input {
        width: 18px;
        height: 18px;
    }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
}

    .btn.outline {
        background: #fff;
        color: var(--orange);
        border: 2px solid var(--orange);
    }

/* ============================================================
   ADDRESS AUTOCOMPLETE
============================================================ */
.address-suggestions {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    max-height: 220px;
    overflow-y: auto;
    position: absolute;
    z-index: 999;
    width: 100%;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

    .address-suggestions li {
        padding: 10px 12px;
        cursor: pointer;
        border-bottom: 1px solid #eee;
    }

        .address-suggestions li:last-child {
            border-bottom: none;
        }

        .address-suggestions li:hover {
            background: #f5f5f5;
        }

/* ============================================================
   FEATURES
============================================================ */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feat {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
}

.ico {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* ============================================================
   FAQ
============================================================ */
.faq {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 16px;
}

details {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
}

summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--teal);
}

.address-field {
    position: relative; /* 🔥 KEY FIX */
}

.address-suggestions {
    left: 0;
    right: 0;
    width: auto;
    max-width: 100%;
}



/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {

    /* =====================================
       GLOBAL MOBILE SAFETY
    ===================================== */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    .wrap {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    /* =====================================
       HOW SECTION (fix expanded look)
    ===================================== */
    .how {
        padding: 0;
    }

        .how .panel {
            margin: 0 16px 20px; /* 👈 visually centered */
            padding: 20px;
        }

    .steps {
        gap: 14px;
    }

    .step {
        padding: 12px;
        gap: 12px;
    }

        .step::before {
            width: 36px;
            height: 36px;
            font-size: 14px;
            flex: 0 0 36px;
        }

    /* =====================================
       FEATURES → 1 PER LINE
    ===================================== */
    .features {
        display: flex; /* 👈 force stack */
        flex-direction: column;
        gap: 16px;
        margin: 0 16px;
    }

    .feat {
        width: 100%;
        display: flex;
        gap: 14px;
        align-items: flex-start;
    }

    .ico {
        flex: 0 0 46px;
    }

    /* =====================================
       FORMS (already good, keep safe)
    ===================================== */
    form {
        display: flex !important;
        flex-direction: column !important;
        gap: 18px !important;
        padding: 20px 16px;
        width: 100%;
        color: #e5a020 !important;
    }

        form > div {
            width: 100%;
        }

    input,
    select,
    textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .row-accept {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .btn {
        width: 100%;
    }
}

/* ===============================
   LIVE VALIDATION STATES
================================ */
input.is-valid {
    border-color: #2ecc71 !important;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

input.is-invalid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.field-error {
    margin-top: 6px;
    font-size: 12px;
    color: #e74c3c;
}

.field-success {
    margin-top: 6px;
    font-size: 12px;
    color: #2ecc71;
}

/* ===============================
   INPUT VALIDATION ICONS
================================ */
.field {
    position: relative;
}

    .field input {
        padding-right: 44px; /* space for the tick */
    }

    /* Green tick */
    .field .valid-icon {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 18px;
        color: #2ecc71;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    /* Show tick when valid */
    .field.is-valid .valid-icon {
        opacity: 1;
    }

.msd {
    position: relative;
    width: 100%;
}

.msd-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid #d7d7d7;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.msd-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    border: 1px solid #d7d7d7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    padding: 8px;
    display: none;
    z-index: 50;
    max-height: 240px;
    overflow: auto;
}

.msd.open .msd-panel {
    display: block;
}

.msd-item {
    display: flex;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
}

    .msd-item:hover {
        background: #f6f6f6;
    }

    .msd-item input {
        transform: translateY(1px);
        width: 20px;
    }

