/*
Theme Name: child
Description: dt-the7
Template: dt-the7
*/

/* ═══════════════════════════════════════════════════════════
   VARIABLES
═══════════════════════════════════════════════════════════ */
:root {
    /* ── Palette principale ── */
    --c-green       : #10c49f;
    --c-green-dark  : #0daa89;
    --c-green-light : #e8faf6;
    --c-green-mid   : #b2edd9;

    --c-orange      : #fc4821;
    --c-orange-light: #fff1ee;
    --c-orange-mid  : #ffc4b5;

    /* ── Neutrals ── */
    --c-text        : #1a202c;
    --c-text-light  : #475569;
    --c-text-muted  : #94a3b8;
    --c-border      : #e2e8f0;
    --c-border-light: #f1f5f9;
    --c-bg          : #f8fafc;
    --c-white       : #ffffff;

    /* ── Radius ── */
    --radius-sm     : 8px;
    --radius-md     : 12px;
    --radius-lg     : 16px;
    --radius-pill   : 999px;

    /* ── Shadows ── */
    --shadow-sm     : 0 1px 4px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
    --shadow-md     : 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
    --shadow-green  : 0 4px 16px rgba(16,196,159,.25);
    --shadow-orange : 0 4px 12px rgba(252,72,33,.2);

    /* ── Transitions ── */
    --transition    : .18s ease;
}

/* ═══════════════════════════════════════════════════════════
   MESSAGES GLOBAUX
═══════════════════════════════════════════════════════════ */
.ceer-message,
.mc-message {
    padding       : 12px 16px;
    margin-bottom : 14px;
    border-radius : var(--radius-sm);
    font-size     : .9rem;
    line-height   : 1.5;
    display       : flex;
    align-items   : flex-start;
    gap           : 8px;
}

.ceer-error,
.mc-error {
    background : var(--c-orange-light);
    border     : 1px solid var(--c-orange-mid);
    color      : #a52a00;
}
.ceer-success {
    background : var(--c-green-light);
    border     : 1px solid var(--c-green-mid);
    color      : #077a61;
}
.ceer-info {
    background : var(--c-green-light);
    border     : 1px solid var(--c-green-mid);
    color      : #0a7a63;
}
.ceer-warning {
    background : #fff8e1;
    border     : 1px solid #ffe082;
    color      : #7a5c00;
}

/* ═══════════════════════════════════════════════════════════
   FORMULAIRES — BASE COMMUNE
═══════════════════════════════════════════════════════════ */
.ceer-fiche-form label,
.creer-structure-form label {
    font-weight : 600;
    color       : var(--c-text);
}

.required { color: var(--c-orange); }

.ceer-field-error,
.cr-field-error {
    display    : block;
    color      : var(--c-orange);
    font-size  : .78rem;
    margin-top : 4px;
    min-height : 1em;
    font-weight: 500;
}

.ceer-input-error {
    border-color : var(--c-orange-mid) !important;
    background   : var(--c-orange-light) !important;
    outline-color: var(--c-orange) !important;
}

/* ── Inputs, selects, textareas ── */
.ceer-fiche-form input[type="text"],
.ceer-fiche-form input[type="email"],
.ceer-fiche-form input[type="tel"],
.ceer-fiche-form input[type="url"],
.ceer-fiche-form select,
.ceer-fiche-form textarea,
.creer-structure-form input[type="text"],
.creer-structure-form input[type="email"],
.creer-structure-form input[type="tel"],
.creer-structure-form input[type="url"],
.creer-structure-form select,
.creer-structure-form textarea {
    border        : 1.5px solid var(--c-border);
    border-radius : var(--radius-sm);
    padding       : 9px 12px;
    font-size     : .92rem;
    color         : var(--c-text);
    background    : var(--c-white);
    transition    : border-color var(--transition), box-shadow var(--transition);
    width         : 100%;
    appearance    : none;
}

.ceer-fiche-form input:focus,
.ceer-fiche-form select:focus,
.ceer-fiche-form textarea:focus,
.creer-structure-form input:focus,
.creer-structure-form select:focus,
.creer-structure-form textarea:focus {
    outline      : none;
    border-color : var(--c-green);
    box-shadow   : 0 0 0 3px rgba(16,196,159,.15);
}

/* ── Boutons submit ── */
.ceer-fiche-form button[type="submit"],
.creer-structure-form button[type="submit"] {
    background    : var(--c-green);
    color         : #fff;
    border        : none;
    border-radius : var(--radius-sm);
    padding       : 10px 24px;
    font-size     : .92rem;
    font-weight   : 700;
    cursor        : pointer;
    transition    : background var(--transition), box-shadow var(--transition), transform .1s;
    letter-spacing: .02em;
}
.ceer-fiche-form button[type="submit"]:hover,
.creer-structure-form button[type="submit"]:hover {
    background : var(--c-green-dark);
    box-shadow : var(--shadow-green);
}
.ceer-fiche-form button[type="submit"]:active,
.creer-structure-form button[type="submit"]:active {
    transform: scale(.98);
}

/* ── Boutons secondaires ── */
.creer-structure-form button[type="button"],
#ajouter-commune {
    background    : var(--c-white);
    color         : var(--c-green);
    border        : 1.5px solid var(--c-green-mid);
    border-radius : var(--radius-sm);
    padding       : 7px 16px;
    font-size     : .87rem;
    font-weight   : 600;
    cursor        : pointer;
    transition    : background var(--transition), border-color var(--transition);
}
.creer-structure-form button[type="button"]:hover,
#ajouter-commune:hover {
    background   : var(--c-green-light);
    border-color : var(--c-green);
}

/* ── Sections des formulaires structure ── */
.creer-structure-form h3 {
    margin-top    : 28px;
    margin-bottom : 12px;
    padding-bottom: 8px;
    border-bottom : 2px solid var(--c-green-light);
    font-size     : .82rem;
    font-weight   : 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color         : var(--c-green);
}

