/* eafps_directory — public styles */

.eafps-directory,
.eafps-directory__modal {
    --eafps-turquoise: #4BC1D0;
    --eafps-turquoise-dark: #08AEC0;
    --eafps-turquoise-darker: #079AAB;
    --eafps-marine: #272E47;
    --eafps-parme-clair: #E3E9F6;
    --eafps-parme-tres-clair: #F6F7FF;
    --eafps-contour-champs: #DCE4F5;
    --eafps-pin: #7E93D8;
    --eafps-muted: #667085;
}
.eafps-directory {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--eafps-marine);

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 50px;
    width: 100%;
    box-sizing: border-box;
}
.eafps-directory__searchbar,
.eafps-directory__results {
    align-self: stretch;
    width: 100%;
}
.eafps-directory__results { margin-top: 0; }

@media (max-width: 900px) {
    .eafps-directory { gap: 32px; }
}

/* ── Searchbar ─────────────────────────────── */
.eafps-directory__searchbar {
    display: flex;
    gap: 12px;
    background: var(--eafps-parme-tres-clair);
    border: 1px solid var(--eafps-parme-clair);
    padding: 16px;
    border-radius: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Champs de la searchbar */
.eafps-directory__field {
    background: #FFF;
    border: 1px solid var(--eafps-contour-champs);
    border-radius: 8px;
    padding: 0 16px;
    height: 48px;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--eafps-marine);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    transition: border-color .15s ease;
}
.eafps-directory__field:focus-within {
    border-color: var(--eafps-turquoise);
    outline: 0;
    box-shadow: none;
}

.eafps-directory__field--specialty { min-width: 240px; }
.eafps-directory__field--country   { min-width: 240px; }
.eafps-directory__field--text      { flex: 1 1 320px; padding-right: 44px; }

/* Salient ascend.css ships `.ascend .container-wrap .span_12.light input[type=text] {
   border: 1px solid #ccc; background-color: transparent; ... }` at specificity (0,3,1,1).
   To beat it safely we use 4 chained classes via `body .eafps-directory .eafps-directory__searchbar
   .eafps-directory__field` plus !important — wins on specificity and importance regardless
   of source order. `appearance: none` also strips the browser-native input chrome. */
body .eafps-directory .eafps-directory__searchbar .eafps-directory__field input[type="text"],
body .eafps-directory .eafps-directory__searchbar .eafps-directory__field input[type="text"]:focus,
body .eafps-directory .eafps-directory__searchbar .eafps-directory__field input[type="text"]:focus-visible,
body .eafps-directory .eafps-directory__searchbar .eafps-directory__field input[type="text"]:hover {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-color: transparent !important;
    outline: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    width: 100% !important;
    height: 100% !important;
    font: inherit !important;
    color: inherit !important;
    padding-left: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    border-radius: 0 !important;
}

.eafps-directory__field input::placeholder { color: var(--eafps-marine); opacity: .85; }

/* Icône loupe à droite du champ texte */
.eafps-directory__icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    pointer-events: none;
}

.eafps-directory__submit {
    background: var(--eafps-turquoise);
    color: #FFF;
    border: 0;
    border-radius: 999px;
    padding: 0 32px;
    height: 48px;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease;
}
.eafps-directory__submit:hover { background: var(--eafps-turquoise-dark); }

/* ── Combo dropdown (specialty + country) ──── */
/* Arrow locked with !important so no theme rule can wipe the background-image off. */
.eafps-directory .eafps-directory__combo {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='7' viewBox='0 0 14 7' fill='none'><path d='M12.9144 0.184L7.44885 5.56317C7.32959 5.68114 7.16862 5.74731 7.00087 5.74731C6.83312 5.74731 6.67214 5.68114 6.55289 5.56317L1.08615 0.185153C0.966155 0.0672388 0.804652 0.00116707 0.636419 0.00116707C0.468186 0.00116707 0.306682 0.0672388 0.18669 0.185153C0.127602 0.242757 0.0806439 0.311604 0.0485811 0.387639C0.0165183 0.463674 0 0.545358 0 0.627877C0 0.710396 0.0165183 0.792079 0.0485811 0.868115C0.0806439 0.94415 0.127602 1.013 0.18669 1.0706L5.6511 6.44861C6.01102 6.80201 6.49529 7 6.9997 7C7.50412 7 7.98838 6.80201 8.3483 6.44861L13.8127 1.0706C13.872 1.01298 13.9191 0.94406 13.9513 0.867917C13.9834 0.791773 14 0.709953 14 0.627294C14 0.544635 13.9834 0.462814 13.9513 0.386671C13.9191 0.310528 13.872 0.241608 13.8127 0.183987C13.6927 0.0660723 13.5312 0 13.363 0C13.1947 0 13.0332 0.0660723 12.9133 0.183987' fill='%2308AEC0'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 2px center !important;
    background-color: transparent !important;
}
.eafps-directory__combo {
    position: relative;
    width: 100%;
    height: 100%;
}
.eafps-directory__combo-input {
    cursor: pointer;
    padding-right: 22px !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}
