/* ===== LISTE DES MEMBRES (ANNURAIRE) ===== */

.zfmd-archive-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.zfmd-archive-title {
    font-size: 2rem;
    margin-bottom: 30px;
}


/* Compteur */

#zfmd-member-count {
    font-family: "Lato", sans-serif;
    font-size: 16px;
    color: #E75709;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 1rem 0;
}

/* Grille des membres */

.zfmd-members-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (max-width: 1024px) {
    .zfmd-member-link {
        width: calc(50% - 20px);
    }
}

@media (max-width: 640px) {
    .zfmd-member-link {
        width: 100%;
        margin: 15px 0;
    }
}

.zfmd-member-link {
    width: calc(33.333% - 20px);
    margin: 20px 10px;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
}

.zfmd-member-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    gap: 20px;
    padding: 10px;
    border-radius: 0;
    border: none;
    background: transparent;
    min-height: 160px;
    transition: transform 0.2s ease;
}

.zfmd-member-link:hover .zfmd-member-item {
    transform: scale(1.02);
}

/* Logo */

.zfmd-member-logo {
    width: 35%;
    text-align: center;
    padding-right: 10px;
}

.zfmd-member-logo img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.zfmd-member-link:hover .zfmd-member-logo img {
    transform: scale(1.05);
}

/* Infos */

.zfmd-member-info {
    width: 65%;
    text-align: left;
}

.zfmd-member-title {
    font-family: 'Lato', sans-serif;
    font-size: 18px;
    margin: 0 0 5px;
    color: #111;
}

.zfmd-member-location,
.zfmd-member-activity-line {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.2px;
    color: #444;
}

.zfmd-member-location {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.zfmd-member-location-sep {
    margin: 0 6px;
}

.zfmd-member-activity-line {
    margin-top: 5px;
}

/* ===== FICHE MEMBRE (SINGLE) ===== */

.zfmd-single-wrapper {
    width: 100%;
    margin: 0 auto 40px;
    padding: 0;
}

.zfmd-single-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.zfmd-single-left {
    flex: 1 1 320px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.zfmd-single-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 0 20px;
    box-shadow: none;
}

.zfmd-single-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.zfmd-single-right {
    flex: 1 1 400px;
}

.zfmd-hero-image {
    width: 100%;
    max-height: 420px;
    overflow: hidden;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: none;
}

.zfmd-hero-image img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    max-height: 420px;
}

.zfmd-single-title {
    font-size: 2rem;
    margin: 0 0 10px;
}

.zfmd-hero-activity {
    font-size: 1rem;
    font-weight: 600;
    color: #877DB4;
    margin-bottom: 20px;
}

.zfmd-single-description {
    margin-bottom: 25px;
}