.commune-intervention-row { margin-bottom: 6px; }

.suppr-commune {
    background    : var(--c-orange-light) !important;
    color         : var(--c-orange) !important;
    border        : 1.5px solid var(--c-orange-mid) !important;
    border-radius : var(--radius-sm) !important;
    padding       : 6px 10px !important;
    font-size     : .8rem !important;
    cursor        : pointer;
    transition    : background var(--transition);
    font-weight   : 600 !important;
}
.suppr-commune:hover {
    background : var(--c-orange-mid) !important;
}

/* ═══════════════════════════════════════════════════════════
   AUTOCOMPLETE COMMUNE
═══════════════════════════════════════════════════════════ */
#commune_fiche_suggestions,
.ceer-commune-suggestions {
    display       : none;
    position      : absolute;
    top           : 100%;
    left          : 0;
    right         : 0;
    background    : var(--c-white);
    border        : 1.5px solid var(--c-green-mid);
    border-top    : none;
    border-radius : 0 0 var(--radius-sm) var(--radius-sm);
    list-style    : none;
    margin        : 0;
    padding       : 0;
    z-index       : 999;
    max-height    : 220px;
    overflow-y    : auto;
    box-shadow    : var(--shadow-md);
}

#commune_fiche_suggestions li,
.ceer-commune-suggestions li {
    padding       : 9px 13px;
    cursor        : pointer;
    font-size     : .88rem;
    color         : var(--c-text);
    border-bottom : 1px solid var(--c-green-light);
    transition    : background var(--transition);
}
#commune_fiche_suggestions li:last-child,
.ceer-commune-suggestions li:last-child { border-bottom: none; }

#commune_fiche_suggestions li:hover,
#commune_fiche_suggestions li.active,
.ceer-commune-suggestions li:hover,
.ceer-commune-suggestions li.ceer-active {
    background : var(--c-green-light);
    color      : #077a61;
}

.ceer-commune-suggestions li.ceer-loading {
    color      : var(--c-text-muted);
    font-style : italic;
}
.ceer-commune-suggestions li.ceer-no-result {
    color      : var(--c-orange);
    font-style : italic;
}

/* ═══════════════════════════════════════════════════════════
   MON COMPTE
═══════════════════════════════════════════════════════════ */
.mc-wrap *,
.mc-wrap *::before,
.mc-wrap *::after { box-sizing: border-box; }

.mc-wrap {
    max-width   : 960px;
    margin      : 0 auto;
    padding     : 0 16px 60px;
    font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color       : var(--c-text);
    line-height : 1.6;
}

/* ── Header ── */
.mc-header {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    gap             : 16px;
    background      : var(--c-white);
    border          : 1.5px solid var(--c-border);
    border-left     : 4px solid var(--c-green);
    border-radius   : var(--radius-md);
    padding         : 20px 28px;
    margin-bottom   : 24px;
    box-shadow      : var(--shadow-sm);
}
.mc-header__info    { display: flex; flex-direction: column; gap: 2px; }
.mc-header__name    { font-size: 1.2rem; font-weight: 700; color: var(--c-text); line-height: 1.2; }
.mc-header__email   { font-size: .84rem; color: var(--c-text-muted); }

.mc-header__logout {
    display         : inline-flex;
    align-items     : center;
    gap             : 6px;
    background      : var(--c-white);
    border          : 1.5px solid var(--c-border);
    color           : var(--c-text-light);
    padding         : 7px 16px;
    border-radius   : var(--radius-sm);
    font-size       : .83rem;
    font-weight     : 600;
    text-decoration : none;
    transition      : border-color var(--transition), color var(--transition);
    white-space     : nowrap;
}
.mc-header__logout:hover {
    border-color    : var(--c-orange);
    color           : var(--c-orange);
    text-decoration : none;
}

/* ── Layout ── */
.mc-layout {
    display               : grid;
    grid-template-columns : 1fr 1fr;
    gap                   : 20px;
    align-items           : start;
}
.mc-col-full { grid-column: 1 / -1; }

/* ── Cards ── */
.mc-card {
    background    : var(--c-white);
    border        : 1.5px solid var(--c-border);
    border-radius : var(--radius-md);
    overflow      : hidden;
    box-shadow    : var(--shadow-sm);
}
.mc-card__head {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    gap             : 10px;
    padding         : 14px 20px;
    background      : var(--c-bg);
    border-bottom   : 1.5px solid var(--c-border);
}
.mc-card__title {
    font-size      : .76rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .09em;
    color          : var(--c-green);
    display        : flex;
    align-items    : center;
    gap            : 7px;
    margin         : 0;
}
.mc-card__action {
    font-size      : .8rem;
    font-weight    : 600;
    color          : var(--c-green);
    text-decoration: none;
    padding        : 4px 12px;
    border         : 1.5px solid var(--c-green-mid);
    border-radius  : var(--radius-sm);
    background     : var(--c-white);
    transition     : background var(--transition);
    white-space    : nowrap;
}
.mc-card__action:hover {
    background     : var(--c-green-light);
    text-decoration: none;
}
.mc-card__body { padding: 20px; }

/* ── Structure dans mon compte ── */
.mc-structure       { display: flex; gap: 16px; align-items: flex-start; }
.mc-structure__logo {
    width          : 64px;
    height         : 64px;
    border-radius  : var(--radius-sm);
    border         : 1.5px solid var(--c-border);
    background     : var(--c-green-light);
    display        : flex;
    align-items    : center;
    justify-content: center;
    font-size      : 1.8rem;
    flex-shrink    : 0;
    overflow       : hidden;
}
.mc-structure__logo img { width: 100%; height: 100%; object-fit: contain; }
.mc-structure__info     { flex: 1; min-width: 0; }