.eafps-directory__combo-list {
    position: absolute;
    top: calc(100% + 8px);
    left: -16px;
    right: -16px;
    background: #FFF;
    border: 1px solid var(--eafps-contour-champs);
    border-radius: 8px;
    max-height: 280px;
    overflow: auto;
    z-index: 30;
    padding: 6px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.eafps-directory__combo-item {
    padding: 10px 16px;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--eafps-marine);
}
.eafps-directory__combo-item:hover,
.eafps-directory__combo-item[aria-selected="true"] {
    background: var(--eafps-parme-tres-clair);
}
.eafps-directory__combo-item.is-hidden { display: none; }

/* ── Results grid ──────────────────────────── */
.eafps-directory__no-results {
    padding: 32px;
    text-align: center;
    color: var(--eafps-muted);
}
.eafps-directory__grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 50px;
    align-self: stretch;
}
.eafps-directory__grid .eafps-card {
    flex: 0 1 calc((100% - 100px) / 3);
    min-width: 280px;
    box-sizing: border-box;
}

/* ── Load-more pagination ──────────────────── */
.eafps-directory__load-more {
    display: block;
    margin: 32px auto 0;
    padding: 12px 28px;
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--eafps-accent, #4bc1d0);
    border: 0;
    border-radius: 28px;
    cursor: pointer;
    transition: background .15s ease;
}
.eafps-directory__load-more:hover { background: var(--eafps-accent-dark, #38a6b4); }
.eafps-directory__load-more:focus-visible {
    outline: 2px solid var(--eafps-accent, #4bc1d0);
    outline-offset: 2px;
}

@media (max-width: 1024px) {
    .eafps-directory__grid .eafps-card {
        flex-basis: calc((100% - 50px) / 2);
    }
}
@media (max-width: 700px) {
    .eafps-directory__grid { gap: 24px; }
    .eafps-directory__grid .eafps-card { flex-basis: 100%; }
}

/* ── Card (Figma DEV-2 / node 362:3373) ──────
 * Horizontal layout : 125x125 round photo (or placeholder block) on the
 * left, name/country/specs/buttons stacked on the right with justify-between
 * so the buttons always sit at the bottom.                                  */
.eafps-card {
    background: #FFF;
    border: 1px solid var(--eafps-parme-clair);
    border-radius: 18px;
    padding: 25px;             /* Figma : 15px outer + 10px inner */
    display: flex;
    gap: 40px;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.08);
    align-items: stretch;
    box-sizing: border-box;
}

/* ── Photo : real image OR placeholder block ── */
.eafps-card__photo {
    flex: 0 0 125px;
    width: 125px;
    height: 125px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
}
.eafps-card__photo img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}
/* Placeholder variant : white circle with light border, default-surgeon.svg
 * centered inside (not cover-cropped — the SVG is the EAFPS logo). */
.eafps-card__photo--placeholder {
    border: 1px solid var(--eafps-parme-clair);
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: contain;
}

/* ── Right column : name + country + specs + buttons ── */
.eafps-card__body {
    flex: 1;
    min-width: 0;
    min-height: 125px;          /* matches photo height so layout looks balanced */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}
.eafps-card__heading {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.eafps-card .eafps-card__body .eafps-card__heading .eafps-card__name {
    margin: 0;
    color: var(--eafps-turquoise-dark);
    font-family: 'Butler', 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.2;
    word-break: break-word;
}
.eafps-card__name-last {
    text-transform: uppercase;
}
.eafps-card__country {
    margin: 0;
    color: var(--eafps-marine);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
}
.eafps-card__pin {
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ── Specs : dark gray text (Figma "Gris foncé" #4C4C4C), NOT turquoise.
 *  Bullet = small 4×4 dot in a muted gray. ── */
.eafps-card__specs {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    color: #4C4C4C;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
}
.eafps-card__specs li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}
.eafps-card__specs li::before {
    content: "";
    width: 4px;
    height: 4px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #949494;        /* gray bullet — matches Figma ellipse */
}

/* ── Action buttons : 10px gap, sit at bottom via parent's justify-between. */
.eafps-card__actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
}
.eafps-card__body .eafps-card__actions .eafps-card__btn {
    display: inline-flex;
    padding: 8px 20px;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: 50px;
    border: 1px solid var(--eafps-turquoise);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: normal;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.eafps-card__btn--ghost {
    background: #FFF;
    color: var(--eafps-turquoise) !important;
}
.eafps-card__btn--ghost:hover {
    background: var(--eafps-parme-tres-clair);
}
.eafps-card__btn--primary {
    background: var(--eafps-turquoise);
    color: #FFF;
    border-color: var(--eafps-turquoise);
}
.eafps-card__btn--primary:hover {
    background: var(--eafps-turquoise-dark);
    border-color: var(--eafps-turquoise-dark);
    transform: translateY(-1px);
}

/* ── Modal ─────────────────────────────────── */
.eafps-directory__modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 110px 24px 24px;
}
.eafps-directory__modal-backdrop { z-index: 1; }
.eafps-directory__modal-dialog { z-index: 2; }
.eafps-directory__modal[hidden] { display: none; }
.eafps-directory__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 25, 45, 0.5);
}
.eafps-directory__modal-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    width: 973px;
    max-width: 100%;
    padding: 20px;
    background: #FFF;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
    max-height: 90vh;
    overflow: auto;
}
.eafps-directory__modal-title,
.eafps-directory__modal-body {
    align-self: stretch;
    width: 100%;
}
.eafps-directory__modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    border: 0;
    font-size: 28px;
    color: var(--eafps-turquoise);
    cursor: pointer;
    line-height: 1;
}
.eafps-directory__modal-title {
    margin: 0 0 24px;
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    font-size: 28px;
    font-weight: 500;
    color: var(--eafps-marine);
}

