/* ════════════════════════════════════════════════════════════════
   EDUCATED — « MA SOUTENANCE » EN CARTE

   Rien ici ne s'applique tant que soutenance-cards.js n'a pas posé la
   classe .edf-cards sur la grille. Script retiré ou coupé
   (window.EDUCATED_SOUTENANCE_CARDS = false), la grille XAF revient
   exactement comme avant.

   Le tableau RESTE un tableau : la carte vit dans la cellule de
   l'intitulé, qui s'étend sur toute la largeur ; les autres cellules
   sont masquées. Et ici la ligne n'est PAS cliquable — c'est un
   listing, le clic est coupé côté serveur.
   ════════════════════════════════════════════════════════════════ */


/* ── Ce qui disparaît ───────────────────────────────────────────── */

.edf-cards thead {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.edf-cards tbody tr > td:not(.edf-host) {
    display: none !important;
}

.edf-cards tr.dxbl-grid-empty-row {
    display: none !important;
}

.edf-cards,
.edf-cards table {
    border: 0 !important;
    background: transparent !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.edf-cards tbody tr {
    background: transparent !important;
    /* Le clic n'ouvre rien : le curseur ne doit pas promettre le contraire. */
    cursor: default !important;
}


/* ── La largeur suit la fenêtre ─────────────────────────────────── */

.edf-cards colgroup col { width: auto !important; }

.edf-cards table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
}

.edf-cards { overflow-x: hidden !important; }


/* ── La cellule qui porte la carte ──────────────────────────────── */

/* La classe est répétée pour peser plus lourd que grid.css, qui cible
   td.xaf-action avec ses propres !important. Entre deux !important,
   c'est le plus spécifique qui gagne. */
.edf-cards td.edf-host.edf-host.edf-host {
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    white-space: normal !important;
}

.edf-cards td.edf-host > *:not(.edf-card) {
    display: none !important;
}


/* ── La carte ───────────────────────────────────────────────────── */

.edf-cards .edf-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 18px;
    margin: 0 0 12px;
    padding: 17px 19px;
    background: var(--surface-1, #FFFFFF);
    border: 1px solid var(--line, #E5E7EB);
    border-left: 3px solid var(--ink-4, #CBD5E1);
    border-radius: 13px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    font-family: "Geist", "Public Sans", system-ui, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-1, #1E293B);
    text-align: left;
}

/* Le filet gauche dit l'état avant toute lecture. */
.edf-cards .edf-card.edf-publiee { border-left-color: var(--success, #059669); }
.edf-cards .edf-card.edf-attente-aff { border-left-color: var(--ink-4, #CBD5E1); }


/* ── Le bloc date — l'information dominante ─────────────────────── */

.edf-cards .edf-when {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
    min-width: 64px;
    padding: 9px 10px 10px;
    background: var(--brand-soft-2, #EEEBFF);
    border-radius: 11px;
    align-self: start;
}

.edf-cards .edf-d {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.05;
    color: var(--brand, #4F46E5);
    font-variant-numeric: tabular-nums;
}

.edf-cards .edf-m {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand, #4F46E5);
}

.edf-cards .edf-h {
    margin-top: 5px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-1, #1E293B);
    font-variant-numeric: tabular-nums;
}

.edf-cards .edf-when.edf-vide { background: var(--surface-3, #F3F5F9); }
.edf-cards .edf-when.edf-vide .edf-q {
    font-size: 21px;
    font-weight: 700;
    color: var(--ink-4, #CBD5E1);
    line-height: 1.3;
}


/* ── Le corps ───────────────────────────────────────────────────── */

.edf-cards .edf-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.edf-cards .edf-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink-0, #0F172A);
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.edf-cards .edf-facts { display: flex; flex-wrap: wrap; gap: 6px; }

.edf-cards .edf-fact {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--ink-2, #475569);
    background: var(--surface-3, #F3F5F9);
    border-radius: 20px;
    padding: 4px 11px;
    min-width: 0;
}

.edf-cards .edf-fact b {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-3, #94A3B8);
}

.edf-cards .edf-fact .edf-v {
    font-weight: 600;
    color: var(--ink-1, #1E293B);
    overflow-wrap: anywhere;
}

.edf-cards .edf-fact.edf-salle .edf-v {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
}


/* ── Le président ───────────────────────────────────────────────── */

.edf-cards .edf-jury {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 1px;
}

.edf-cards .edf-jury-h {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-3, #94A3B8);
    margin-bottom: 2px;
}

.edf-cards .edf-member {
    display: flex;
    align-items: baseline;
    gap: 9px;
    flex-wrap: wrap;
    font-size: 13px;
}

.edf-cards .edf-role {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--surface-3, #F3F5F9);
    color: var(--ink-3, #94A3B8);
    white-space: nowrap;
}

.edf-cards .edf-role.edf-pres {
    background: var(--brand-soft-2, #EEEBFF);
    color: var(--brand, #4F46E5);
}

.edf-cards .edf-member .edf-n {
    color: var(--ink-1, #1E293B);
    font-weight: 600;
}


/* ── Le résultat ────────────────────────────────────────────────── */

.edf-cards .edf-result {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    align-self: flex-start;
    max-width: 100%;
    margin-top: 3px;
    padding: 11px 14px;
    border-radius: 11px;
    background: var(--success-soft, #D0F4E2);
}

.edf-cards .edf-note {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 21px;
    font-weight: 700;
    color: var(--success, #059669);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.edf-cards .edf-sur {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--success, #059669);
    opacity: .7;
}

.edf-cards .edf-mention {
    font-size: 13px;
    font-weight: 700;
    color: var(--success, #059669);
}

/* Publié mais pas encore noté : gris, pas vert. Un 0/20 affiché par
   erreur serait faux et brutal. */
.edf-cards .edf-result.edf-attente { background: var(--surface-3, #F3F5F9); }
.edf-cards .edf-result.edf-attente .edf-lbl {
    font-size: 13px;
    color: var(--ink-2, #475569);
}


/* ── En attente d'affectation ───────────────────────────────────── */

.edf-cards .edf-badge {
    align-self: flex-start;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .05em;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--warning-soft, #FBE9CC);
    color: var(--warning, #B45309);
}


/* ── La barre de l'écran ────────────────────────────────────────── */

.edf-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2px 0 16px 6px;
}

.edf-bar-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.edf-h1 {
    font-family: "Geist", system-ui, sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ink-0, #0F172A);
}

.edf-total {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-3, #94A3B8);
    background: var(--surface-3, #F3F5F9);
    border-radius: 20px;
    padding: 3px 9px;
    font-variant-numeric: tabular-nums;
}


/* ── Étroit ─────────────────────────────────────────────────────── */

@media (max-width: 560px) {
    .edf-cards .edf-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px 15px;
    }
    .edf-cards .edf-when {
        grid-row: auto;
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
    }
    .edf-cards .edf-h { margin-top: 0; }
}