.mc-structure__name {
    font-size      : 1rem;
    font-weight    : 700;
    color          : var(--c-text);
    margin         : 0 0 5px;
    display        : block;
    text-decoration: none;
    transition     : color var(--transition);
}
.mc-structure__name:hover {
    color          : var(--c-green);
    text-decoration: underline;
}
.mc-structure__badge {
    display        : inline-block;
    background     : var(--c-green-light);
    color          : #077a61;
    font-size      : .68rem;
    font-weight    : 700;
    padding        : 2px 9px;
    border-radius  : var(--radius-pill);
    letter-spacing : .04em;
    text-transform : uppercase;
    margin-bottom  : 8px;
}
.mc-structure__meta {
    display        : flex;
    flex-direction : column;
    gap            : 3px;
    font-size      : .82rem;
    color          : var(--c-text-light);
}
.mc-structure__actions {
    display        : flex;
    gap            : 10px;
    flex-wrap      : wrap;
    margin-top     : 18px;
    padding-top    : 16px;
    border-top     : 1.5px solid var(--c-border-light);
}

/* ── Boutons mc ── */
.mc-btn {
    display        : inline-flex;
    align-items    : center;
    gap            : 6px;
    padding        : 8px 18px;
    border-radius  : var(--radius-sm);
    font-size      : .84rem;
    font-weight    : 600;
    text-decoration: none;
    transition     : opacity var(--transition), box-shadow var(--transition);
    border         : none;
    cursor         : pointer;
    white-space    : nowrap;
}
.mc-btn:hover        { opacity: .85; text-decoration: none; box-shadow: var(--shadow-sm); }
.mc-btn--primary     { background: var(--c-green); color: #fff; }
.mc-btn--secondary   { background: var(--c-green-light); color: #077a61; border: 1.5px solid var(--c-green-mid); }
.mc-btn--edit        { background: var(--c-orange-light); color: var(--c-orange); border: 1.5px solid var(--c-orange-mid); }

/* ── Empty states ── */
.mc-empty        { text-align: center; padding: 32px 20px; }
.mc-empty__icon  { font-size: 2.4rem; margin-bottom: 12px; }
.mc-empty__text  { font-size: .9rem; margin-bottom: 18px; color: var(--c-text-muted); }

/* ── Profil ── */
.mc-profile-rows { display: flex; flex-direction: column; gap: 12px; }
.mc-profile-row  { display: flex; align-items: flex-start; gap: 12px; }
.mc-profile-row__label {
    font-size      : .72rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .05em;
    color          : var(--c-text-muted);
    min-width      : 110px;
    padding-top    : 2px;
}
.mc-profile-row__value {
    font-size  : .9rem;
    color      : var(--c-text);
    word-break : break-word;
}

/* ── Badge compteur ── */
.mc-count-badge {
    background    : var(--c-green);
    color         : #fff;
    font-size     : .66rem;
    font-weight   : 800;
    padding       : 1px 8px;
    border-radius : 10px;
    line-height   : 1.7;
}

/* ── Fiches liste ── */
.mc-fiches-list { display: flex; flex-direction: column; gap: 10px; }

.mc-fiche-item {
    display        : flex;
    align-items    : center;
    gap            : 12px;
    padding        : 12px 14px;
    background     : var(--c-bg);
    border         : 1.5px solid var(--c-border);
    border-radius  : var(--radius-sm);
    transition     : border-color var(--transition), box-shadow var(--transition);
}
.mc-fiche-item:hover {
    border-color : var(--c-green-mid);
    box-shadow   : 0 2px 10px rgba(16,196,159,.1);
}
.mc-fiche-item--pending {
    border-left  : 3px solid var(--c-green);
    background   : var(--c-green-light);
}

.mc-fiche-item__icon {
    width          : 38px;
    height         : 38px;
    border-radius  : var(--radius-sm);
    background     : var(--c-green-light);
    display        : flex;
    align-items    : center;
    justify-content: center;
    font-size      : 1.1rem;
    flex-shrink    : 0;
    color          : var(--c-green);
}
.mc-fiche-item__info  { flex: 1; min-width: 0; }
.mc-fiche-item__name {
    font-weight    : 700;
    font-size      : .9rem;
    color          : var(--c-text);
    text-decoration: none;
    white-space    : nowrap;
    overflow       : hidden;
    text-overflow  : ellipsis;
    display        : block;
    transition     : color var(--transition);
}
.mc-fiche-item__name:hover { color: var(--c-green); text-decoration: underline; }

.mc-fiche-item__meta {
    font-size     : .76rem;
    color         : var(--c-text-muted);
    margin-top    : 2px;
    white-space   : nowrap;
    overflow      : hidden;
    text-overflow : ellipsis;
}
.mc-fiche-item__desc {
    font-size     : .76rem;
    color         : var(--c-text-muted);
    margin-top    : 2px;
    font-style    : italic;
    white-space   : nowrap;
    overflow      : hidden;
    text-overflow : ellipsis;
}
.mc-fiche-item__actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Boutons fiches ── */
.mc-fiche-btn {
    display        : inline-flex;
    align-items    : center;
    gap            : 4px;
    padding        : 5px 11px;
    border-radius  : var(--radius-sm);
    font-size      : .76rem;
    font-weight    : 600;
    text-decoration: none;
    white-space    : nowrap;
    transition     : opacity var(--transition), background var(--transition);
    border         : 1.5px solid transparent;
}
.mc-fiche-btn:hover        { opacity: .85; text-decoration: none; }
.mc-fiche-btn--view        { background: var(--c-green-light); color: #077a61; border-color: var(--c-green-mid); }
.mc-fiche-btn--edit        { background: var(--c-orange-light); color: var(--c-orange); border-color: var(--c-orange-mid); }
.mc-fiche-btn--delete      { background: var(--c-white); color: var(--c-text-muted); border-color: var(--c-border); }
.mc-fiche-btn--delete:hover {
    background   : var(--c-orange-light);
    color        : var(--c-orange);
    border-color : var(--c-orange-mid);
    opacity      : 1;
}

/* ── Pending badge ── */
.mc-fiche-badge-pending {
    display        : inline-block;
    background     : var(--c-white);
    color          : #077a61;
    border         : 1.5px solid var(--c-green-mid);
    font-size      : .66rem;
    font-weight    : 700;
    padding        : 1px 8px;
    border-radius  : var(--radius-pill);
    letter-spacing : .04em;
    text-transform : uppercase;
    margin-top     : 3px;
    vertical-align : middle;
}

/* ── No fiches ── */
.mc-no-fiches {
    text-align : center;
    padding    : 28px 20px;
    color      : var(--c-text-muted);
    font-size  : .9rem;
}

/* ═══════════════════════════════════════════════════════════
   CARTE FICHES
═══════════════════════════════════════════════════════════ */
.cf-carte-wrap {
    font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Base filtres ── */
.cf-filtres {
    display     : flex;
    flex-wrap   : wrap;
    gap         : 8px;
    padding     : 12px 16px;
}

/* ── Catégories parentes ── */
#cf-filtres-parents {
    background    : var(--c-white);
    border        : 2px solid var(--c-border);
    border-radius : var(--radius-md);
    padding       : 14px 16px;
    box-shadow    : var(--shadow-sm);
}
#cf-filtres-parents::before {
    content       : "CATÉGORIES";
    display       : block;
    width         : 100%;
    font-size     : .65rem;
    font-weight   : 700;
    letter-spacing: 1.4px;
    color         : var(--c-text-muted);
    margin-bottom : 8px;
}
#cf-filtres-parents .cf-filtre-btn {
    display      : inline-flex;
    align-items  : center;
    gap          : 6px;
    padding      : 8px 16px;
    border       : 2px solid transparent;
    border-radius: var(--radius-pill);
    background   : var(--c-bg);
    color        : var(--c-text-light);
    font-size    : .85rem;
    font-weight  : 600;
    cursor       : pointer;
    transition   : all var(--transition);
    white-space  : nowrap;
}
#cf-filtres-parents .cf-filtre-btn:hover {
    background   : var(--c-border-light);
    color        : var(--c-text);
    transform    : translateY(-1px);
    box-shadow   : var(--shadow-sm);
}
#cf-filtres-parents .cf-filtre-btn.active {
    background   : var(--cat-color, var(--c-green));
    border-color : var(--cat-color, var(--c-green));
    color        : #fff;
    box-shadow   : 0 4px 12px rgba(0,0,0,.15);
}
#cf-filtres-parents .cf-filtre-btn[data-cat="all"].active {
    background   : var(--c-text);
    border-color : var(--c-text);
}

