/* ============================================================
   POPUP ESTIMATION EN LIGNE — 4 étapes
   ============================================================ */

   :root {
    --ep-gold:       #D5A655;
    --ep-gold-dark:  #b98c3a;
    --ep-navy:       #09233a;
    --ep-beige:      #F4F0EB;
    --ep-beige-mid:  #EDE7DF;
    --ep-beige-dark: #e0d8cf;
    --ep-text:       #333;
    --ep-muted:      #788896;
    --ep-border:     #ddd4c9;
    --ep-white:      #ffffff;
    --ep-error:      #c0392b;
    --ep-radius:     14px;
    --ep-shadow:     0 24px 70px rgba(9,35,58,0.22);
    --ep-t:          0.28s ease;
}

/* ── Overlay ── */
.ep-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(9,35,58,0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: epFadeIn 0.22s ease;
}
.ep-overlay.ep-open { display: flex; }

@keyframes epFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal ── */
.ep-modal {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 940px;
    height: min(580px, 88vh);
    background: var(--ep-beige);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
    overflow: hidden;
    animation: epSlideUp 0.3s cubic-bezier(0.34,1.4,0.64,1);
}
@keyframes epSlideUp {
    from { transform: translateY(28px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Fermeture ── */
.ep-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(9,35,58,0.08);
    color: var(--ep-navy);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ep-t), color var(--ep-t);
}
.ep-close:hover {
    background: var(--ep-navy);
    color: #fff;
}

/* ── SIDEBAR GAUCHE : photo background ── */
.ep-sidebar {
    width: 46%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* ── CONTENU DROIT ── */
.ep-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #FDFAF7;
    overflow: hidden;
}

/* bg_deco.png : trait en haut, cercle centré dans le panel droit */
.ep-deco-img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 115%;
    width: auto;
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

/* Dots étapes */
.ep-steps-dots {
    display: flex;
    gap: 7px;
    justify-content: center;
    padding: 46px 0 0;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}
.ep-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ep-border);
    transition: background var(--ep-t), transform var(--ep-t);
}
.ep-dot.ep-dot-active {
    background: var(--ep-gold);
    transform: scale(1.3);
}
.ep-dot.ep-dot-done {
    background: var(--ep-gold-dark);
}

/* ── Form ── */
#ep-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

/* ── Panes ── */
.ep-pane {
    display: none;
    flex-direction: column;
    flex: 1;
    padding: 18px 44px 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--ep-border) transparent;
}
.ep-pane.ep-pane-active { display: flex; }

.ep-step-label-top {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ep-gold);
    margin: 0 0 6px;
}
.ep-pane-header { margin-bottom: 22px; }
.ep-pane-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--ep-navy);
    line-height: 1.2;
    margin: 0;
}
.ep-pane-title em {
    color: var(--ep-gold);
    font-style: italic;
}

/* ── Champs ── */
.ep-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 14px;
    padding-bottom: 6px;
}
.ep-field        { display: flex; flex-direction: column; gap: 5px; }
.ep-field-full   { width: 100%; }
.ep-field-half   { width: calc(50% - 7px); }

.ep-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ep-navy);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.ep-required { color: var(--ep-gold); }

.ep-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--ep-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--ep-text);
    background: var(--ep-white);
    transition: border-color var(--ep-t), box-shadow var(--ep-t);
    outline: none;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}
.ep-input:focus {
    border-color: var(--ep-gold);
    box-shadow: 0 0 0 3px rgba(213,166,85,0.14);
}
.ep-input.ep-input-error {
    border-color: var(--ep-error);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
.ep-input-icon-wrap { position: relative; }
.ep-input-icon-wrap .ep-input { padding-left: 40px; }
.ep-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--ep-gold);
    pointer-events: none;
}

