/* Montorgueil – Simulateur de Leasing v2 */

#mgl-leasing-root {
    font-family: 'DM Sans', Arial, sans-serif;
    font-weight: 400;
    max-width: 640px;
    margin: 0 auto;
    color: #1a1a1a;
}

.mgl-section {
    padding: 24px;
    margin-bottom: 16px;
    background: #fff;
}

.mgl-section-label {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #999;
    margin: 0 0 20px;
}

.mgl-field {
    margin-bottom: 16px;
}

.mgl-field:last-child {
    margin-bottom: 0;
}

.mgl-label {
    display: block;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.mgl-input {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 0;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #1a1a1a;
    background: #EBEBEC;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    transition: background 0.15s;
}

.mgl-input:focus {
    background: #DDDDE0;
}

.mgl-input-unit {
    display: flex;
    background: #EBEBEC;
}

.mgl-input-unit input {
    border: none;
    border-radius: 0;
    outline: none;
    padding: 12px 14px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    flex: 1;
    color: #1a1a1a;
    background: transparent;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
}

.mgl-unit {
    padding: 12px 14px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 12px;
    color: #fff;
    background: #1a1a1a;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.mgl-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .mgl-row-2 { grid-template-columns: 1fr; }
}

/* ---- Select durée ---- */
.mgl-select-wrap {
    position: relative;
}

.mgl-select {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: none;
    border-radius: 0;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #1a1a1a;
    background: #EBEBEC;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a1a1a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.mgl-select:focus {
    background-color: #DDDDE0;
}

/* ---- Autocomplete ---- */
.mgl-search-wrap {
    position: relative;
}

.mgl-suggestions {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: none;
    border-radius: 0;
    z-index: 100;
    overflow: hidden;
    display: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.mgl-suggestion {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 13px;
    border-bottom: 1px solid #f0ede6;
}

.mgl-suggestion:last-child { border-bottom: none; }

.mgl-suggestion:hover,
.mgl-suggestion.mgl-active {
    background: #EBEBEC;
}

.mgl-suggestion-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    flex-shrink: 0;
}

.mgl-suggestion-thumb-placeholder {
    width: 36px;
    height: 36px;
    background: #DDDDE0;
    flex-shrink: 0;
}

.mgl-suggestion-title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1a1a1a;
}

.mgl-suggestion-price {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ---- Tag sélection ---- */
.mgl-selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #EBEBEC;
    padding: 8px 12px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 13px;
    color: #1a1a1a;
    margin-top: 8px;
    max-width: 100%;
    box-sizing: border-box;
}

.mgl-selected-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    flex-shrink: 0;
}

.mgl-selected-thumb-placeholder {
    width: 40px;
    height: 40px;
    background: #DDDDE0;
    flex-shrink: 0;
}

.mgl-selected-info {
    flex: 1;
    min-width: 0;
}

.mgl-selected-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
}

.mgl-selected-price {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.mgl-tag-remove {
    cursor: pointer;
    color: #999;
    font-size: 18px;
    line-height: 1;
    border: none;
    background: none;
    padding: 0;
    flex-shrink: 0;
}

.mgl-tag-remove:hover { color: #1a1a1a; }

/* ---- Récapitulatif ---- */
.mgl-recap {
    margin-bottom: 16px;
}

.mgl-mensualite {
    background: #1a1a1a;
    padding: 28px 24px;
    text-align: center;
}

.mgl-mensualite-amount {
    font-family: 'Lovelo', 'DM Sans', Arial, sans-serif;
    font-size: 40px;
    color: #fff;
    line-height: 1;
    letter-spacing: 0.01em;
}

.mgl-mensualite-label {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #888;
    margin-top: 8px;
}

.mgl-recap-table {
    background: #fff;
    padding: 0 24px;
}

.mgl-recap-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid #f0ede6;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
}

.mgl-recap-row:last-child { border-bottom: none; }
.mgl-recap-key { color: #666; }
.mgl-recap-val { color: #1a1a1a; }

/* ---- Section email ---- */
.mgl-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 0;
    background: #F3D479;
    color: #1a1a1a;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.15s;
}

.mgl-btn:hover { background: #e8c660; }
.mgl-btn:disabled { opacity: 0.5; cursor: default; }

.mgl-notice {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    min-height: 18px;
}

.mgl-notice.mgl-error { color: #c0392b; }
.mgl-notice.mgl-success { color: #27ae60; }

.mgl-no-results {
    padding: 10px 14px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 13px;
    color: #999;
    font-style: italic;
}

.mgl-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}