/* ── Sous-catégories ── */
#cf-filtres-enfants {
    position      : relative;
    background    : var(--c-green-light);
    border        : 2px dashed var(--c-green-mid);
    border-radius : var(--radius-md);
    padding       : 12px 16px;
    margin-top    : 4px;
}
#cf-filtres-enfants::before {
    content       : "AFFINER PAR SOUS-CATÉGORIE";
    display       : block;
    width         : 100%;
    font-size     : .65rem;
    font-weight   : 700;
    letter-spacing: 1.4px;
    color         : var(--c-green-dark);
    margin-bottom : 8px;
    opacity       : .7;
}
#cf-filtres-enfants::after {
    content      : "";
    position     : absolute;
    top          : -10px;
    left         : 28px;
    width        : 0;
    height       : 0;
    border-left  : 9px solid transparent;
    border-right : 9px solid transparent;
    border-bottom: 10px solid var(--c-green-mid);
}

.cf-filtre-sous-btn {
    display      : inline-flex;
    align-items  : center;
    gap          : 5px;
    padding      : 5px 12px;
    border       : 1.5px solid var(--c-green-mid);
    border-radius: var(--radius-sm);
    background   : var(--c-white);
    color        : var(--c-green-dark);
    font-size    : .8rem;
    font-weight  : 500;
    cursor       : pointer;
    transition   : all var(--transition);
    white-space  : nowrap;
}
.cf-filtre-sous-btn:hover {
    background   : var(--c-white);
    border-color : var(--cat-color, var(--c-green));
    color        : var(--c-green-dark);
    transform    : translateY(-1px);
    box-shadow   : var(--shadow-sm);
}
.cf-filtre-sous-btn.active {
    background   : var(--cat-color, var(--c-green));
    border-color : var(--cat-color, var(--c-green));
    color        : #fff;
    font-weight  : 600;
    box-shadow   : var(--shadow-green);
}

/* ── Dot & count ── */
.cf-filtre-dot {
    display      : inline-block;
    width        : 8px;
    height       : 8px;
    border-radius: 50%;
    flex-shrink  : 0;
}
.cf-filtre-count {
    display        : inline-flex;
    align-items    : center;
    justify-content: center;
    min-width      : 20px;
    height         : 20px;
    padding        : 0 5px;
    border-radius  : var(--radius-pill);
    background     : rgba(0,0,0,.1);
    color          : inherit;
    font-size      : .7rem;
    font-weight    : 700;
    line-height    : 1;
}
.cf-filtre-btn.active .cf-filtre-count,
.cf-filtre-sous-btn.active .cf-filtre-count {
    background : rgba(255,255,255,.25);
}

/* ── Résultats info ── */
.cf-resultats-info {
    padding    : 8px 4px;
    font-size  : .82rem;
    color      : var(--c-text-muted);
    font-style : italic;
}
#cf-compteur { font-weight: 700; color: var(--c-text); font-style: normal; }