/* ── Type bien ── */
.ep-type-selector { display: flex; gap: 10px; }
.ep-type-option { flex: 1; cursor: pointer; }
.ep-type-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.ep-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    border: 1.5px solid var(--ep-border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ep-muted);
    background: var(--ep-white);
    transition: border-color var(--ep-t), color var(--ep-t);
    text-align: center;
}
.ep-type-card svg { width: 26px; height: 26px; color: var(--ep-border); transition: color var(--ep-t); }
.ep-type-option input:checked + .ep-type-card {
    border-color: var(--ep-gold);
    color: var(--ep-navy);
}
.ep-type-option input:checked + .ep-type-card svg { color: var(--ep-gold); }

/* ── Compteurs ── */
.ep-counter-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--ep-border);
    border-radius: 8px;
    overflow: hidden;
}
.ep-counter-btn {
    width: 38px;
    height: 44px;
    border: none;
    background: var(--ep-beige);
    color: var(--ep-navy);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--ep-t);
}
.ep-counter-btn:hover { background: var(--ep-gold); color: #fff; }
.ep-counter-input {
    flex: 1;
    text-align: center;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 6px;
    height: 44px;
    font-weight: 700;
    font-size: 15px;
}

/* ── État ── */
.ep-etat-selector { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-etat-option { cursor: pointer; }
.ep-etat-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.ep-etat-card {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1.5px solid var(--ep-border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-text);
    background: var(--ep-white);
    transition: border-color var(--ep-t), background var(--ep-t);
    white-space: nowrap;
}
.ep-etat-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ep-etat-excellent { background: #27ae60; }
.ep-etat-bon       { background: #2980b9; }
.ep-etat-moyen     { background: #e67e22; }
.ep-etat-arenover  { background: #c0392b; }
.ep-etat-option input:checked + .ep-etat-card {
    border-color: var(--ep-gold);
    background: rgba(213,166,85,0.09);
    font-weight: 600;
    color: var(--ep-navy);
}

/* ── Checkboxes ── */
.ep-checkboxes { display: flex; flex-wrap: wrap; gap: 7px; }
.ep-checkbox-option { cursor: pointer; }
.ep-checkbox-option input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.ep-checkbox-option span {
    display: flex;
    padding: 7px 12px;
    border: 1.5px solid var(--ep-border);
    border-radius: 18px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ep-text);
    background: var(--ep-white);
    transition: border-color var(--ep-t), background var(--ep-t);
    white-space: nowrap;
}
.ep-checkbox-option input:checked + span {
    border-color: var(--ep-gold);
    background: rgba(213,166,85,0.09);
    color: var(--ep-navy);
    font-weight: 600;
}

/* ── Projet ── */
.ep-projet-selector { display: flex; flex-wrap: wrap; gap: 7px; }
.ep-projet-option { cursor: pointer; }
.ep-projet-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.ep-projet-option span {
    display: flex;
    padding: 8px 16px;
    border: 1.5px solid var(--ep-border);
    border-radius: 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-text);
    background: var(--ep-white);
    transition: border-color var(--ep-t), background var(--ep-t);
    white-space: nowrap;
}
.ep-projet-option input:checked + span {
    border-color: var(--ep-gold);
    background: rgba(213,166,85,0.09);
    color: var(--ep-navy);
    font-weight: 600;
}

/* ── Consent ── */
.ep-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
    color: var(--ep-muted);
    line-height: 1.5;
}
.ep-consent-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: var(--ep-gold);
    cursor: pointer;
}
.ep-consent-label a { color: var(--ep-gold); text-decoration: underline; }

/* ── Navigation ── */
.ep-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 44px 22px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.ep-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* ── Boutons ── */
.ep-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background var(--ep-t), box-shadow var(--ep-t), color var(--ep-t);
    font-family: inherit;
}
.ep-btn-primary {
    background: var(--ep-gold);
    color: #fff;
    box-shadow: 0 4px 14px rgba(213,166,85,0.35);
}
.ep-btn-primary:hover {
    background: var(--ep-gold-dark);
    box-shadow: 0 6px 20px rgba(213,166,85,0.5);
    color: #fff;
    text-decoration: none;
}
.ep-btn-circle {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    flex-shrink: 0;
}
.ep-btn-back {
    background: transparent;
    color: var(--ep-muted);
    padding: 12px 14px;
}
.ep-btn-back:hover { color: var(--ep-navy); background: var(--ep-beige-dark); border-radius: 8px; }
.ep-btn-back svg { width: 15px; height: 15px; flex-shrink: 0; }
.ep-btn-outline {
    background: transparent;
    color: var(--ep-navy);
    border: 1.5px solid var(--ep-border);
    padding: 10px 18px;
}
.ep-btn-outline:hover { border-color: var(--ep-navy); background: var(--ep-beige-dark); }

/* ── Message d'erreur ── */
.ep-error-msg {
    display: none;
    background: rgba(192,57,43,0.07);
    border-left: 3px solid var(--ep-error);
    color: var(--ep-error);
    padding: 9px 14px;
    margin: 0 44px 10px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}
.ep-error-msg.ep-visible { display: block; }

/* ── Étape 4 : MERCI ── */
.ep-merci-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--ep-muted);
    font-size: 14px;
    padding: 30px;
    position: relative;
    z-index: 2;
}
.ep-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid var(--ep-beige-dark);
    border-top-color: var(--ep-gold);
    border-radius: 50%;
    animation: epSpin 0.8s linear infinite;
}
@keyframes epSpin { to { transform: rotate(360deg); } }

