@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;1,600&display=swap');

/**
 * Styles partagés pour toutes les pages detail Supabase
 * Utilisé par : shortcode-commission-detail, shortcode-mandat-detail,
 *               shortcode-service-detail (et futur sondage-detail)
 */

/* ========== Page wrapper ========== */
.demg-detail-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.demg-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2F2483;
    text-decoration: none;
    margin-bottom: 1.2rem;
    transition: opacity 0.2s;
}

.demg-detail-back:hover { opacity: 0.7; }

.demg-detail-back .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ========== Header ========== */
.demg-detail-header {
    color: #fff;
    padding: 28px 32px;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.demg-detail-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.12);
    pointer-events: none;
}

.demg-detail-category {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    color: #fff;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.demg-detail-title {
    margin: 0 0 10px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff !important;
    position: relative;
    z-index: 1;
    line-height: 1.25;
}

.demg-detail-desc {
    margin: 0 0 10px;
    font-size: 0.95rem;
    opacity: 0.9;
    color: #fff !important;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

.demg-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.demg-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.demg-detail-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ========== Sections ========== */
.demg-detail-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.demg-detail-section h2 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.demg-detail-section h2 .dashicons {
    color: #2F2483;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.demg-detail-section--form {
    border-color: #2F2483;
    border-width: 2px;
}

/* ========== Seats grid ========== */
.demg-detail-seats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.demg-detail-seat-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.demg-detail-seat-card--tit {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.demg-detail-seat-card--sup {
    background: #faf5ff;
    border-color: #d8b4fe;
}

.demg-detail-seat-count {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2F2483;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.demg-detail-seat-card--tit .demg-detail-seat-count { color: #2563eb; }
.demg-detail-seat-card--sup .demg-detail-seat-count { color: #7c3aed; }

.demg-detail-seat-over {
    font-size: 0.75rem;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 1px 6px;
    border-radius: 8px;
    white-space: nowrap;
}

.demg-detail-seat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    margin: 4px 0 8px;
}

/* ========== Members grid ========== */
.demg-detail-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.demg-detail-member-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
}

.demg-detail-member-card--chef {
    border-color: #2F2483;
    background: #f0edfa;
}

.demg-detail-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2F2483, #662282);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.demg-detail-member-role {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

.demg-detail-empty {
    color: #9ca3af;
    font-style: italic;
    margin: 0;
}

/* ========== Description ========== */
.demg-detail-description {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #374151;
}

/* ========== CTA / formulaire candidature ========== */
.demg-detail-cta {
    text-align: center;
}

.demg-detail-btn-candidater {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #2F2483 0%, #662282 100%);
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(47, 36, 131, 0.25);
}

.demg-detail-btn-candidater:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(47, 36, 131, 0.35);
}

.demg-detail-btn-candidater .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.demg-detail-form-wrapper {
    text-align: left;
    animation: demgFormSlideDown 0.3s ease-out;
}

/* ── Overrides formulaire inline dans service-detail ── */
.demg-detail-form-wrapper .demg-formulaire-wrap {
    --fm-primary:   #2F2483;
    --fm-secondary: #E5007D;
    --fm-gradient:  linear-gradient(135deg, #2F2483 0%, #E5007D 100%);
    max-width: 100%;
    margin: 0;
}

/* Supprimer le double contour : le formulaire est déjà dans une section */
.demg-detail-form-wrapper .demg-formulaire-form {
    border: none;
    border-radius: 0 0 8px 8px;
    box-shadow: none;
    padding: 24px 0 0;
}

/* Header du formulaire : arrondi complet puisque plus de double cadre */
.demg-detail-form-wrapper .demg-formulaire-header {
    border-radius: 8px 8px 0 0;
}

.demg-detail-form-wrapper .demg-formulaire-title,
.demg-detail-form-wrapper .demg-formulaire-desc {
    color: #fff !important;
}

/* Titres de section en couleur MEDEF */
.demg-detail-form-wrapper .demg-form-section-title,
.demg-detail-form-wrapper .demg-form-heading {
    color: #2F2483;
}

/* Focus champs */
.demg-detail-form-wrapper .demg-field:focus {
    border-color: #2F2483;
    box-shadow: 0 0 0 3px rgba(47, 36, 131, 0.15);
}

/* Bouton submit */
.demg-detail-form-wrapper .demg-form-submit-wrap {
    display: flex;
    justify-content: flex-end;
}

.demg-detail-form-wrapper .demg-btn-submit {
    background: linear-gradient(135deg, #2F2483 0%, #E5007D 100%);
    border-radius: 8px;
    padding: 13px 32px;
    font-size: 1rem;
}

.demg-detail-form-wrapper h2 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.demg-detail-form-wrapper h2 .dashicons {
    color: #2F2483;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

@keyframes demgFormSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== Notice complet ========== */
.demg-detail-full-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    color: #0369a1;
    font-size: 0.9rem;
    font-weight: 500;
}

.demg-detail-full-notice .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #0284c7;
}

/* ========== Badges ========== */
.demg-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.demg-badge-default { background: #f3f4f6; color: #374151; }
.demg-badge-warning { background: #fef3c7; color: #92400e; }
.demg-badge-success { background: #dcfce7; color: #166534; }
.demg-badge-danger  { background: #fee2e2; color: #991b1b; }

/* ========== Responsive ========== */
@media (max-width: 640px) {
    .demg-detail-header {
        padding: 20px;
    }

    .demg-detail-seats-grid {
        grid-template-columns: 1fr;
    }

    .demg-detail-members-grid {
        grid-template-columns: 1fr;
    }

    .demg-detail-title {
        font-size: 1.3rem;
    }

    .demg-detail-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* ═══════════════════════════════════════════════════════
   Fiche Mandat — layout 2 colonnes
   ═══════════════════════════════════════════════════════ */

.demg-mandat-fiche { max-width: 1100px; }

/* ── Header fiche ── */
.demg-fiche-header {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 5px solid var(--fiche-color, #2F2483);
    border-radius: 12px;
    padding: 24px 28px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.demg-fiche-header-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.demg-fiche-cat {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.demg-fiche-family {
    font-size: 0.8rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.demg-fiche-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #111827;
    margin: 4px 0 10px;
    line-height: 1.25;
}

.demg-fiche-cat-wrap {
    margin-bottom: 16px;
}

/* KPIs dans le header */
.demg-fiche-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.demg-fiche-kpi {
    display: flex;
    align-items: center;
    gap: 10px;
}

.demg-fiche-kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.demg-fiche-kpi-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.demg-fiche-kpi > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.demg-fiche-kpi-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

.demg-fiche-kpi-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
}

.demg-fiche-kpi-value a { color: #2F2483; text-decoration: none; }
.demg-fiche-kpi-value a:hover { text-decoration: underline; }

/* ── Corps 2 colonnes ── */
.demg-fiche-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

/* ── Colonne principale ── */
.demg-fiche-main { display: flex; flex-direction: column; gap: 20px; }

.demg-fiche-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.demg-fiche-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}

.demg-fiche-section-title .dashicons { color: #2F2483; font-size: 17px; }

.demg-fiche-text {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.65;
}

/* Lien vers le mandat parent, affiché au-dessus du titre quand ce mandat est
   un sous-mandat (voir le champ "Mandat parent" côté admin gestion-mandats). */
.demg-fiche-parent-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: color .15s;
}
.demg-fiche-parent-link:hover { color: #2F2483; }
.demg-fiche-parent-link .dashicons { font-size: 15px; width: 15px; height: 15px; }

/* Liste des sous-mandats rattachés (section "Sous-mandats rattachés") —
   mêmes codes visuels que les lignes du catalogue public (pastille couleur
   de catégorie, flèche) pour rester cohérent avec la liste /mandats/. */
.demg-fiche-submandats-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.demg-fiche-submandat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.demg-fiche-submandat-item:hover { border-color: #2F2483; background: #faf9ff; }
.demg-fiche-submandat-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
}
.demg-fiche-submandat-cat {
    flex: 0 0 auto;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--card-color, #2F2483);
    background: color-mix(in srgb, var(--card-color, #2F2483) 12%, #fff);
}
.demg-fiche-submandat-seats {
    flex: 0 0 auto;
    font-size: 0.78rem;
    color: #6b7280;
    white-space: nowrap;
}
.demg-fiche-submandat-item .dashicons {
    flex: 0 0 auto;
    color: #9ca3af;
    font-size: 16px;
}

.demg-fiche-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.demg-fiche-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.55;
}

.demg-fiche-list li::before {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fiche-color, #2F2483);
    margin-top: 7px;
}

/* ── Membres groupés ── */
.demg-fiche-members-group { margin-bottom: 16px; }
.demg-fiche-members-group:last-child { margin-bottom: 0; }

.demg-fiche-members-group-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.demg-fiche-members-group-label--tit { background: #eff6ff; color: #2563eb; }
.demg-fiche-members-group-label--sup { background: #faf5ff; color: #7c3aed; }
.demg-fiche-members-group-label--other { background: #f3f4f6; color: #6b7280; }

.demg-fiche-members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.demg-fiche-member-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.demg-fiche-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.demg-fiche-member-avatar--tit  { background: #2563eb; }
.demg-fiche-member-avatar--sup  { background: #7c3aed; }
.demg-fiche-member-avatar--other { background: #6b7280; }

.demg-fiche-member-info strong { font-size: 0.85rem; color: #111827; display: block; }

/* ── Aside ── */
.demg-fiche-aside { display: flex; flex-direction: column; gap: 16px; }

.demg-fiche-aside-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.demg-fiche-aside-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}

/* Postes aside */
.demg-fiche-seat-row {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
}

.demg-fiche-seat-row:last-child { margin-bottom: 0; }
.demg-fiche-seat-row--tit { background: #eff6ff; border-color: #bfdbfe; }
.demg-fiche-seat-row--sup { background: #faf5ff; border-color: #d8b4fe; }

.demg-fiche-seat-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.demg-fiche-seat-role { font-size: 0.82rem; font-weight: 600; color: #374151; }
.demg-fiche-seat-num { font-size: 0.95rem; font-weight: 800; color: #1e293b; display: flex; align-items: center; gap: 5px; }

.demg-fiche-seat-bar-track {
    height: 5px;
    background: rgba(0,0,0,.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.demg-fiche-seat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .4s ease;
}

.demg-fiche-seat-bar-fill--tit { background: #2563eb; }
.demg-fiche-seat-bar-fill--sup { background: #7c3aed; }

/* DL infos pratiques */
.demg-fiche-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    margin: 0;
}

.demg-fiche-dl dt {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 2px;
    white-space: nowrap;
}

.demg-fiche-dl dd {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.demg-fiche-dl dd a { color: #2F2483; text-decoration: none; word-break: break-all; }
.demg-fiche-dl dd a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 860px) {
    .demg-fiche-body { grid-template-columns: 1fr; }
    .demg-fiche-aside { flex-direction: row; flex-wrap: wrap; }
    .demg-fiche-aside-card { flex: 1; min-width: 240px; }
    .demg-fiche-title { font-size: 1.3rem; }
}

@media (max-width: 560px) {
    .demg-fiche-kpis { gap: 10px 16px; }
    .demg-fiche-members-list { grid-template-columns: 1fr; }
    .demg-fiche-aside { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════
   Fiche Commission — direction artistique mosaïque
   Strictement isolée pour ne pas affecter Mandats/Services.
   ═══════════════════════════════════════════════════════ */
.demg-commission-detail {
    max-width: 1180px;
    padding: 2.25rem 1rem 3rem;
}

.demg-commission-detail .demg-detail-back {
    gap: 8px;
    margin-bottom: 1.5rem;
    color: #2f2483;
    font-size: 0.95rem;
    font-weight: 700;
}

.demg-commission-detail .demg-detail-header {
    min-height: 270px;
    margin-bottom: 2rem;
    padding: 46px 50px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px 70px 24px 24px;
    background: linear-gradient(135deg, #2f2483 0%, #6c268d 100%);
    box-shadow: 0 20px 46px rgba(47, 36, 131, 0.22);
}

.demg-commission-detail .demg-detail-header::before,
.demg-commission-detail .demg-detail-header::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.demg-commission-detail .demg-detail-header::before {
    inset: auto -70px -150px auto;
    width: 390px;
    height: 390px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: transparent;
}

.demg-commission-detail .demg-detail-header::after {
    right: 80px;
    bottom: -210px;
    width: 430px;
    height: 430px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.demg-commission-detail__eyebrow {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.demg-commission-detail .demg-detail-title {
    max-width: 720px;
    margin-bottom: 24px;
    font-size: clamp(2.25rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.demg-commission-detail .demg-detail-meta {
    gap: 12px;
    opacity: 1;
}

.demg-commission-detail .demg-detail-meta > span {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.demg-commission-detail .demg-detail-section {
    position: relative;
    margin-bottom: 1.5rem;
    padding: 30px 34px;
    border-color: #e9e7f1;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(7, 20, 38, 0.07);
}

.demg-commission-detail .demg-detail-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 34px;
    width: 52px;
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: #ef4056;
}

.demg-commission-detail .demg-detail-section h2 {
    margin-bottom: 20px;
    color: #071426;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.demg-commission-detail .demg-detail-section h2 .dashicons {
    color: #63268e;
}

.demg-commission-detail .demg-detail-description {
    color: #525a6b;
    font-size: 1rem;
    line-height: 1.8;
}

.demg-commission-detail .demg-detail-members-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.demg-commission-detail .demg-detail-member-card {
    min-height: 76px;
    padding: 14px 16px;
    border-color: #e7e4f0;
    border-radius: 14px;
    background: #f8f7fc;
}

.demg-commission-detail .demg-detail-member-card--chef {
    border-color: rgba(98, 38, 142, 0.3);
    background: linear-gradient(135deg, #f3effb 0%, #fbf8fd 100%);
}

.demg-commission-detail .demg-detail-member-avatar {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #2f2483, #76268c);
}

.demg-commission-detail .demg-detail-empty {
    padding: 18px 20px;
    border-radius: 12px;
    color: #7b8190;
    background: #f8f7fc;
}

.demg-commission-detail .demg-detail-cta {
    overflow: hidden;
    padding: 38px 34px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #071426 0%, #2f2483 68%, #67238f 100%);
}

.demg-commission-detail .demg-detail-cta::before {
    left: 50%;
    width: 70px;
    transform: translateX(-50%);
}

.demg-commission-detail .demg-detail-btn-candidater {
    border-radius: 999px;
    background: #ef4056;
    box-shadow: 0 10px 26px rgba(239, 64, 86, 0.3);
}

.demg-commission-detail .demg-detail-btn-candidater:hover {
    background: #db3048;
    box-shadow: 0 14px 30px rgba(239, 64, 86, 0.38);
}

.demg-commission-detail .demg-detail-form-wrapper,
.demg-commission-detail .demg-detail-form-wrapper h2 {
    color: #fff;
}

.demg-commission-detail .demg-candidature-inline-form {
    color: #071426;
    border: 0;
    border-radius: 16px;
    box-shadow: none;
}

@media (max-width: 768px) {
    .demg-commission-detail {
        padding-top: 1.5rem;
    }

    .demg-commission-detail .demg-detail-header {
        min-height: 230px;
        padding: 34px 28px;
        border-radius: 20px 48px 20px 20px;
    }

    .demg-commission-detail .demg-detail-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .demg-commission-detail .demg-detail-section {
        padding: 26px 22px;
    }

    .demg-commission-detail .demg-detail-section::before {
        left: 22px;
    }
}

@media (max-width: 480px) {
    .demg-commission-detail .demg-detail-meta {
        align-items: flex-start;
    }

    .demg-commission-detail .demg-detail-members-grid {
        grid-template-columns: 1fr;
    }
}

/* Fiche Commission v2 — composition éditoriale */
.demg-commission-detail .demg-detail-header {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    align-items: center;
    gap: 32px;
    min-height: 360px;
    padding: 52px 58px;
    border-radius: 28px 86px 28px 28px;
    background:
        radial-gradient(circle at 82% 22%, rgba(239, 64, 86, 0.18), transparent 25%),
        linear-gradient(135deg, #211a69 0%, #452486 52%, #76268c 100%);
}

.demg-commission-detail .demg-detail-header::before,
.demg-commission-detail .demg-detail-header::after {
    display: none;
}

.demg-commission-detail__hero-content {
    position: relative;
    z-index: 2;
}

.demg-commission-detail__hero-art {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: min(100%, 330px);
    aspect-ratio: 1;
    justify-self: end;
    color: rgba(255, 255, 255, 0.28);
}

.demg-commission-detail__hero-art::before {
    content: "";
    position: absolute;
    inset: 13%;
    border-radius: 42% 58% 60% 40% / 45% 40% 60% 55%;
    background: rgba(255, 255, 255, 0.06);
    transform: rotate(12deg);
}

.demg-commission-detail__hero-art svg {
    position: relative;
    width: 100%;
    height: 100%;
}

.demg-commission-detail__hero-logo {
    position: relative;
    z-index: 1;
    display: block;
    width: min(100%, 260px);
    max-height: 230px;
    padding: 20px;
    border-radius: 24px;
    background: #fff;
    object-fit: contain;
    box-shadow: 0 18px 42px rgba(7, 20, 38, 0.2);
}

.demg-commission-detail .demg-detail-title {
    max-width: 690px;
    font-size: clamp(2.75rem, 5.5vw, 4.8rem);
}

.demg-commission-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
    gap: 26px;
    margin-bottom: 1.75rem;
}

.demg-commission-detail__main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 24px;
}

.demg-commission-detail__main .demg-detail-section {
    margin-bottom: 0;
}

.demg-commission-detail__main .demg-detail-section:first-child {
    padding: 38px 42px;
}

.demg-commission-detail__main .demg-detail-section:first-child h2 {
    font-size: 1.6rem;
}

.demg-commission-detail__main .demg-detail-section:first-child .demg-detail-description {
    font-size: 1.06rem;
    line-height: 1.9;
}

.demg-commission-detail__aside {
    position: sticky;
    top: 28px;
}

.demg-commission-detail__summary {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    padding: 32px 28px;
    color: #fff;
    border-radius: 22px 54px 22px 22px;
    background: linear-gradient(155deg, #071426 0%, #263469 55%, #54218c 100%);
    box-shadow: 0 18px 38px rgba(7, 20, 38, 0.18);
}

.demg-commission-detail__summary::before,
.demg-commission-detail__summary::after {
    content: "";
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.demg-commission-detail__summary::before {
    right: -75px;
    bottom: -80px;
    width: 220px;
    height: 220px;
}

.demg-commission-detail__summary::after {
    right: -20px;
    bottom: -125px;
    width: 260px;
    height: 260px;
}

.demg-commission-detail__summary-kicker {
    position: relative;
    z-index: 1;
    color: #ef4056;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.demg-commission-detail__summary h2 {
    position: relative;
    z-index: 1;
    margin: 10px 0 28px;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.demg-commission-detail__stat {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.demg-commission-detail__stat > .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #55bba2;
}

.demg-commission-detail__stat div {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.demg-commission-detail__stat strong {
    color: #fff;
    font-size: 2rem;
    line-height: 1;
}

.demg-commission-detail__stat span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}

.demg-commission-detail__status {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.86rem;
    font-weight: 600;
}

.demg-commission-detail__status .dashicons {
    color: #ef4056;
}

.demg-commission-detail .demg-detail-cta {
    min-height: 180px;
    display: grid;
    place-items: center;
    border-radius: 24px 60px 24px 24px;
    background:
        radial-gradient(circle at 12% 115%, rgba(85, 187, 162, 0.32), transparent 30%),
        linear-gradient(120deg, #2f2483 0%, #64258d 65%, #071426 100%);
}

.demg-commission-detail .demg-detail-btn-candidater {
    min-height: 56px;
    padding-inline: 34px;
}

@media (max-width: 900px) {
    .demg-commission-detail .demg-detail-header {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .demg-commission-detail__hero-art {
        position: absolute;
        right: -55px;
        bottom: -80px;
        width: 260px;
        opacity: 0.62;
    }

    .demg-commission-detail__layout {
        grid-template-columns: 1fr;
    }

    .demg-commission-detail__aside {
        position: static;
    }

    .demg-commission-detail__summary {
        min-height: 250px;
    }
}

@media (max-width: 560px) {
    .demg-commission-detail .demg-detail-header {
        padding: 36px 28px 40px;
        border-radius: 22px 54px 22px 22px;
    }

    .demg-commission-detail .demg-detail-title {
        font-size: 2.55rem;
    }

    .demg-commission-detail__hero-art {
        right: -80px;
        bottom: -95px;
    }

    .demg-commission-detail__main .demg-detail-section:first-child {
        padding: 30px 24px;
    }

    .demg-commission-detail .demg-detail-cta {
        padding: 32px 20px;
    }

    .demg-commission-detail .demg-detail-btn-candidater {
        width: 100%;
        justify-content: center;
    }
}

/* ── Bannière image mandat ── */
.demg-fiche-header-image {
    margin: -24px -28px 18px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    height: 160px;
}

.demg-fiche-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── CTA bar ── */
.demg-fiche-cta-bar {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demg-fiche-btn-candidater {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #2F2483;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.demg-fiche-btn-candidater:hover { background: #241b6e; }
.demg-fiche-btn-candidater .dashicons { font-size: 18px; width: 18px; height: 18px; }

.demg-fiche-full-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #1e40af;
    font-weight: 500;
}

.demg-fiche-full-notice .dashicons { color: #3b82f6; font-size: 18px; width: 18px; height: 18px; }

.demg-fiche-cand-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid;
}

.demg-fiche-cand-notice .dashicons { font-size: 18px; width: 18px; height: 18px; flex-shrink: 0; }

.demg-fiche-cand-notice--pending {
    background: #fefce8;
    border-color: #fde047;
    color: #854d0e;
}
.demg-fiche-cand-notice--pending .dashicons { color: #ca8a04; }

.demg-fiche-cand-notice--accepted {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}
.demg-fiche-cand-notice--accepted .dashicons { color: #16a34a; }

.demg-fiche-cand-notice--rejected {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}
.demg-fiche-cand-notice--rejected .dashicons { color: #dc2626; }

/* ── Modale candidature ── */
.demg-cand-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.demg-cand-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    animation: demg-modal-in 0.2s ease;
}

@keyframes demg-modal-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.demg-cand-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 14px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.demg-cand-modal-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.demg-cand-modal-header h2 .dashicons { color: #2F2483; font-size: 18px; }

.demg-cand-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.demg-cand-modal-close:hover { color: #111827; background: #f3f4f6; }

.demg-cand-modal-body { padding: 20px 24px 28px; }

.demg-cand-modal-subtitle {
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 500;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f3f4f6;
}

/* KPI candidatures actif */
.demg-fiche-kpi--active .demg-fiche-kpi-icon {
    background: #dcfce7;
}
.demg-fiche-kpi--active .demg-fiche-kpi-icon .dashicons {
    color: #16a34a;
}
.demg-fiche-kpi--active .demg-fiche-kpi-value {
    color: #16a34a;
}

/* Badge "En cours" dans l'aside */
.demg-fiche-badge-encours {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════
   FICHE MANDAT — Redesign professionnel (Charte MEDEF 2021)
   Police Barlow Condensed + header coloré + triangle MEDEF
   ══════════════════════════════════════════════════════════ */

/* ── Header coloré (fond = couleur catégorie) ── */
.demg-mandat-fiche .demg-fiche-header {
    background: var(--fiche-color, #2F2483);
    border: none;
    border-left: none;
    border-radius: 14px;
    padding: 30px 32px 28px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Colonne titre */
.demg-fiche-header-content {
    flex: 1;
    min-width: 0;
}

/* Colonne actions (aligne avec la colonne aside de 300px) */
.demg-fiche-header-actions {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

/* Bouton télécharger fiche mandat */
.demg-fiche-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: rgba(255, 255, 255, 0.14);
    border: 2px solid rgba(255, 255, 255, 0.38);
    border-radius: 9px;
    color: #fff !important;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.demg-fiche-dl-btn:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.68);
    transform: translateY(-1px);
}
.demg-fiche-dl-btn .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

/* Triangle signature MEDEF — angle supérieur droit */
.demg-fiche-header-deco {
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.1);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    pointer-events: none;
    z-index: 0;
}

.demg-fiche-header-deco::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.07);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

/* Tout le contenu du header passe devant le triangle */
.demg-mandat-fiche .demg-fiche-header > *:not(.demg-fiche-header-deco) {
    position: relative;
    z-index: 1;
}

/* Slots documents candidature */
.demg-doc-slots {
    margin-top: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px 16px;
}
.demg-doc-slots-header {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #374151;
    margin-bottom: 12px;
}
.demg-doc-slots-header .dashicons { color: #2F2483; font-size: 15px; width: 15px; height: 15px; }
.demg-doc-slots-hint {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #9ca3af;
    font-size: 0.7rem;
    margin-left: 2px;
}
.demg-doc-slots-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.demg-doc-slot {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    min-height: 48px;
}
.demg-doc-slot-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}
.demg-doc-slot-label .dashicons { color: #6b7280; font-size: 14px; width: 14px; height: 14px; flex-shrink: 0; }
.demg-doc-slot-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    cursor: pointer;
    flex-shrink: 0;
    width: 160px;
    border-left: 1px solid #f3f4f6;
    transition: background .15s;
}
.demg-doc-slot-zone:hover { background: #f9fafb; }
.demg-doc-slot-zone--filled { background: #f0fdf4 !important; border-left-color: #bbf7d0; }
.demg-doc-slot--error {
    border-color: #fca5a5;
    background: #fff7f7;
}
.demg-doc-slot--error .demg-doc-slot-label { color: #b91c1c; }
.demg-doc-slot--error .demg-doc-slot-zone { border-left-color: #fecaca; }
.demg-doc-slot-placeholder {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #6b7280;
    white-space: nowrap;
}
.demg-doc-slot-placeholder .dashicons { font-size: 15px; width: 15px; height: 15px; color: #9ca3af; }
.demg-doc-slot-chosen {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #15803d;
    max-width: 100%;
}
.demg-doc-slot-chosen .dashicons { font-size: 15px; width: 15px; height: 15px; color: #16a34a; flex-shrink: 0; }
.demg-doc-slot-filename { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.demg-doc-slot-clear {
    background: none; border: none; cursor: pointer;
    color: #9ca3af; font-size: 1rem; line-height: 1;
    padding: 0 2px; flex-shrink: 0;
}
.demg-doc-slot-clear:hover { color: #dc2626; }
@media (max-width: 480px) {
    .demg-doc-slot { flex-direction: column; }
    .demg-doc-slot-zone { width: 100%; border-left: none; border-top: 1px solid #f3f4f6; justify-content: flex-start; padding-left: 12px; }
}

/* Bannière alerte adhérent */
.demg-cand-alert-adherent {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.83rem;
    color: #92400e;
    font-weight: 500;
    margin-bottom: 16px;
    line-height: 1.4;
}
.demg-cand-alert-adherent .dashicons {
    color: #f59e0b;
    font-size: 17px;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

/* Prérequis candidature */
.demg-cand-prereqs {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.demg-cand-prereqs-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #374151;
    margin-bottom: 10px;
}
.demg-cand-prereqs-header .dashicons { color: #2F2483; font-size: 16px; width: 16px; height: 16px; }
.demg-cand-prereqs-group {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin: 10px 0 6px;
}
.demg-cand-prereqs-list { list-style: none; margin: 0; padding: 0; }
.demg-cand-prereqs-item { margin-bottom: 5px; }
.demg-cand-prereqs-item label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    cursor: pointer;
    font-size: 0.84rem;
    color: #374151;
    line-height: 1.45;
}
.demg-cand-prereqs-item input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    accent-color: #2F2483;
    cursor: pointer;
}
.demg-cand-prereqs-item label:has(input:checked) {
    color: #15803d;
}
.demg-cand-prereqs-item label:has(input:checked) span {
    color: #15803d;
    font-weight: 600;
}
.demg-cand-prereqs-item input[type="checkbox"]:checked {
    accent-color: #16a34a;
}
.demg-cand-prereqs-item.demg-prereq--error label {
    color: #dc2626;
}
.demg-cand-prereqs-item.demg-prereq--error span {
    color: #dc2626;
    font-weight: 600;
}
.demg-cand-prereqs-item.demg-prereq--error input[type="checkbox"] {
    outline: 2px solid #dc2626;
    outline-offset: 1px;
    accent-color: #dc2626;
}

/* Organisme / Family — libellé discret en blanc */
.demg-mandat-fiche .demg-fiche-family {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

/* Titre principal — Barlow Condensed ExtraBold */
.demg-mandat-fiche .demg-fiche-title {
    font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    font-weight: 800;
    font-size: 2.2rem;
    color: #fff !important;
    margin: 6px 0 14px;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

/* Badge catégorie sur fond coloré */
.demg-mandat-fiche .demg-fiche-cat {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.32) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ── Sections principales — accent couleur gauche ── */
.demg-mandat-fiche .demg-fiche-section {
    border-left: 4px solid var(--fiche-color, #2F2483);
    padding-left: 20px;
}

/* Titre de section — Barlow Condensed */
.demg-mandat-fiche .demg-fiche-section-title {
    font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1e293b;
}

.demg-mandat-fiche .demg-fiche-section-title .dashicons {
    color: var(--fiche-color, #2F2483);
}

/* ── Aside — titres Barlow Condensed ── */
.demg-mandat-fiche .demg-fiche-aside-title {
    font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #6b7280;
}

/* Barre de progression titulaires : couleur dynamique */
.demg-mandat-fiche .demg-fiche-seat-bar-fill--tit {
    background: var(--fiche-color, #2563eb);
}

/* ── Bouton Candidater — gradient brand MEDEF ── */
.demg-mandat-fiche .demg-fiche-btn-candidater {
    font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 14px 38px;
    background: linear-gradient(135deg, #2F2483 0%, #662282 100%);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(47, 36, 131, 0.38);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.demg-mandat-fiche .demg-fiche-btn-candidater:hover {
    background: linear-gradient(135deg, #2F2483 0%, #662282 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(47, 36, 131, 0.48);
}

/* ── Lien retour avec couleur dynamique ── */
.demg-mandat-fiche .demg-detail-back {
    color: var(--fiche-color, #2F2483);
}

/* ── Grid page-level : le header couvre les 2 colonnes ── */
.demg-mandat-fiche.demg-detail-page {
    display: grid;
    grid-template-columns: 1fr 300px;
    column-gap: 24px;
    align-items: start;
}

/* Éléments pleine largeur */
.demg-mandat-fiche .demg-detail-back,
.demg-mandat-fiche .demg-fiche-header,
.demg-mandat-fiche .demg-fiche-cta-bar {
    grid-column: 1 / -1;
}

/* Le body devient transparent (ses enfants participent au grid parent) */
.demg-mandat-fiche .demg-fiche-body {
    display: contents;
}

/* Placement explicite des colonnes dans le grid parent */
.demg-mandat-fiche .demg-fiche-main {
    grid-column: 1;
    align-self: start;
}
.demg-mandat-fiche .demg-fiche-aside {
    grid-column: 2;
    align-self: start;
}

/* ── Responsive ── */
@media (max-width: 860px) {
    .demg-mandat-fiche .demg-fiche-title { font-size: 1.7rem; }
    .demg-mandat-fiche .demg-fiche-header { padding: 22px 20px 20px; flex-wrap: wrap; }
    .demg-fiche-header-deco { width: 120px; height: 120px; }
    .demg-fiche-header-actions { width: 100%; justify-content: flex-start; }
    .demg-mandat-fiche.demg-detail-page { grid-template-columns: 1fr; }
    .demg-mandat-fiche .demg-fiche-main,
    .demg-mandat-fiche .demg-fiche-aside { grid-column: 1; }
    .demg-mandat-fiche .demg-fiche-aside { flex-direction: row; flex-wrap: wrap; }
    .demg-mandat-fiche .demg-fiche-aside-card { flex: 1; min-width: 240px; }
}

@media (max-width: 560px) {
    .demg-mandat-fiche .demg-fiche-title { font-size: 1.4rem; }
    .demg-mandat-fiche .demg-fiche-aside-card { min-width: 100%; }
}

/* ── Infos pratiques : layout empilé (label + valeur sur lignes séparées) ──
   Remplace la grille auto/1fr qui compressait les valeurs dans l'aside étroite */
.demg-mandat-fiche .demg-fiche-dl {
    display: flex;
    flex-direction: column;
    margin: 0;
    gap: 0;
}

.demg-mandat-fiche .demg-fiche-dl dt {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9ca3af;
    white-space: normal;
    padding-top: 11px;
    margin-top: 0;
    border-top: 1px solid #f0f2f5;
    padding-bottom: 2px;
    line-height: 1.3;
}

.demg-mandat-fiche .demg-fiche-dl dt:first-of-type {
    padding-top: 0;
    border-top: none;
}

.demg-mandat-fiche .demg-fiche-dl dd {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0;
    padding-bottom: 11px;
    word-break: break-word;
    line-height: 1.45;
}

.demg-mandat-fiche .demg-fiche-dl dd a {
    color: var(--fiche-color, #2F2483);
    word-break: break-all;
    text-decoration: none;
}

.demg-mandat-fiche .demg-fiche-dl dd a:hover {
    text-decoration: underline;
}

/* Badge "En cours" dans le dd reste inline */
.demg-mandat-fiche .demg-fiche-dl .demg-fiche-badge-encours {
    display: inline-block;
    margin-left: 4px;
    vertical-align: middle;
}

/* ── Séparateur "Votre rôle de mandataire" ── */
.demg-fiche-role-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: -4px; /* compense le gap du flex parent */
}

.demg-fiche-role-label .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    color: #9ca3af;
}

/* ── Grille 2 colonnes pour les sections rôle ── */
.demg-fiche-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    align-items: start;
}

/* ═══════════════════════════════════════════════════════
   Fiche Mandat v2 — direction artistique éditoriale
   ═══════════════════════════════════════════════════════ */
.demg-mandat-fiche.demg-detail-page {
    max-width: 1240px;
    padding: 2.25rem 1rem 3.5rem;
    grid-template-columns: minmax(0,1fr) 330px;
    column-gap: 28px;
}

.demg-mandat-fiche .demg-detail-back {
    display: inline-flex;
    gap: 8px;
    width: max-content;
    margin-bottom: 1.5rem;
    color: #2f2483;
    font-size: .92rem;
    font-weight: 800;
}

.demg-mandat-fiche .demg-fiche-header {
    min-height: 350px;
    margin-bottom: 2rem;
    padding: 48px 52px;
    align-items: flex-end;
    border-radius: 28px 84px 28px 28px;
    background:
        radial-gradient(circle at 82% 18%,rgba(239,64,86,.25),transparent 24%),
        linear-gradient(135deg,#241b72 0%,#4b278c 55%,#78278f 100%);
    box-shadow: 0 22px 48px rgba(47,36,131,.22);
}

.demg-mandat-fiche .demg-fiche-header-deco { display:none; }

.demg-fiche-eyebrow {
    display:block;
    margin-bottom:18px;
    color:rgba(255,255,255,.72);
    font-size:.7rem;
    font-weight:850;
    letter-spacing:.22em;
    text-transform:uppercase;
}

.demg-fiche-organism-logo{display:inline-flex;width:74px;height:74px;margin-bottom:14px;padding:9px;align-items:center;justify-content:center;border-radius:16px;background:#fff;box-shadow:0 10px 25px rgba(7,20,38,.16)}
.demg-fiche-organism-logo img{display:block;max-width:100%;max-height:100%;object-fit:contain}

.demg-mandat-fiche .demg-fiche-family {
    color:#fff;
    font-size:.8rem;
    letter-spacing:.12em;
}

.demg-mandat-fiche .demg-fiche-title {
    max-width:760px;
    margin:10px 0 22px;
    font-family:inherit;
    font-size:clamp(2.4rem,5.2vw,4.6rem);
    line-height:1;
    letter-spacing:-.055em;
}

.demg-mandat-fiche .demg-fiche-cat {
    padding:8px 14px;
    border-radius:999px;
    font-size:.7rem;
}

.demg-fiche-hero-art {
    position:absolute !important;
    right:-65px;
    bottom:-135px;
    width:390px;
    height:390px;
    border:2px solid rgba(255,255,255,.2);
    border-radius:50%;
    pointer-events:none;
}

.demg-fiche-hero-art::before,.demg-fiche-hero-art::after,.demg-fiche-hero-art span {
    content:"";
    position:absolute;
    border:2px solid rgba(255,255,255,.13);
    border-radius:50%;
}

.demg-fiche-hero-art::before { inset:52px; }
.demg-fiche-hero-art::after { inset:112px; background:rgba(255,255,255,.05); }
.demg-fiche-hero-art span:first-child { width:34px;height:34px;left:74px;top:42px;background:#ef4056;border:0; }
.demg-fiche-hero-art span:last-child { width:18px;height:18px;left:28px;top:128px;background:#fff;border:0; }

.demg-mandat-fiche .demg-fiche-header-content { position:relative;z-index:2; }
.demg-mandat-fiche .demg-fiche-header-actions { position:relative;z-index:3;width:auto;align-self:flex-start; }
.demg-mandat-fiche .demg-fiche-dl-btn { border-radius:999px;background:#fff;color:#2f2483!important;border-color:#fff; }
.demg-mandat-fiche .demg-fiche-dl-btn:hover { background:#f5f1fb;border-color:#f5f1fb; }

.demg-mandat-fiche .demg-fiche-main { gap:24px; }
.demg-mandat-fiche .demg-fiche-section {
    position:relative;
    overflow:hidden;
    padding:32px 36px;
    border:1px solid #e9e7f1;
    border-left:1px solid #e9e7f1;
    border-radius:20px;
    box-shadow:0 12px 30px rgba(7,20,38,.06);
}

.demg-mandat-fiche .demg-fiche-section::before {
    content:"";
    position:absolute;
    top:0;
    left:36px;
    width:54px;
    height:4px;
    border-radius:0 0 999px 999px;
    background:#ef4056;
}

.demg-mandat-fiche .demg-fiche-section-title {
    margin-bottom:18px;
    padding-bottom:14px;
    color:#071426;
    font-family:inherit;
    font-size:1.18rem;
    letter-spacing:-.015em;
    text-transform:none;
}

.demg-mandat-fiche .demg-fiche-text { color:#525a6b;font-size:.98rem;line-height:1.8; }
.demg-mandat-fiche .demg-fiche-aside { position:sticky;top:28px;gap:18px; }
.demg-mandat-fiche .demg-fiche-aside-card {
    padding:24px;
    border:1px solid #e6e3ef;
    border-radius:18px;
    box-shadow:0 12px 28px rgba(7,20,38,.06);
}
.demg-mandat-fiche .demg-fiche-aside-card--seats {
    color:#fff;
    border:0;
    background:linear-gradient(150deg,#2f2483,#67238f);
    box-shadow:0 18px 36px rgba(47,36,131,.2);
}
.demg-mandat-fiche .demg-fiche-aside-card--seats .demg-fiche-aside-title { color:#fff;border-color:rgba(255,255,255,.16); }
.demg-mandat-fiche .demg-fiche-seat-row { border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.1); }
.demg-mandat-fiche .demg-fiche-seat-role,.demg-mandat-fiche .demg-fiche-seat-num { color:#fff; }
.demg-mandat-fiche .demg-fiche-cta-bar { margin-top:30px;padding:34px;border-radius:22px 54px 22px 22px;background:#f5f1fb; }

@media(max-width:860px){
    .demg-mandat-fiche.demg-detail-page{grid-template-columns:1fr}
    .demg-mandat-fiche .demg-fiche-header{min-height:310px;padding:38px 30px;align-items:flex-start}
    .demg-mandat-fiche .demg-fiche-title{font-size:clamp(2.25rem,9vw,3.5rem)}
    .demg-mandat-fiche .demg-fiche-header-actions{width:100%}
    .demg-mandat-fiche .demg-fiche-aside{position:static}
}

@media(max-width:560px){
    .demg-mandat-fiche.demg-detail-page{padding-top:1.25rem}
    .demg-mandat-fiche .demg-fiche-header{padding:32px 24px 38px;border-radius:22px 52px 22px 22px}
    .demg-mandat-fiche .demg-fiche-section{padding:28px 22px}
    .demg-mandat-fiche .demg-fiche-section::before{left:22px}
    .demg-mandat-fiche .demg-fiche-dl-btn{width:100%;justify-content:center}
}

/* Hero mandat v4 — bandeau compact, sans hauteur décorative superflue */
.demg-mandat-fiche .demg-fiche-header {
    display:block;
    min-height:0 !important;
    height:fit-content;
    align-self:start;
    padding:28px 34px 30px;
    border-radius:24px 58px 24px 24px;
}
.demg-fiche-hero-topbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    margin-bottom:22px;
}
.demg-fiche-hero-topbar .demg-fiche-eyebrow { margin-bottom:0; }
.demg-fiche-hero-main {
    display:grid;
    grid-template-columns:minmax(0,1fr) 220px;
    align-items:center;
    gap:clamp(26px,3vw,44px);
    max-width:none;
    margin:0;
    padding:0 0 0 3%;
}
.demg-fiche-hero-identity {
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:10px;
    position:relative;
    z-index:2;
}
.demg-fiche-hero-identity .demg-fiche-organism-logo {
    width:84px;
    height:84px;
    margin:0;
    padding:12px;
    border-radius:16px;
}
.demg-fiche-hero-identity .demg-fiche-family {
    max-width:220px;
    font-size:.74rem;
    line-height:1.35;
    text-align:right;
}
.demg-fiche-hero-main .demg-fiche-header-content { max-width:820px; }
.demg-mandat-fiche .demg-fiche-hero-main .demg-fiche-title {
    max-width:820px;
    margin:0 0 18px;
    font-family:"Outfit",sans-serif;
    font-size:clamp(2rem,2.9vw,3.35rem);
    font-weight:700;
    line-height:1.04;
    letter-spacing:-.025em;
    text-wrap:balance;
}
.demg-fiche-hero-main .demg-fiche-cat-wrap { margin:0; }
.demg-mandat-fiche .demg-fiche-dl-btn { padding:10px 18px; }
.demg-mandat-fiche .demg-fiche-cat { padding:7px 13px; }
.demg-mandat-fiche .demg-fiche-hero-art {
    position:absolute;
    right:-70px;
    bottom:-125px;
    width:260px;
    height:260px;
    opacity:.72;
}
.demg-mandat-fiche .demg-fiche-hero-art::before { inset:38px; }
.demg-mandat-fiche .demg-fiche-hero-art::after { inset:82px; }
.demg-mandat-fiche .demg-fiche-hero-art span:first-child { width:26px;height:26px;left:48px;top:30px; }
.demg-mandat-fiche .demg-fiche-hero-art span:last-child { width:14px;height:14px;left:20px;top:92px; }

@media(max-width:860px){
    .demg-mandat-fiche .demg-fiche-header{min-height:0;padding:26px 26px 30px}
    .demg-fiche-hero-topbar{align-items:flex-start;margin-bottom:26px}
    .demg-fiche-hero-main{grid-template-columns:minmax(0,1fr) 150px;gap:24px;padding:0}
    .demg-fiche-hero-identity .demg-fiche-organism-logo{width:78px;height:78px;padding:11px;border-radius:15px}
    .demg-mandat-fiche .demg-fiche-hero-main .demg-fiche-title{font-size:clamp(2rem,6vw,3rem)}
}
@media(max-width:560px){
    .demg-mandat-fiche .demg-fiche-header{padding:24px 20px 28px}
    .demg-fiche-hero-topbar{flex-direction:column;gap:16px;margin-bottom:24px}
    .demg-fiche-hero-main{display:flex;flex-direction:column;align-items:stretch}
    .demg-fiche-hero-identity{order:-1;flex-direction:row;align-items:center;align-self:flex-end;gap:14px;margin-bottom:20px}
    .demg-fiche-hero-identity .demg-fiche-organism-logo{width:68px;height:68px;padding:10px;border-radius:14px}
    .demg-fiche-hero-identity .demg-fiche-family{max-width:none}
    .demg-mandat-fiche .demg-fiche-hero-main .demg-fiche-title{font-size:clamp(1.85rem,9vw,2.65rem);line-height:1.05}
}