/* ── Carte Leaflet ── */
#cf-map {
    height        : 560px;
    border-radius : var(--radius-md);
    border        : 2px solid var(--c-border);
    overflow      : hidden;
    margin-top    : 8px;
}

/* ── Popup ── */
.cf-popup {
    font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-width   : 200px;
    max-width   : 260px;
}
.cf-popup__cat {
    font-size      : .68rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .05em;
    padding        : 2px 8px;
    border-radius  : var(--radius-pill);
    color          : #fff;
    display        : inline-block;
    margin-bottom  : 6px;
}
.cf-popup__nom {
    font-size   : .95rem;
    font-weight : 700;
    color       : var(--c-text);
    margin      : 0 0 4px;
    line-height : 1.3;
}
.cf-popup__structure { font-size: .78rem; color: var(--c-text-muted); margin-bottom: 4px; }
.cf-popup__commune   { font-size: .78rem; color: var(--c-text-light); margin-bottom: 6px; }
.cf-popup__desc      { font-size: .8rem; color: var(--c-text-light); margin-bottom: 10px; line-height: 1.4; }
.cf-popup__link {
    display        : inline-block;
    background     : var(--c-green);
    color          : #fff;
    font-size      : .78rem;
    font-weight    : 600;
    padding        : 5px 14px;
    border-radius  : var(--radius-sm);
    text-decoration: none;
    transition     : background var(--transition);
}
.cf-popup__link:hover { background: var(--c-green-dark); color: #fff; text-decoration: none; }

/* ── Clusters ── */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large { background: none !important; }
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div { background: none !important; }
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
    transition: transform .3s ease-out, opacity .3s ease-in;
}

/* ═══════════════════════════════════════════════════════════
   SINGLE FICHE
═══════════════════════════════════════════════════════════ */
.fiche-wrap *,
.fiche-wrap *::before,
.fiche-wrap *::after { box-sizing: border-box; }

.fiche-wrap {
    max-width   : 900px;
    margin      : 40px auto;
    padding     : 0 20px 60px;
    font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color       : var(--c-text);
    line-height : 1.6;
}

/* ── Hero fiche ── */
.fiche-hero {
    display       : flex;
    align-items   : flex-start;
    gap           : 24px;
    background    : var(--c-bg);
    border-radius : var(--radius-lg);
    padding       : 28px;
    margin-bottom : 20px;
    border        : 1.5px solid var(--c-border);
    box-shadow    : var(--shadow-sm);
}
.fiche-hero__icon {
    flex-shrink    : 0;
    width          : 80px;
    height         : 80px;
    border-radius  : var(--radius-md);
    display        : flex;
    align-items    : center;
    justify-content: center;
    font-size      : 2rem;
    color          : #fff;
}
.fiche-hero__info  { flex: 1; min-width: 0; }
.fiche-hero__name  { font-size: 1.7rem; font-weight: 800; margin: 0 0 10px; color: var(--c-text); line-height: 1.2; }

.fiche-hero__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fiche-hero__badge {
    display       : inline-flex;
    align-items   : center;
    gap           : 5px;
    font-size     : .72rem;
    font-weight   : 700;
    padding       : 4px 12px;
    border-radius : var(--radius-pill);
    letter-spacing: .05em;
    text-transform: uppercase;
    color         : #fff;
}
.fiche-hero__badge--sous {
    background : rgba(255,255,255,.18);
    border     : 1.5px solid rgba(255,255,255,.4);
}

.fiche-hero__loc {
    display    : flex;
    align-items: center;
    gap        : 6px;
    font-size  : .88rem;
    color      : var(--c-text-light);
    font-weight: 500;
}

.fiche-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.fiche-hero__btn {
    display        : inline-flex;
    align-items    : center;
    gap            : 6px;
    padding        : 8px 18px;
    border-radius  : var(--radius-sm);
    font-size      : .84rem;
    font-weight    : 700;
    text-decoration: none;
    transition     : all var(--transition);
    white-space    : nowrap;
}
.fiche-hero__btn--edit {
    background : var(--c-white);
    border     : 1.5px solid var(--c-border);
    color      : var(--c-text-light);
}
.fiche-hero__btn--edit:hover {
    border-color : var(--c-green);
    color        : var(--c-green);
    background   : var(--c-green-light);
}
.fiche-hero__btn--back {
    background : var(--c-bg);
    border     : 1.5px solid var(--c-border);
    color      : var(--c-text-light);
}
.fiche-hero__btn--back:hover {
    background : var(--c-border-light);
    color      : var(--c-text);
}

/* ── Sections fiche ── */
.fiche-section {
    background    : var(--c-white);
    border        : 1.5px solid var(--c-border);
    border-radius : var(--radius-md);
    padding       : 24px 28px;
    margin-bottom : 16px;
    box-shadow    : var(--shadow-sm);
}
.fiche-section__title {
    font-size      : .76rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .09em;
    margin         : 0 0 18px;
    padding-bottom : 12px;
    border-bottom  : 2px solid var(--c-border-light);
    display        : flex;
    align-items    : center;
    gap            : 8px;
}

.fiche-description { font-size: .97rem; color: #334155; line-height: 1.78; }
.fiche-description p { margin: 0 0 12px; }

.fiche-cats { display: flex; flex-wrap: wrap; gap: 10px; }
.fiche-cat-pill {
    display       : inline-flex;
    align-items   : center;
    gap           : 6px;
    padding       : 6px 14px;
    border-radius : var(--radius-pill);
    font-size     : .84rem;
    font-weight   : 600;
    border        : 1.5px solid;
}
.fiche-cat-pill--parent { color: var(--pill-color); border-color: var(--pill-color); background: var(--pill-bg); }
.fiche-cat-pill--child  { color: var(--c-text-light); border-color: var(--c-border); background: var(--c-bg); }

/* ── Carte fiche ── */
#fiche-map {
    width         : 100%;
    height        : 300px;
    border-radius : var(--radius-sm);
    border        : 1.5px solid var(--c-border);
    z-index       : 0;
    position      : relative;
    margin-top    : 16px;
}
.fiche-map-label { margin-top: 6px; font-size: .74rem; color: var(--c-text-muted); text-align: right; }
.fiche-map-label a { color: var(--c-text-muted); }