.ep-merci-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 44px;
    position: relative;
    z-index: 2;
}
.ep-merci-icon {
    margin-bottom: 18px;
}
.ep-merci-icon svg {
    width: 58px;
    height: 58px;
}
.ep-merci-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--ep-navy);
    margin: 0 0 14px;
}
.ep-merci-text {
    font-size: 15px;
    color: var(--ep-text);
    line-height: 1.65;
    margin: 0 0 8px;
}
.ep-merci-email {
    font-size: 12px;
    color: var(--ep-muted);
    margin: 0 0 28px;
}
.ep-merci-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Bouton déclencheur ── */
.ep-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: var(--ep-gold);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none !important;
    transition: background var(--ep-t), box-shadow var(--ep-t);
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(213,166,85,0.35);
}
.ep-trigger-btn:hover {
    background: var(--ep-gold-dark);
    box-shadow: 0 6px 22px rgba(213,166,85,0.5);
    color: #fff !important;
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .ep-sidebar { display: none; }
    .ep-modal   { height: auto; min-height: 90vh; }
    .ep-pane    { padding: 16px 22px 0; }
    .ep-nav     { padding: 14px 22px 18px; }
    .ep-merci-content { padding: 24px 22px; }
    .ep-error-msg { margin: 0 22px 8px; }
    .ep-field-half { width: 100%; }
    .ep-pane-title { font-size: 22px; }
    .ep-deco-img { max-width: 340px; }
}
@media (max-width: 480px) {
    .ep-overlay  { padding: 0; }
    .ep-modal    { border-radius: 0; min-height: 100dvh; }
    .ep-merci-cta { flex-direction: column; }
    .ep-merci-cta .ep-btn { width: 100%; justify-content: center; }
}

/* ── Fix Google Places Autocomplete dropdown ── */
.pac-container {
    background-color: #ffffff !important;
    border: 1px solid #ddd4c9 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(9,35,58,0.12) !important;
    margin-top: 4px !important;
    font-family: inherit !important;
    z-index: 100000001 !important;
}
.pac-item {
    padding: 8px 14px !important;
    cursor: pointer !important;
    border-top: 1px solid #f0ebe5 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #333333 !important;
}
.pac-item:first-child { border-top: none !important; }
.pac-item:hover,
.pac-item.pac-item-selected {
    background-color: #F4F0EB !important;
}
.pac-item-query {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #09233a !important;
    padding-right: 4px !important;
}
.pac-matched {
    color: #D5A655 !important;
    font-weight: 700 !important;
}
.pac-icon,
.pac-icon-marker {
    display: none !important;
}
.pac-container:after {
    display: none !important;
}