.zfmd-field-line {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.zfmd-field-line strong {
    font-weight: 600;
}

.zfmd-social-links a {
    display: inline-block;
    margin-right: 10px;
    font-size: 0.9rem;
}

.zfmd-single-map iframe {
    width: 100%;
    min-height: 280px;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    .zfmd-single-left,
    .zfmd-single-right {
        max-width: 100%;
    }
}



/* ===========================
   FORMULAIRE AJOUT DE MEMBRE
   =========================== */

.zfmd-add-member-wrapper {
    width: 100%;
    max-width: none;
    margin: 0 0 4rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    font-family: inherit;
}

/* Messages succès / erreur */
.zfmd-message {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.zfmd-message-success {
    background: #e6f7ed;
    border: 1px solid #3fa86a;
    color: #215537;
}

.zfmd-message-error {
    background: #fff0f0;
    border: 1px solid #e05555;
    color: #8b2222;
}

/* Fieldsets / Sections */
.zfmd-add-member-form {
    margin: 0;
}

.zfmd-section {
    margin-bottom: 2rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.zfmd-section legend {
    padding: 0 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #433d8b;
    margin-bottom: 1rem;
}

/* Champs */
.zfmd-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.75rem;
}

.zfmd-field {
    margin-bottom: 0;
    width: 100%;
}

.zfmd-field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
    color: #333333;
}

.zfmd-required {
    color: #d6452c;
    margin-left: 0.2rem;
}

/* Inputs & textarea */
.zfmd-field input[type="text"],
.zfmd-field input[type="email"],
.zfmd-field input[type="url"],
.zfmd-field input[type="tel"],
.zfmd-field select,
.zfmd-field textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid #c8c3ea;
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    background: transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.zfmd-field textarea {
    min-height: 120px;
    resize: vertical;
}

.zfmd-field input:focus,
.zfmd-field textarea:focus {
    outline: none;
    border-color: #7c6ee6;
    box-shadow: 0 0 0 2px rgba(124,110,230,0.18);
    background: #ffffff;
}

/* Bouton submit */
.zfmd-submit {
    text-align: right;
    margin-top: 2rem;
}

.zfmd-submit button[type="submit"] {
    display: inline-block;
    border-radius: 999px;
    border: none;
    background: #e85c11;
    color: #ffffff;
    padding: 0.7rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 18px rgba(232,92,17,0.35);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.zfmd-submit button[type="submit"]:hover {
    background: #e85100;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(232,81,0,0.4);
}

.zfmd-submit button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 5px 12px rgba(232,81,0,0.25);
}


.zfmd-directory-header {
    display: flex;
    justify-content: center; /* centrage horizontal */
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}
/* Layout responsive : 2 colonnes sur grands écrans */
@media (min-width: 768px) {
    .zfmd-section-structure .zfmd-field,
    .zfmd-section-adresse .zfmd-field,
    .zfmd-section-contact .zfmd-field,
    .zfmd-section-activites .zfmd-field {
        display: inline-block;
        
        margin-right: 0.75rem;
        vertical-align: top;
    }

    .zfmd-section-structure .zfmd-field:nth-child(odd),
    .zfmd-section-adresse .zfmd-field:nth-child(odd),
    .zfmd-section-contact .zfmd-field:nth-child(odd),
    .zfmd-section-activites .zfmd-field:nth-child(odd) {
        margin-right: 1.5rem;
    }

    .zfmd-section-structure .zfmd-field:nth-child(even),
    .zfmd-section-adresse .zfmd-field:nth-child(even),
    .zfmd-section-contact .zfmd-field:nth-child(even),
    .zfmd-section-activites .zfmd-field:nth-child(even) {
        margin-right: 0;
    }

    /* Description et social en pleine largeur */
    .zfmd-section-description .zfmd-field,
    .zfmd-section-social .zfmd-field {
        width: 100%;
        margin-right: 0;
    }
}

/* Mobile : bien espacés */
@media (max-width: 767px) {
    .zfmd-add-member-wrapper {
        padding: 1.5rem 1.25rem;
        border-radius: 14px;
    }

    .zfmd-section {
        padding: 1.25rem 1.25rem;
    }
}

.zfmd-member-form-wrapper {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.zfmd-field {
    margin-bottom: 1.5rem;
}

.zfmd-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.zfmd-field input[type="text"],
.zfmd-field input[type="email"],
.zfmd-field input[type="url"],
.zfmd-field input[type="tel"],
.zfmd-field select,
.zfmd-field textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
    box-sizing: border-box;
}

.zfmd-field textarea {
    min-height: 120px;
}

.zfmd-required {
    color: #e53935;
    margin-left: 0.25rem;
    font-weight: 700;
}

.zfmd-field.zfmd-has-error input[type="text"],
.zfmd-field.zfmd-has-error input[type="email"],
.zfmd-field.zfmd-has-error input[type="url"],
.zfmd-field.zfmd-has-error input[type="tel"],
.zfmd-field.zfmd-has-error select,
.zfmd-field.zfmd-has-error textarea {
    border-color: #e53935;
    background-color: #fff6f6;
}

.zfmd-error-message {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #e53935;
}

/* == WRAPPER ANNURAIRE == */
.zfmd-directory-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

/* == FILTRES == */

.zfmd-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Chaque filtre occupe au moins 200px, et s’adapte */
.zfmd-filter {
    flex: 1 1 200px;
    position: relative;
}

/* Label visuellement caché mais présent pour l’accessibilité */
.zfmd-filter label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Input / select « pilule mauve » */
.zfmd-filter input,
.zfmd-filter select {
    width: 100%;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #847ab3;
    font-size: 0.95rem;
    background: #f3f2f7;
    color: #433d8b;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Placeholder dans le champ (style 1ère capture) */
.zfmd-filter input::placeholder {
    color: #8379b3;
    opacity: 1;
}

/* Focus */
.zfmd-filter input:focus,
.zfmd-filter select:focus {
    border-color: #5f4db5;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(95, 77, 181, 0.18);
}

/* Responsive : filtres en colonne sur mobile */
@media (max-width: 768px) {
    .zfmd-filters {
        flex-direction: column;
    }
}


/* == FILTRES ANNURAIRE == */

.zfmd-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Chaque filtre occupe au moins 200px */
.zfmd-filter {
    flex: 1 1 200px;
    position: relative;
}

/* On cache le label visuellement mais il reste là pour l’accessibilité */
.zfmd-filter label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Style commun input + select = pilule mauve */
.zfmd-filter input,
.zfmd-filter select {
    width: 100%;
    padding: 0.5rem 0.9rem;
    border-radius: 999px !important;
    border: 1px solid #847ab3 !important;
    font-size: 0.95rem;
    background: #f3f2f7;
    color: #433d8b;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Placeholder (champ “Rechercher…”) */
.zfmd-filter input::placeholder {
    color: #8379b3;
    opacity: 1;
}

/* Focus */
.zfmd-filter input:focus,
.zfmd-filter select:focus {
    border-color: #5f4db5 !important;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(95, 77, 181, 0.18);
}

/* Flèche custom sur les <select> */
.zfmd-filter select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.2rem; /* pour laisser la place à la flèche */

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23847ab3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 10px 6px;
}

/* Responsive : en colonne sur mobile */
@media (max-width: 768px) {
    .zfmd-filters {
        flex-direction: column;
    }
}