/* ── Structure liée ── */
.fiche-structure-card {
    display        : flex;
    align-items    : center;
    gap            : 16px;
    background     : var(--c-bg);
    border         : 1.5px solid var(--c-border);
    border-radius  : var(--radius-sm);
    padding        : 16px 20px;
    text-decoration: none;
    color          : inherit;
    transition     : border-color var(--transition), box-shadow var(--transition);
}
.fiche-structure-card:hover {
    border-color   : var(--c-green);
    box-shadow     : var(--shadow-green);
    color          : inherit;
    text-decoration: none;
}
.fiche-structure-card__logo {
    width          : 56px;
    height         : 56px;
    border-radius  : var(--radius-sm);
    background     : var(--c-white);
    border         : 1.5px solid var(--c-border);
    display        : flex;
    align-items    : center;
    justify-content: center;
    flex-shrink    : 0;
    overflow       : hidden;
    font-size      : 1.6rem;
}
.fiche-structure-card__logo img { width: 100%; height: 100%; object-fit: contain; }
.fiche-structure-card__info     { flex: 1; min-width: 0; }
.fiche-structure-card__name     { font-weight: 700; font-size: 1rem; color: var(--c-text); margin-bottom: 3px; }
.fiche-structure-card__cta      { font-size: .8rem; color: var(--c-green); font-weight: 600; display: flex; align-items: center; gap: 4px; }

/* ── Admin badge & infos ── */
.fiche-admin-badge {
    display       : inline-block;
    background    : #fff3cd;
    color         : #856404;
    border        : 1px solid #ffc107;
    border-radius : var(--radius-sm);
    font-size     : .68rem;
    font-weight   : 700;
    padding       : 2px 8px;
    margin-left   : 8px;
    vertical-align: middle;
}
.fiche-admin-info { display: flex; flex-direction: column; gap: 8px; }
.fiche-admin-row  { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--c-text-light); }
.fiche-admin-row__label {
    font-weight   : 700;
    font-size     : .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color         : var(--c-text-muted);
    min-width     : 80px;
}

/* ═══════════════════════════════════════════════════════════
   SINGLE STRUCTURE
═══════════════════════════════════════════════════════════ */
.str-wrap *,
.str-wrap *::before,
.str-wrap *::after { box-sizing: border-box; }

.str-wrap {
    max-width   : 900px;
    margin      : 40px auto;
    padding     : 0 20px 60px;
    font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color       : var(--c-text);
    line-height : 1.6;
}

.str-hero {
    display       : flex;
    align-items   : center;
    gap           : 28px;
    background    : var(--c-bg);
    border-radius : var(--radius-lg);
    padding       : 28px;
    margin-bottom : 20px;
    border        : 1.5px solid var(--c-border);
    box-shadow    : var(--shadow-sm);
}
.str-hero__logo {
    flex-shrink    : 0;
    width          : 110px;
    height         : 110px;
    border-radius  : var(--radius-md);
    overflow       : hidden;
    background     : var(--c-white);
    border         : 1.5px solid var(--c-border);
    display        : flex;
    align-items    : center;
    justify-content: center;
}
.str-hero__logo img           { width: 100%; height: 100%; object-fit: contain; }
.str-hero__logo--placeholder  { font-size: 48px; color: var(--c-text-muted); }
.str-hero__info               { flex: 1; min-width: 0; }
.str-hero__name               { font-size: 1.75rem; font-weight: 800; margin: 0 0 8px; color: var(--c-text); line-height: 1.2; }
.str-hero__type {
    display        : inline-block;
    background     : var(--c-green-light);
    color          : var(--c-green-dark);
    font-size      : .72rem;
    font-weight    : 700;
    padding        : 3px 12px;
    border-radius  : var(--radius-pill);
    letter-spacing : .05em;
    text-transform : uppercase;
    border         : 1px solid var(--c-green-mid);
}
.str-hero__desc-courte { margin-top: 12px; color: var(--c-text-light); font-size: .95rem; }

.str-section {
    background    : var(--c-white);
    border        : 1.5px solid var(--c-border);
    border-radius : var(--radius-md);
    padding       : 24px 28px;
    margin-bottom : 16px;
    box-shadow    : var(--shadow-sm);
}
.str-section__title {
    font-size      : .76rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .09em;
    color          : var(--c-green);
    margin         : 0 0 18px;
    padding-bottom : 10px;
    border-bottom  : 2px solid var(--c-green-light);
    display        : flex;
    align-items    : center;
    gap            : 8px;
}

.str-grid {
    display               : grid;
    grid-template-columns : repeat(auto-fill, minmax(230px, 1fr));
    gap                   : 14px 24px;
}
.str-field__label {
    font-size      : .7rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .05em;
    color          : var(--c-text-muted);
    margin-bottom  : 2px;
}
.str-field__value       { font-size: .95rem; color: var(--c-text); word-break: break-word; }
.str-field__value a     { color: var(--c-green); text-decoration: none; transition: color var(--transition); }
.str-field__value a:hover { text-decoration: underline; }

#str-map {
    width         : 100%;
    height        : 320px;
    border-radius : var(--radius-sm);
    margin-top    : 20px;
    border        : 1.5px solid var(--c-border);
    z-index       : 0;
    position      : relative;
}
.str-map-label { margin-top: 6px; font-size: .74rem; color: var(--c-text-muted); text-align: right; }
.str-map-label a { color: var(--c-text-muted); }