/* ── Custom contact form (inside modal) ───────── */
.eafps-dir-contact { display: block; }
.eafps-dir-contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    width: 100%;
}
.eafps-dir-contact__field { min-width: 0; }
.eafps-dir-contact__field--full { grid-column: 1 / -1; }

@media (max-width: 600px) {
    .eafps-dir-contact__grid { grid-template-columns: 1fr; }
}

/* Labels */
.eafps-directory__modal-body label {
    display: block;
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    color: var(--eafps-marine);
    margin-bottom: 6px;
}
.eafps-directory__modal-body .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    margin-top: 6px;
}

/* Champs */
.eafps-directory__modal-body input[type="text"],
.eafps-directory__modal-body input[type="email"],
.eafps-directory__modal-body input[type="tel"],
.eafps-directory__modal-body textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--eafps-contour-champs);
    border-radius: 8px;
    padding: 12px 14px;
    background: #FFF;
    color: var(--eafps-marine);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.5;
    outline: 0;
    box-shadow: none;
    transition: border-color .15s ease;
}
.eafps-directory__modal-body input:focus,
.eafps-directory__modal-body textarea:focus {
    border-color: var(--eafps-turquoise);
    outline: 0;
    box-shadow: none;
}
.eafps-directory__modal-body textarea {
    min-height: 80px;
    height: 90px;
    max-height: 160px;
    resize: vertical;
}

/* Turnstile widget spacing (when configured) */
.eafps-dir-contact .cf-turnstile { margin-top: 16px; }

/* Actions + bouton submit */
.eafps-dir-contact__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}
.eafps-dir-contact__submit {
    background: var(--eafps-turquoise);
    color: #FFF;
    border: 0;
    border-radius: 999px;
    padding: 12px 36px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s ease;
}
.eafps-dir-contact__submit:hover { background: var(--eafps-turquoise-dark); }
.eafps-dir-contact__submit[disabled] { opacity: .6; cursor: default; }

/* Erreur de validation / d'envoi */
.eafps-dir-contact__error {
    margin-top: 14px;
    padding: 12px 16px;
    border: 1px solid #d92d20;
    border-radius: 8px;
    background: #fdecea;
    color: #b42318;
    font-size: 14px;
}

/* Bandeau de succès (vert) après envoi — cf. maquette */
.eafps-dir-contact__success {
    padding: 14px 18px;
    border: 1px solid #2e7d32;
    border-radius: 8px;
    background: #edf7ed;
    color: #1b4720;
    font-size: 14px;
}

/* Tablet (≤1023px) : specialty + country share row 1 at 50/50, text input fills
   row 2, SEARCH button centered alone on row 3. */
@media (max-width: 1023px) {
    .eafps-directory__field--specialty,
    .eafps-directory__field--country {
        flex: 1 1 calc(50% - 6px);   /* 50% chacun, gap 12px compensé */
        min-width: 0;                 /* annule le min-width 240px desktop */
    }
    .eafps-directory__field--text {
        flex: 1 1 100%;
        min-width: 0;
    }
    .eafps-directory__submit {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile (≤599px) : stack all fields full-width, keep SEARCH button centered (not stretched). */
@media (max-width: 599px) {
    .eafps-directory__searchbar {
        flex-direction: column;
        align-items: stretch;
    }
    .eafps-directory__field,
    .eafps-directory__field--specialty,
    .eafps-directory__field--country,
    .eafps-directory__field--text {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }
    .eafps-directory__submit {
        align-self: center;
        width: auto;
        margin: 0;
    }
    .eafps-card { flex-direction: column; align-items: center; gap: 20px; padding: 20px; }
    .eafps-card__body { width: 100%; min-height: 0; align-items: flex-start; }
    .eafps-card__actions { justify-content: center; align-self: center; }
}