.str-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.str-tags li {
    background    : var(--c-green-light);
    color         : var(--c-green-dark);
    border        : 1.5px solid var(--c-green-mid);
    border-radius : var(--radius-pill);
    padding       : 4px 12px;
    font-size     : .84rem;
    font-weight   : 500;
}

.str-desc-longue     { font-size: .97rem; color: #334155; line-height: 1.78; }
.str-desc-longue p   { margin: 0 0 12px; }

.str-social { display: flex; flex-wrap: wrap; gap: 10px; }
.str-social__link {
    display        : inline-flex;
    align-items    : center;
    gap            : 7px;
    padding        : 8px 18px;
    border-radius  : var(--radius-sm);
    font-size      : .88rem;
    font-weight    : 600;
    text-decoration: none;
    color          : #fff;
    transition     : opacity var(--transition);
}
.str-social__link:hover          { opacity: .82; color: #fff; text-decoration: none; }
.str-social__link--site          { background: var(--c-text); }
.str-social__link--facebook      { background: #1877f2; }
.str-social__link--instagram     { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.str-social__link--autre         { background: var(--c-green); }

.str-document__link {
    display        : inline-flex;
    align-items    : center;
    gap            : 8px;
    background     : var(--c-bg);
    border         : 1.5px solid var(--c-border);
    border-radius  : var(--radius-sm);
    padding        : 10px 18px;
    font-size      : .92rem;
    font-weight    : 600;
    color          : var(--c-green);
    text-decoration: none;
    transition     : background var(--transition), border-color var(--transition);
}
.str-document__link:hover { background: var(--c-green-light); border-color: var(--c-green-mid); }

.str-responsable {
    display       : flex;
    align-items   : flex-start;
    gap           : 16px;
    background    : var(--c-bg);
    border-radius : var(--radius-sm);
    padding       : 16px 20px;
    border        : 1.5px solid var(--c-border);
}
.str-responsable__avatar {
    width          : 50px;
    height         : 50px;
    border-radius  : 50%;
    background     : var(--c-green-light);
    display        : flex;
    align-items    : center;
    justify-content: center;
    font-size      : 1.4rem;
    flex-shrink    : 0;
    border         : 1.5px solid var(--c-green-mid);
}
.str-responsable__name            { font-weight: 700; font-size: 1rem; margin-bottom: 5px; color: var(--c-text); }
.str-responsable__contact         { font-size: .88rem; color: var(--c-text-light); }
.str-responsable__contact a       { color: var(--c-green); text-decoration: none; }
.str-responsable__contact a:hover { text-decoration: underline; }
.str-responsable__contact div     { margin-bottom: 3px; }

.str-admin-badge {
    display       : inline-block;
    background    : #fff3cd;
    color         : #856404;
    border        : 1px solid #ffc107;
    border-radius : var(--radius-sm);
    font-size     : .68rem;
    font-weight   : 700;
    padding       : 2px 8px;
    margin-left   : 8px;
    vertical-align: middle;
}

.str-fiches-grid {
    display               : grid;
    grid-template-columns : repeat(auto-fill, minmax(220px, 1fr));
    gap                   : 14px;
    margin-top            : 4px;
}
.str-fiche-card {
    background     : var(--c-bg);
    border         : 1.5px solid var(--c-border);
    border-radius  : var(--radius-sm);
    padding        : 16px;
    text-decoration: none;
    color          : inherit;
    transition     : box-shadow var(--transition), border-color var(--transition);
    display        : flex;
    flex-direction : column;
    gap            : 6px;
}
.str-fiche-card:hover {
    box-shadow   : var(--shadow-green);
    border-color : var(--c-green-mid);
    text-decoration: none;
    color        : inherit;
}
.str-fiche-card__title { font-weight: 700; font-size: .95rem; color: var(--c-text); }
.str-fiche-card__meta  { font-size: .8rem; color: var(--c-text-muted); }

.str-btn-creer-fiche {
    display        : inline-flex;
    align-items    : center;
    gap            : 8px;
    background     : var(--c-green);
    color          : #fff;
    font-weight    : 700;
    font-size      : .92rem;
    padding        : 10px 22px;
    border-radius  : var(--radius-sm);
    text-decoration: none;
    transition     : background var(--transition), box-shadow var(--transition);
    margin-bottom  : 20px;
}
.str-btn-creer-fiche:hover {
    background     : var(--c-green-dark);
    color          : #fff;
    text-decoration: none;
    box-shadow     : var(--shadow-green);
}

/* ═══════════════════════════════════════════════════════════
   LISTE STRUCTURES
═══════════════════════════════════════════════════════════ */
.ls-wrap *,
.ls-wrap *::before,
.ls-wrap *::after { box-sizing: border-box; }

.ls-wrap {
    font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color       : var(--c-text);
    max-width   : 1280px;
    margin      : 0 auto;
    padding     : 0 4px;
}

.ls-filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.ls-filtre-btn {
    display      : inline-flex;
    align-items  : center;
    gap          : 6px;
    padding      : 7px 16px;
    border       : 1.5px solid var(--c-border);
    border-radius: var(--radius-pill);
    background   : var(--c-white);
    color        : var(--c-text-light);
    font-size    : .82rem;
    font-weight  : 600;
    cursor       : pointer;
    transition   : all var(--transition);
    white-space  : nowrap;
}
.ls-filtre-btn:hover {
    border-color : var(--ls-type-color, var(--c-green));
    color        : var(--ls-type-color, var(--c-green));
    background   : var(--c-bg);
}
.ls-filtre-btn.active {
    background   : var(--ls-type-color, var(--c-green));
    border-color : var(--ls-type-color, var(--c-green));
    color        : #fff;
    box-shadow   : var(--shadow-green);
}
.ls-filtre-btn[data-type="all"] { --ls-type-color: var(--c-green); }

.ls-filtre-count {
    background    : rgba(255,255,255,.28);
    color         : inherit;
    border-radius : var(--radius-pill);
    padding       : 1px 7px;
    font-size     : .7rem;
    font-weight   : 700;
    line-height   : 1.6;
}
.ls-filtre-btn:not(.active) .ls-filtre-count { background: var(--c-bg); color: var(--c-text-muted); }

.ls-info-bar { font-size: .82rem; color: var(--c-text-muted); margin-bottom: 20px; font-weight: 500; }
#ls-compteur { font-weight: 700; color: var(--c-text-light); }

.ls-grid {
    display               : grid;
    grid-template-columns : repeat(6, 1fr);
    gap                   : 16px;
}

.ls-card {
    position      : relative;
    background    : var(--c-white);
    border        : 1.5px solid var(--c-border);
    border-radius : var(--radius-md);
    display       : flex;
    flex-direction: column;
    overflow      : hidden;
    transition    : transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    box-shadow    : var(--shadow-sm);
}
.ls-card:hover {
    transform    : translateY(-4px);
    box-shadow   : var(--shadow-md);
    border-color : var(--c-green-mid);
}
.ls-card__link { position: absolute; inset: 0; z-index: 0; }

.ls-card__top {
    display        : flex;
    align-items    : flex-start;
    justify-content: space-between;
    gap            : 8px;
    padding        : 16px 14px 0;
}
.ls-card__avatar {
    width          : 52px;
    height         : 52px;
    border-radius  : var(--radius-sm);
    display        : flex;
    align-items    : center;
    justify-content: center;
    flex-shrink    : 0;
    overflow       : hidden;
}
.ls-card__logo    { width: 100%; height: 100%; object-fit: contain; }
.ls-card__initials { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }

.ls-card__badge {
    font-size     : .66rem;
    font-weight   : 700;
    padding       : 3px 9px;
    border-radius : var(--radius-pill);
    white-space   : nowrap;
    line-height   : 1.6;
    max-width     : calc(100% - 64px);
    overflow      : hidden;
    text-overflow : ellipsis;
}

.ls-card__body { padding: 12px 14px 12px; flex: 1; }
.ls-card__name {
    font-size   : .9rem;
    font-weight : 700;
    color       : var(--c-text);
    margin      : 0 0 6px;
    line-height : 1.35;
}
.ls-card__name a { color: inherit; text-decoration: none; position: relative; z-index: 1; transition: color var(--transition); }
.ls-card__name a:hover { color: var(--c-green); }

.ls-card__desc { font-size: .76rem; color: var(--c-text-light); line-height: 1.5; margin: 0 0 10px; }

.ls-card__meta { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ls-card__meta-item { display: flex; align-items: flex-start; gap: 5px; font-size: .74rem; color: var(--c-text-light); line-height: 1.5; }
.ls-meta-icon { flex-shrink: 0; color: var(--c-text-muted); margin-top: 1px; }

.ls-card__footer { padding: 0 14px 14px; margin-top: auto; position: relative; z-index: 1; }
.ls-card__cta {
    display        : inline-flex;
    align-items    : center;
    gap            : 5px;
    font-size      : .75rem;
    font-weight    : 700;
    color          : var(--c-green);
    text-decoration: none;
    padding        : 5px 10px;
    border         : 1.5px solid var(--c-green-mid);
    border-radius  : var(--radius-sm);
    background     : var(--c-green-light);
    transition     : all var(--transition);
    position       : relative;
    z-index        : 1;
}
.ls-card__cta:hover { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.ls-card__cta svg  { transition: transform var(--transition); }
.ls-card__cta:hover svg { transform: translateX(3px); }

.ls-no-result { text-align: center; padding: 60px 20px; color: var(--c-text-muted); }
.ls-no-result p { font-size: .95rem; margin: 14px 0 0; }
.ls-card.ls-hidden { display: none; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */

/* ── Liste structures ── */
@media (max-width: 1200px) { .ls-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .ls-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
    .ls-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .ls-card__badge { display: none; }
    .ls-card__desc  { display: none; }
}
@media (max-width: 400px)  { .ls-grid { grid-template-columns: 1fr; } }

/* ── Fiche & Structure singles ── */
@media (max-width: 600px) {
    .fiche-hero       { flex-direction: column; gap: 16px; }
    .fiche-hero__icon { width: 60px; height: 60px; font-size: 1.5rem; }
    .fiche-hero__name { font-size: 1.3rem; }
    .fiche-section    { padding: 18px 16px; }
    #fiche-map        { height: 240px; }

    .str-hero         { flex-direction: column; align-items: flex-start; }
    .str-hero__logo   { width: 80px; height: 80px; }
    .str-hero__name   { font-size: 1.35rem; }
    .str-section      { padding: 18px 16px; }
    #str-map          { height: 240px; }
}

/* ── Mon compte ── */
@media (max-width: 680px) {
    .mc-layout   { grid-template-columns: 1fr; }
    .mc-col-full { grid-column: 1; }
}
@media (max-width: 500px) {
    .mc-header              { padding: 16px 18px; flex-wrap: wrap; }
    .mc-header__logout      { width: 100%; justify-content: center; margin-top: 8px; }
    .mc-fiche-item__actions { flex-direction: column; }
}

/* ── Carte filtres ── */
@media (max-width: 600px) {
    #cf-filtres-parents .cf-filtre-btn { font-size: .8rem; padding: 7px 12px; }
    .cf-filtre-sous-btn                { font-size: .75rem; padding: 5px 10px; }
    #cf-map                            { height: 400px; }
}

/* ═══════════════════════════════════════════════════════════
   CUSTOM (thème)
═══════════════════════════════════════════════════════════ */
.qsn_menu a,
.qsn_menu a .menu-text { color: red !important; }
