/* ============================================================
   WEDORIA THÈME « RAIL » — 2026-10
   Chargé EN DERNIER (après app.css, shell.css, lists.css, dashboard.css,
   details.css…). Il remplace la charte ivoire/onyx/or de l'été par la
   direction retenue le 22/10/2026 : blanc, sans-serif uniquement, noir,
   un seul accent jaune réservé aux pastilles et aux soulignés, blocs
   délimités par des cadres fins.

   Principe : on ne retouche pas les feuilles précédentes, on redéfinit
   leurs tokens ici — toute l'application bascule d'un coup — puis on
   ajoute les composants nouveaux (rail, accueil) avec le préfixe wd-rail /
   wd-home. Les sélecteurs de géométrie reprennent exactement ceux de
   shell.css (dont les variantes :has() à ID) pour gagner la cascade.
   ============================================================ */

:root {
    /* Neutres — blanc dominant, gris uniquement sur ce que l'on touche */
    --wd-ivoire:      #FFFFFF;
    --wd-papier:      #F6F3EE;   /* surfaces touchées : gris chaud, pas gris froid */
    --wd-fumee:       #EDE8E0;
    --wd-filet:       #E7E2DA;
    --wd-fumee-fonce: #736C63;
    --wd-onyx:        #1B1816;   /* noir chaud */

    /* L'« or » historique devient le noir : boutons, liens, états actifs */
    --wd-or:          #1B1816;
    --wd-or-profond:  #1B1816;
    --wd-or-pale:     #DDD6CB;
    --wd-gold-wash:   #F6F3EE;

    /* Le seul accent : un or chaud (celui du logo, un ton plus vif), en
       pastilles, soulignés et jauges uniquement — jamais en aplat */
    --wd-jaune:       #C9A063;
    --wd-jaune-pale:  #F6EBDA;

    --ep-text-muted:  #8E867C;
    --ep-bg-surface:  #FFFFFF;

    /* Typographie — sans-serif seulement : Instrument Sans texte, Geist titres */
    --wd-font-display: 'Geist', 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --wd-font-serif:   'Geist', 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --wd-font-sans:    'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ep-font-family:  var(--wd-font-sans);

    /* Filets, ombres, rayons */
    --wd-hairline:    #E7E2DA;
    --wd-hairline-2:  #D8D1C6;
    --wd-shadow-soft: none;
    --wd-shadow-lift: 0 10px 30px -14px rgba(0, 0, 0, 0.18);
    --ep-shadow-sm:   none;
    --ep-shadow-md:   0 6px 20px -12px rgba(0, 0, 0, 0.16);
    --wd-r-card:  18px;
    --wd-r-panel: 14px;
    --wd-r-ctl:   10px;
    --wd-r-chip:  8px;

    /* Statuts : teintes pâles + texte plein */
    --wd-st-ok:        #2F7A4E; --wd-st-ok-bg:     #E7F3EA;
    --wd-st-warn:      #9A6A1E; --wd-st-warn-bg:   #FBF0DA;
    --wd-st-danger:    #B0392E; --wd-st-danger-bg: #FBE9E5;
    --wd-st-info:      #4A5D8A; --wd-st-info-bg:   #ECEFF7;
    --wd-st-mute:      #736C63; --wd-st-mute-bg:   #F1EDE6;

    /* Rail : une seule largeur, plus de mode replié */
    --wd-side-w:      84px;
    --wd-side-w-rail: 84px;
}

body { background: #FFFFFF; }

/* ── Typographie ────────────────────────────────────────────── */
h1, h2, h3, .wd-display, .wd-page-title, .wd-dashboard-greeting {
    font-family: var(--wd-font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}
/* Fin des capitales espacées : l'eyebrow devient une simple ligne grise */
.wd-eyebrow {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ep-text-secondary);
}
.wd-page-title { font-size: 1.75rem; }

/* ── Icônes Material Symbols Rounded ───────────────────────── */
.ms {
    font-family: 'Material Symbols Rounded';
    font-weight: 400;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    display: inline-block;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.ms-fill, .ms.is-fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* ── Boutons : une forme, rayon 10, noir ───────────────────── */
.btn-primary, .wd-create-btn, .wd-setup-step-cta.is-primary {
    background: var(--wd-onyx);
    border-color: var(--wd-onyx);
    color: #FFFFFF;
    border-radius: var(--wd-r-ctl) !important;
    box-shadow: none;
}
.btn-primary:hover, .wd-create-btn:hover { background: #000000; border-color: #000000; color: #FFFFFF; }
.wd-create-btn .wd-create-plus { transition: transform 300ms var(--wd-ease); }
.wd-create-btn:hover .wd-create-plus { transform: rotate(90deg); }
.wd-create-btn { padding: 0 0.95rem; height: 36px; font-weight: 500; }
.wd-create-plus { background: transparent; color: #FFFFFF; width: auto; height: auto; }

/* ============================================================
   RAIL — menu latéral de 84 px, icônes + libellés
   ============================================================ */
@media (min-width: 768px) {
    #sidebar.wd-rail {
        width: var(--wd-side-w);
        background: #FFFFFF;
        border-right: 1px solid var(--wd-hairline);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 14px 0 12px;
        gap: 2px;
        overflow: visible;
        transition: none;
    }
    /* Topbar : collée au rail, hairline du rail au bord droit */
    .ep-topbar.fixed-top,
    body.ep-sidebar-hidden .ep-topbar.fixed-top,
    body:has(#sidebar.ep-sidebar-collapsed) .ep-topbar.fixed-top,
    body:has(#sidebar:not(.ep-sidebar-collapsed)) .ep-topbar.fixed-top {
        left: 0;
        background: #FFFFFF;
        padding: 0 2rem 0 calc(var(--wd-side-w) + 2rem);
        transition: none;
    }
    .ep-topbar.fixed-top::after,
    body.ep-sidebar-hidden .ep-topbar.fixed-top::after {
        left: var(--wd-side-w);
        right: 0;
        transition: none;
    }
    .ep-main-content,
    body.ep-sidebar-hidden .ep-main-content,
    body:has(#sidebar.ep-sidebar-collapsed) .ep-main-content {
        margin-left: var(--wd-side-w);
        padding: 2.4rem 3rem 3.5rem;
        transition: none;
    }
}
.wd-rail-mark {
    height: 40px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    flex: none;
}
.wd-rail-mark img { height: 26px; width: auto; display: block; }
.wd-rail-item {
    width: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 0 7px;
    border-radius: 12px;
    font-family: var(--wd-font-sans);
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.15;
    color: var(--ep-text-secondary);
    text-decoration: none;
    position: relative;
    border: 0;
    background: none;
    cursor: pointer;
    flex: none;
    transition: color 150ms var(--wd-ease);
}
.wd-rail-item .wd-rail-ic {
    width: 40px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease), transform 200ms var(--wd-ease);
}
.wd-rail-item:hover { color: var(--wd-onyx); }
.wd-rail-item:hover .wd-rail-ic { background: var(--wd-papier); }
.wd-rail-item:active .wd-rail-ic { transform: scale(0.94); }
.wd-rail-item.active { color: var(--wd-onyx); font-weight: 600; }
.wd-rail-item.active .wd-rail-ic { background: var(--wd-onyx); color: #FFFFFF; }
.wd-rail-item.active .ms { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.wd-rail-item:focus-visible { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-rail-item.show .wd-rail-ic { background: var(--wd-papier); }
.wd-rail-dot {
    position: absolute;
    top: 4px;
    right: 11px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wd-jaune);
    border: 2px solid #FFFFFF;
    box-sizing: content-box;
}
.wd-rail-gap { height: 10px; flex: none; }
.wd-rail-foot { margin-top: auto; flex: none; }
.wd-rail-foot .wd-rail-item { padding: 6px 0; }
.wd-rail-foot .ep-avatar {
    width: 34px;
    height: 34px;
    background: var(--wd-onyx);
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 50%;
    margin: 0;
}
/* Menus flottants du rail (« Plus », profil) : à droite du rail */
#sidebar.wd-rail .dropdown-menu {
    min-width: 230px;
    border-radius: var(--wd-r-panel);
    border: 1px solid var(--wd-hairline);
    box-shadow: var(--wd-shadow-lift);
    padding: 0.4rem;
}
#sidebar.wd-rail .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
#sidebar.wd-rail .dropdown-item .ms { font-size: 20px; color: var(--ep-text-secondary); }
#sidebar.wd-rail .dropdown-item:hover { background: var(--wd-papier); }
#sidebar.wd-rail .dropdown-item.wd-menu-danger { color: var(--ep-danger); }
#sidebar.wd-rail .wd-menu-eyebrow {
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ep-text-muted);
    padding: 0.35rem 0.65rem 0;
}

/* ── Topbar : recherche + Créer + cloche ─────────────────────── */
.ep-topbar .wd-side-toggle { display: none !important; }
.ep-topbar-search { max-width: 380px; width: 380px; }
.ep-topbar-search .form-control {
    background: #FFFFFF;
    border: 1px solid var(--wd-hairline);
    border-radius: var(--wd-r-ctl);
}
.ep-topbar-search .form-control:hover,
.ep-topbar-search .form-control:focus { border-color: var(--wd-hairline-2); box-shadow: none; }
.ep-notification-bell { color: var(--ep-text-secondary); }
.ep-notification-badge { background: var(--wd-jaune); color: var(--wd-onyx); }

/* ── Tab bar mobile : mêmes icônes, FAB carré noir ───────────── */
.wd-tabbar { background: rgba(255, 255, 255, 0.92); }
.wd-tab { font-size: 0.62rem; font-weight: 500; gap: 3px; }
.wd-tab .ms { font-size: 24px; width: 40px; height: 30px; display: grid; place-items: center; border-radius: 10px; }
.wd-tab.active { color: var(--wd-onyx); font-weight: 600; }
.wd-tab.active .ms {
    background: var(--wd-onyx);
    color: #FFFFFF;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.wd-tab-fab {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--wd-onyx);
    color: #FFFFFF;
    box-shadow: none;
    margin-top: -22px;
}
.wd-tab-fab .ms { color: #FFFFFF; font-size: 26px; background: none; width: auto; height: auto; }
.wd-sheet-item .ms { font-size: 22px; color: var(--ep-text-secondary); width: 24px; }

/* ── Bannière « premiers pas » : une ligne, repliée dans le flux ── */
.wd-setup-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--wd-jaune-pale);
    color: var(--wd-onyx);
    font-size: 0.86rem;
    margin-bottom: 1.6rem;
}
.wd-setup-bar b { font-weight: 600; }
.wd-setup-bar .wd-setup-bar-hint { color: #5E4A00; }
.wd-setup-bar a {
    margin-left: auto;
    color: var(--wd-onyx);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--wd-jaune);
}

/* ============================================================
   ACCUEIL — trois blocs : prochain événement, aujourd'hui, à venir
   ============================================================ */
.wd-home { display: flex; flex-direction: column; gap: 28px; }
.wd-home-greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.wd-home-greet h1 { font-size: 1.9rem; line-height: 1.05; margin: 0 0 6px; }
.wd-home-sub { margin: 0; color: var(--ep-text-secondary); font-size: 0.92rem; }

/* Carte du prochain événement */
.wd-home-next {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 24px;
    align-items: center;
    padding: 22px 24px;
    border: 1px solid var(--wd-hairline);
    border-radius: var(--wd-r-card);
    color: inherit;
    text-decoration: none;
    transition: background 150ms var(--wd-ease), border-color 150ms var(--wd-ease);
}
a.wd-home-next:hover { background: #FFFFFF; border-color: var(--wd-hairline-2); color: inherit; }
.wd-home-next-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.wd-home-av {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    overflow: hidden;
    flex: none;
    background: var(--wd-jaune-pale);
    display: grid;
    place-items: center;
    font-family: var(--wd-font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--wd-onyx);
}
.wd-home-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-home-kicker { font-size: 0.8rem; color: var(--ep-text-secondary); margin-bottom: 3px; }
.wd-home-next h2 { font-size: 1.5rem; line-height: 1.1; margin: 0 0 4px; }
.wd-home-next-meta { margin: 0; color: var(--ep-text-secondary); font-size: 0.86rem; }
.wd-home-count { display: flex; align-items: baseline; gap: 6px; }
.wd-home-count b {
    font-family: var(--wd-font-display);
    font-size: 2.75rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.wd-home-count span { font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-home-chips {
    grid-column: 1 / -1;
    list-style: none;
    margin: 6px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--wd-hairline);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.wd-home-chips li {
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--wd-papier);
    font-size: 0.8rem;
    color: var(--ep-text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.wd-home-chips li b { color: var(--wd-onyx); font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-home-chips li.wd-home-chip-link {
    background: transparent;
    color: var(--wd-onyx);
    font-weight: 500;
    margin-left: auto;
    padding-right: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--wd-jaune);
}
/* Invitation quand il n'y a pas encore d'événement daté */
.wd-home-empty {
    border: 1px dashed var(--wd-hairline-2);
    border-radius: var(--wd-r-card);
    padding: 26px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    color: inherit;
    text-decoration: none;
}
.wd-home-empty:hover { background: #FFFFFF; color: inherit; box-shadow: 0 14px 32px -22px rgba(27, 24, 22, 0.35); }
.wd-home-empty h2 { font-size: 1.2rem; margin: 0 0 3px; }
.wd-home-empty p { margin: 0; color: var(--ep-text-secondary); font-size: 0.88rem; }

/* Deux panneaux : aujourd'hui / à venir */
.wd-home-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; }
.wd-home-panel {
    border: 1px solid var(--wd-hairline);
    border-radius: var(--wd-r-card);
    padding: 20px 24px 20px;
    min-width: 0;
}
.wd-home-panel h3 {
    font-size: 0.98rem;
    margin: 0 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.wd-home-panel h3 a {
    font-family: var(--wd-font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--wd-onyx);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--wd-jaune);
}
.wd-home-list { list-style: none; margin: 0; padding: 0; }
.wd-home-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--wd-hairline);
    font-size: 0.9rem;
}
.wd-home-list li:last-child { border-bottom: 0; }
.wd-home-list li > a.wd-home-row, .wd-home-list li > .wd-home-row { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.wd-home-list b { font-weight: 600; display: block; font-size: 0.9rem; }
.wd-home-list small { color: var(--ep-text-secondary); font-size: 0.8rem; display: block; margin-top: 1px; }
.wd-home-list .wd-home-empty-row { color: var(--ep-text-secondary); font-size: 0.86rem; padding: 4px 0; }
.wd-home-box {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--wd-hairline-2);
    border-radius: 6px;
    flex: none;
    cursor: pointer;
    background: none;
    padding: 0;
    transition: background 150ms var(--wd-ease), border-color 150ms var(--wd-ease), transform 200ms var(--wd-ease);
}
.wd-home-box:hover { border-color: var(--wd-onyx); }
.wd-home-box.is-done { background: var(--wd-onyx); border-color: var(--wd-onyx); transform: scale(1.06); }
.wd-home-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wd-jaune); flex: none; }
.wd-home-j {
    font-size: 0.8rem;
    color: var(--ep-text-secondary);
    font-variant-numeric: tabular-nums;
    background: var(--wd-papier);
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}
.wd-home-fin { margin: 0; font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-home-fin b { color: var(--wd-onyx); font-weight: 600; }
.wd-home-fin a {
    color: var(--wd-onyx);
    font-weight: 500;
    margin-left: 6px;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--wd-jaune);
}

/* Statuts : étiquette pâle */
.wd-st {
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    background: var(--wd-st-mute-bg);
    color: var(--wd-st-mute);
}
.wd-st-ok     { background: var(--wd-st-ok-bg);     color: var(--wd-st-ok); }
.wd-st-warn   { background: var(--wd-st-warn-bg);   color: var(--wd-st-warn); }
.wd-st-danger { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-st-info   { background: var(--wd-st-info-bg);   color: var(--wd-st-info); }

@media (max-width: 991.98px) {
    .wd-home-cols { grid-template-columns: 1fr; gap: 20px; }
    .wd-home { gap: 20px; }
}
@media (max-width: 767.98px) {
    .wd-home-greet h1 { font-size: 1.6rem; }
    .wd-home-next { padding: 18px; gap: 8px 14px; }
    .wd-home-next h2 { font-size: 1.2rem; }
    .wd-home-av { width: 52px; height: 52px; border-radius: 18px; }
    .wd-home-count b { font-size: 2.1rem; }
    .wd-home-chips li.wd-home-chip-link { margin-left: 0; }
    .wd-home-panel { padding: 18px 18px 16px; }
    .ep-main-content { padding-left: 1.1rem; padding-right: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-rail-item, .wd-rail-item .wd-rail-ic, .wd-home-box, .wd-home-next { transition: none; }
}

/* ── Topbar mobile : avatar compact ─────────────────────────── */
.ep-topbar .ep-avatar {
    width: 32px;
    height: 32px;
    margin: 0;
    background: var(--wd-onyx);
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
@media (max-width: 767.98px) {
    .wd-setup-bar .wd-setup-bar-hint { display: none; }
    .wd-setup-bar a { margin-left: auto; }
}

/* ============================================================
   MICRO-ANIMATIONS — le côté ludique, sans jouet.
   Tout est court (150-450 ms), une courbe unique, et s'éteint sous
   prefers-reduced-motion. Rien ne bouge en boucle, sauf la pastille
   qui respire pour dire « quelque chose attend ».
   ============================================================ */
@keyframes wd-breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: 0.55; } }
@keyframes wd-tick-pop { 0% { transform: scale(0.8); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes wd-check-draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes wd-bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes wd-rise-soft { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Rail : l'icône se soulève au survol, se tasse au clic, la pastille respire */
.wd-rail-item .wd-rail-ic { transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease), transform 260ms var(--wd-ease); }
.wd-rail-item:hover .wd-rail-ic { transform: translateY(-2px); }
.wd-rail-item:active .wd-rail-ic { transform: translateY(0) scale(0.92); transition-duration: 90ms; }
.wd-rail-item .ms { transition: transform 260ms var(--wd-ease); }
.wd-rail-item:hover .ms { transform: scale(1.08); }
.wd-rail-dot { animation: wd-breathe 2.8s var(--wd-ease) infinite; transform-origin: center; }

/* Accueil : les blocs montent l'un après l'autre */
.wd-home > * { animation: wd-rise-soft 520ms var(--wd-ease) backwards; }
.wd-home > *:nth-child(2) { animation-delay: 60ms; }
.wd-home > *:nth-child(3) { animation-delay: 120ms; }
.wd-home > *:nth-child(4) { animation-delay: 180ms; }
html.wd-no-page-enter .wd-home > *, html[data-turbo-preview] .wd-home > * { animation: none; }

/* La une : la photo se soulève avec la carte, la flèche glisse */
a.wd-home-next { transition: background 180ms var(--wd-ease), border-color 180ms var(--wd-ease), transform 260ms var(--wd-ease), box-shadow 260ms var(--wd-ease); }
a.wd-home-next:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -22px rgba(27, 24, 22, 0.35); }
.wd-home-av { transition: transform 320ms var(--wd-ease); }
a.wd-home-next:hover .wd-home-av { transform: rotate(-3deg) scale(1.04); }
.wd-home-chip-link { transition: letter-spacing 200ms var(--wd-ease); }
a.wd-home-next:hover .wd-home-chip-link { letter-spacing: 0.01em; }

/* Repères : une jauge de 2 px se remplit sous chaque chip */
.wd-home-chips li { position: relative; overflow: hidden; transition: transform 200ms var(--wd-ease), background 200ms var(--wd-ease); }
.wd-home-chips li[style*="--v"]::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--wd-jaune) var(--v), transparent var(--v));
    transform-origin: left center;
    animation: wd-bar-grow 900ms 350ms var(--wd-ease) backwards;
}
a.wd-home-next:hover .wd-home-chips li:not(.wd-home-chip-link) { transform: translateY(-1px); }

/* Lignes : un voile chaud au survol, la coche rebondit et se dessine */
.wd-home-list li { transition: background 150ms var(--wd-ease); margin: 0 -10px; padding: 12px 12px; border-radius: 12px; }
.wd-home-list li:has(.wd-home-empty-row):hover { background: transparent; }
.wd-home-list li:hover { background: #F9F7F3; }
.wd-home-list li:hover:has(.wd-home-empty-row) { background: transparent; }
.wd-home-box { position: relative; }
.wd-home-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5l3 3 6-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 12px no-repeat;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 150ms var(--wd-ease), transform 220ms var(--wd-ease);
}
.wd-todo.done .wd-home-box { background: var(--wd-onyx); border-color: var(--wd-onyx); animation: wd-tick-pop 320ms var(--wd-ease); }
.wd-todo.done .wd-home-box::after { opacity: 1; transform: scale(1); }
.wd-todo .wd-home-row, .wd-todo .wd-st { transition: opacity 250ms var(--wd-ease), text-decoration-color 250ms var(--wd-ease); }
.wd-todo.done .wd-home-row { opacity: 0.45; text-decoration: line-through; text-decoration-color: var(--wd-onyx); }
.wd-todo.done .wd-st { opacity: 0.35; }

/* Liens soulignés : le trait s'épaissit au survol */
.wd-home-panel h3 a, .wd-home-fin a, .wd-setup-bar a {
    transition: text-decoration-thickness 150ms var(--wd-ease), text-underline-offset 150ms var(--wd-ease);
}
.wd-home-panel h3 a:hover, .wd-home-fin a:hover, .wd-setup-bar a:hover { text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* Tab bar mobile : l'icône active rebondit à l'arrivée */
.wd-tab.active .ms { animation: wd-tick-pop 380ms var(--wd-ease); }

@media (prefers-reduced-motion: reduce) {
    .wd-rail-dot, .wd-home > *, .wd-home-chips li::after, .wd-todo.done .wd-home-box, .wd-tab.active .ms { animation: none !important; }
    .wd-rail-item .wd-rail-ic, .wd-rail-item .ms, a.wd-home-next, .wd-home-av, .wd-home-chips li { transition: none !important; transform: none !important; }
}

/* ============================================================
   REGISTRES — les listes (Clients, Événements, Devis, Factures…)
   Une ligne par dossier : première colonne sur deux lignes, statut en
   étiquette pâle, 4 à 6 colonnes, cadre fin, pas de pied ni de ligne
   d'ajout. L'en-tête de page porte le titre, le compte et les outils
   sur une seule ligne. Les templates posent `wd-reg` sur le board.
   ============================================================ */

/* En-tête de registre : titre · compte | outils | + Nouveau */
.wd-page-header .wd-eyebrow { display: none; }
.wd-page-header.wd-reg-head {
    align-items: center;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1.1rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.wd-reg-head .wd-page-title { font-size: 1.75rem; margin: 0; display: flex; align-items: baseline; gap: 0.5rem; }
.wd-reg-count {
    font-family: var(--wd-font-sans);
    font-weight: 400;
    font-size: 1rem;
    color: var(--ep-text-muted);
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}
.wd-reg-head .board-toolbar { margin: 0; padding: 0; gap: 6px; margin-left: auto; }
.wd-reg-head .board-toolbar-separator { display: none; }
.board-toolbar-add {
    order: 10;
    /* !important : shell.css arrondit encore ce bouton en pilule (999px !important) */
    border-radius: var(--wd-r-ctl) !important;
    background: var(--wd-onyx);
    color: #FFFFFF;
    padding: 0 14px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 500;
    box-shadow: none;
    margin-left: 6px;
}
.board-toolbar-add:hover { background: #000; color: #fff; transform: translateY(-1px); box-shadow: none; }
.board-toolbar-add i { color: #FFFFFF; }
.board-toolbar-search { height: 36px; border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-ctl); padding: 0 10px 0 6px; }
.board-toolbar-search input { border: none; background: transparent; height: 34px; font-size: 0.84rem; }
.board-toolbar-item {
    height: 36px;
    border: 1px solid var(--wd-hairline);
    border-radius: var(--wd-r-ctl);
    background: #fff;
    padding: 0 12px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--ep-text-secondary);
    display: inline-flex; align-items: center; gap: 6px;
}
.board-toolbar-item:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.board-toolbar-views {
    display: inline-flex;
    background: var(--wd-papier);
    border-radius: var(--wd-r-ctl);
    padding: 3px;
    gap: 2px;
}
.board-toolbar-view {
    height: 30px; padding: 0 12px;
    border-radius: 8px;
    font-size: 0.82rem; font-weight: 500;
    color: var(--ep-text-secondary);
    display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none;
}
.board-toolbar-view.active { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.toolbar-more-btn {
    width: 36px; height: 36px;
    border: 1px solid var(--wd-hairline);
    border-radius: var(--wd-r-ctl);
    background: #fff;
    color: var(--ep-text-secondary);
    display: inline-flex; align-items: center; justify-content: center;
}

/* Le cadre */
.board.wd-reg {
    border: 1px solid var(--wd-hairline);
    border-radius: var(--wd-r-card);
    box-shadow: none;
    overflow: visible;
    background: #fff;
}
.board.wd-reg .board-header { border-bottom: 1px solid var(--wd-hairline); padding: 0 10px; }
.board.wd-reg .board-header-cell {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ep-text-muted);
    padding: 11px 12px 10px;
}
.board.wd-reg .board-row {
    border-bottom: 1px solid var(--wd-hairline);
    padding: 0 10px;
    transition: background 150ms var(--wd-ease);
}
.board.wd-reg .board-row:last-child { border-bottom: none; }
.board.wd-reg .board-row:hover { background: #FAF8F5; }
.board.wd-reg .board-row:hover .cell-name,
.board.wd-reg .board-row:hover .board-cell.bulk-checkbox-cell { background: #FAF8F5; }
.board.wd-reg .board-cell {
    height: 58px; min-height: 58px; max-height: 58px;
    padding: 8px 12px;
    font-size: 0.88rem;
    color: var(--ep-text-secondary);
    border: none;
    white-space: normal;
    line-height: 1.3;
}
.board.wd-reg .board-cell.cell-name {
    background: transparent;
    border-left: none;
    color: var(--wd-onyx);
    font-weight: 600;
    position: static;
}
.board.wd-reg .board-cell.cell-name a { color: var(--wd-onyx); }
.board.wd-reg .board-cell.cell-name a:hover { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.board.wd-reg .bulk-checkbox-cell { border-left: none; }
.board.wd-reg .bulk-checkbox-cell input[type="checkbox"] { accent-color: var(--wd-onyx); border-radius: 5px; }
/* Première ligne forte, seconde ligne grise */
.wd-cell-main { display: block; color: var(--wd-onyx); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cell-main.is-normal { font-weight: 500; }
.wd-cell-sub { display: block; color: var(--ep-text-secondary); font-size: 0.8rem; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cell-stack { display: block; min-width: 0; width: 100%; }
.wd-cell-num { font-variant-numeric: tabular-nums; color: var(--wd-onyx); font-weight: 500; }
.wd-cell-late { color: var(--wd-st-danger); font-weight: 500; }
.wd-cell-late .wd-cell-sub { color: var(--wd-st-danger); }

/* Statuts : étiquette pâle à partir de la couleur --st */
.board.wd-reg .cell-status .chip {
    background: color-mix(in srgb, var(--st, #9b968f) 13%, #fff);
    color: color-mix(in srgb, var(--st, #9b968f) 85%, #000);
    font-weight: 500;
    font-size: 0.78rem;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    gap: 0;
    transition: transform 150ms var(--wd-ease), background 150ms var(--wd-ease);
}
.board.wd-reg .cell-status .chip::before { display: none; }
.board.wd-reg .cell-status .chip { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 26px; }
.board.wd-reg .cell-status .chip.chip-clickable:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--st, #9b968f) 20%, #fff); }

/* Plus de pied ni de ligne d'ajout : le registre s'arrête aux données */
.board.wd-reg .board-add-row, .board.wd-reg .board-summary { display: none; }
.board.wd-reg .cell-actions .wd-row-menu-btn { border-radius: 8px; }
.board.wd-reg .wd-row-menu .dropdown-item { display: flex; }

@media (max-width: 767.98px) {
    .wd-page-header.wd-reg-head { gap: 0.6rem; justify-content: flex-start; text-align: left; flex-direction: row; }
    .wd-page-header.wd-reg-head .wd-page-title { width: 100%; font-size: 1.5rem; }
    .board.wd-reg { overflow: hidden; }
    .board.wd-reg .board-row { padding: 0 4px; }
    .board.wd-reg .board-cell.cell-name { min-width: 0 !important; width: 0 !important; flex: 1 1 0% !important; }
    .board.wd-reg .board-cell.cell-status { flex: none !important; width: auto !important; max-width: 46%; padding-left: 4px; }
    .wd-reg-head .board-toolbar { margin-left: 0; width: 100%; flex-wrap: wrap; }
    .wd-reg-head .board-toolbar-search { flex: 1 1 140px; }
    .wd-reg-head .board-toolbar-add { margin-left: auto; }
    .wd-cell-sub.d-md-none { display: block !important; }
    .board.wd-reg .board-cell { height: 60px; min-height: 60px; max-height: 60px; }
    .board.wd-reg .cell-status .chip { font-size: 0.72rem; height: 24px; padding: 0 8px; }
}

/* ============================================================
   FICHE ÉVÉNEMENT — couverture, chapitres, vue d'ensemble
   ============================================================ */
.wd-ev-crumb { font-size: 0.82rem; color: var(--ep-text-secondary); margin: 2px 0 26px; display: flex; gap: 8px; align-items: center; }
.wd-ev-crumb > span { color: var(--ep-text-muted); }
.wd-ev-crumb a { color: inherit; text-decoration: none; }
.wd-ev-crumb a:hover { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-ev-crumb b { color: var(--wd-onyx); font-weight: 500; }
/* La couverture est un cadre à part entière (direction « Rail » : chaque bloc
   bien délimité), avec de l'air autour du titre et un avatar plus présent */
.wd-ev-cover {
    display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
    padding: 28px 30px;
    border: 1px solid var(--wd-hairline);
    border-radius: var(--wd-r-card);
    background: #fff;
    position: relative;
}
.wd-ev-av {
    width: 96px; height: 96px; border-radius: 30px; font-size: 1.6rem;
    box-shadow: inset 0 0 0 1px rgba(27, 24, 22, 0.06);
}
.wd-ev-cover-body { flex: 1 1 320px; min-width: 0; }
.wd-ev-kicker { font-size: 0.84rem; color: var(--ep-text-secondary); display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wd-ev-cover h1 { font-size: 2.5rem; line-height: 1; margin: 0 0 14px; letter-spacing: -0.02em; }
.wd-ev-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--ep-text-secondary); font-size: 0.92rem; }
.wd-ev-meta li { display: inline-flex; align-items: center; gap: 7px; }
.wd-ev-meta li .ms { font-size: 19px; color: var(--ep-text-muted); }
.wd-ev-meta a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-ev-cover-right { display: flex; align-items: center; gap: 8px; margin-left: auto; align-self: flex-start; }
.wd-ev-jchip {
    height: 38px; padding: 0 14px; border-radius: 999px;
    background: var(--wd-jaune-pale); color: var(--wd-onyx);
    font-family: var(--wd-font-display); font-weight: 600; font-size: 0.98rem;
    display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums;
}
.wd-ev-btn {
    height: 38px; padding: 0 14px; border-radius: var(--wd-r-ctl);
    border: 1px solid var(--wd-hairline-2); background: #fff; color: var(--wd-onyx);
    font-size: 0.86rem; font-weight: 500; text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
    transition: background 150ms var(--wd-ease), transform 200ms var(--wd-ease);
}
.wd-ev-btn:hover { background: var(--wd-papier); color: var(--wd-onyx); transform: translateY(-1px); }
.wd-ev-btn--icon { width: 38px; padding: 0; justify-content: center; }
.wd-ev-menu { min-width: 230px; border-radius: var(--wd-r-panel); border: 1px solid var(--wd-hairline); box-shadow: var(--wd-shadow-lift); padding: 0.4rem; }
.wd-ev-menu .dropdown-item, .wd-ev-menu .dropdown-item-text { display: flex; align-items: center; gap: 0.6rem; border-radius: 8px; padding: 0.5rem 0.65rem; font-size: 0.86rem; }
.wd-ev-menu .dropdown-item .ms, .wd-ev-menu .dropdown-item-text .ms { font-size: 20px; color: var(--ep-text-secondary); }
.wd-ev-menu .dropdown-item:hover { background: var(--wd-papier); }
.wd-ev-desc { color: var(--ep-text-secondary); font-size: 0.9rem; max-width: 72ch; margin: 14px 0 0; }

.wd-ev-cols { display: grid; grid-template-columns: 1.45fr 1fr; gap: 24px; align-items: start; margin-bottom: 24px; }
.wd-ev-main, .wd-ev-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.wd-ev-panel { border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); padding: 20px 24px; }
.wd-ev-h { font-size: 0.98rem; font-weight: 600; margin: 0 0 12px; }
.wd-ev-empty { margin: 0; color: var(--ep-text-secondary); font-size: 0.88rem; }
.wd-ev-empty a { color: var(--wd-onyx); }
/* Les sections héritées (Tâches, Prestataires, Notes, Droit à l'image) adoptent la tête de panneau */
.wd-ev-panel .ep-section-header { margin: 0 0 12px; padding: 0; border: 0; background: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wd-ev-panel .ep-section-title { font-family: var(--wd-font-sans); font-size: 0.98rem; font-weight: 600; margin: 0; letter-spacing: 0; text-transform: none; color: var(--wd-onyx); }
.wd-ev-panel .ep-section-title i { display: none; }
.wd-ev-panel .ep-list { margin-bottom: 0 !important; border: 0; box-shadow: none; border-radius: 0; background: transparent; }
.wd-ev-panel .ep-list .ep-row { padding-left: 0; padding-right: 0; }
.wd-ev-panel .ep-list .ep-row:last-child { border-bottom: 0; }
.wd-ev-panel .card { border: 1px solid var(--wd-hairline); box-shadow: none; }
.wd-ev-panel .ep-note-timeline { margin-bottom: 0 !important; }
/* Clés / valeurs */
.wd-kv { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.wd-kv li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--wd-hairline); }
.wd-kv li:last-child { border-bottom: 0; }
.wd-kv li span { color: var(--ep-text-secondary); flex: none; }
.wd-kv li b { font-weight: 500; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.wd-kv a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
@media (max-width: 991.98px) {
    .wd-ev-cols { grid-template-columns: 1fr; }
    .wd-ev-crumb { margin-bottom: 18px; }
    .wd-ev-cover h1 { font-size: 1.7rem; margin-bottom: 10px; }
    .wd-ev-av { width: 64px; height: 64px; border-radius: 21px; font-size: 1.2rem; }
    .wd-ev-cover-right { margin-left: 0; width: 100%; align-self: auto; }
    .wd-ev-cover-body { flex: 1 1 200px; }
    .wd-ev-cover { gap: 14px 16px; padding: 18px; align-items: flex-start; }
    .wd-ev-panel { padding: 16px 18px; }
}

/* Bouton d'ajout dans l'en-tête d'un panneau (Tâches, Prestataires) */
.wd-ev-add, .wd-ev-panel .ep-section-header .btn {
    height: 32px; padding: 0 10px 0 8px;
    border: 1px solid var(--wd-hairline); border-radius: 8px; background: #fff;
    color: var(--wd-onyx); font-size: 0.82rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: 4px;
    transition: background 150ms var(--wd-ease);
}
.wd-ev-add .ms { font-size: 18px; }
.wd-ev-add:hover, .wd-ev-panel .ep-section-header .btn:hover { background: var(--wd-papier); color: var(--wd-onyx); border-color: var(--wd-hairline); }
.wd-ev-add[aria-expanded="true"] { background: var(--wd-onyx); color: #fff; border-color: var(--wd-onyx); }
/* Formulaire replié d'ajout de prestataire */
.wd-ev-form { display: flex; flex-direction: column; gap: 8px; padding: 14px; margin-top: 12px; border: 1px solid var(--wd-hairline); border-radius: 14px; background: #FDFCFA; }
.wd-ev-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wd-ev-form .form-control, .wd-ev-form .form-select { height: 36px; border: 1px solid var(--wd-hairline-2); border-radius: 10px; font-size: 0.86rem; background-color: #fff; }
.wd-ev-form .form-control:focus, .wd-ev-form .form-select:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-ev-submit { height: 36px; border: 0; border-radius: 10px; background: var(--wd-onyx); color: #fff; font-size: 0.86rem; font-weight: 500; padding: 0 14px; }
.wd-ev-submit:hover { background: #000; }
/* Lignes de prestataires et de tâches : actions fantômes, montant discret */
.wd-ev-panel .ep-row-actions .btn, .wd-ev-panel .ep-row-actions .btn-icon {
    border: 0 !important; background: transparent; color: var(--ep-text-muted);
    width: 30px; height: 30px; border-radius: 8px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.wd-ev-panel .ep-row-actions .btn:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-ev-panel .ep-row-amount { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--wd-onyx); }
.wd-ev-panel .ep-row-avatar { border-radius: 12px; }
.wd-ev-panel .wd-pill { background: var(--wd-papier); color: var(--ep-text-secondary); border: 0; font-weight: 500; }

.wd-ev-panel .ep-row-main { flex-wrap: wrap; row-gap: 4px; }
.wd-ev-panel .ep-row-name { overflow: visible; white-space: normal; }

/* ── Fiche événement : UNE famille de boutons, lignes avec de l'air au survol ── */
.wd-ev-cover-right .wd-ev-btn,
.wd-ev-add,
.wd-ev-submit,
.wd-ev-panel .btn,
.wd-ev-panel .ep-section-header .btn,
.ep-admin-zone .btn {
    height: 36px !important;
    min-height: 36px;
    padding: 0 14px !important;
    border-radius: var(--wd-r-ctl) !important;
    border: 1px solid var(--wd-hairline-2) !important;
    background: #fff;
    color: var(--wd-onyx);
    font-family: var(--wd-font-sans);
    font-size: 0.86rem !important;
    font-weight: 500;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: none !important;
    text-decoration: none;
    transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease), transform 200ms var(--wd-ease);
}
.wd-ev-cover-right .wd-ev-btn:hover,
.wd-ev-add:hover,
.wd-ev-panel .btn:hover,
.ep-admin-zone .btn:hover { background: var(--wd-papier); color: var(--wd-onyx); transform: translateY(-1px); }
.wd-ev-add .ms, .wd-ev-panel .btn .ms { font-size: 18px; }
.wd-ev-panel .btn i, .ep-admin-zone .btn i { font-size: 0.9em; }
/* Variante pleine : une par bloc (enregistrer, ajouter, générer) */
.wd-ev-submit,
.wd-ev-panel .btn-primary,
.ep-admin-zone .btn-primary,
.wd-ev-add[aria-expanded="true"] { background: var(--wd-onyx) !important; color: #fff !important; border-color: var(--wd-onyx) !important; }
.wd-ev-submit:hover, .wd-ev-panel .btn-primary:hover, .ep-admin-zone .btn-primary:hover { background: #000 !important; color: #fff !important; }
/* Variante danger : contour neutre, rouge au survol ; la ligne X reste fantôme */
.wd-ev-panel .btn-outline-danger, .wd-ev-panel .btn-danger, .ep-admin-zone .btn-outline-danger { color: var(--wd-st-danger); }
.wd-ev-panel .btn-outline-danger:hover, .wd-ev-panel .btn-danger:hover, .ep-admin-zone .btn-outline-danger:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-ev-panel .ep-row-actions .btn, .wd-ev-panel .ep-row-actions .btn-icon {
    width: 30px !important; height: 30px !important; min-height: 0; padding: 0 !important;
    border: 0 !important; background: transparent; color: var(--ep-text-muted); border-radius: 8px !important;
}
.wd-ev-panel .ep-row-actions .btn:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); transform: none; }
/* Le bouton de coche des tâches n'est pas un bouton de la famille */
.wd-ev-panel .ep-row > form > .btn, .wd-ev-panel .ep-row-check .btn { width: auto !important; height: auto !important; min-height: 0; padding: 0 !important; border: 0 !important; background: transparent !important; }
/* Lignes : le voile de survol respire */
.wd-ev-panel .ep-list .ep-row { padding: 0.75rem 14px; margin: 0; border-radius: 12px; }
.wd-ev-panel .ep-list .ep-row-overdue { background: transparent; }
.wd-ev-panel .ep-list .ep-row-overdue:hover { background: #F9F7F3; }
.wd-ev-panel .ep-list .ep-row:hover { background: #F9F7F3; }
.wd-ev-panel .ep-list .ep-row + .ep-row { border-top: 0; }
.wd-ev-panel .ep-list { padding: 0; }

/* ============================================================
   RELIEF — fond blanc, cartes qui portent la couleur et l'ombre (22/10/2026)
   Retour du propriétaire : « des encadrés partout, trop blanc, trop plat,
   il manque une touche de couleur ; le fond reste blanc, ce sont les cartes
   qui jouent sur les couleurs et les ombres ». Deux niveaux de cartes :
   – la carte-titre de la page (couverture de la fiche, prochain mariage de
     l'accueil) est une surface teintée papier chaud, sans ombre ;
   – les cartes de contenu sont blanches, posées sur le blanc par une ombre
     portée nette, filet très clair.
   La touche de couleur reste l'or chaud, en petites surfaces : compteurs
   des chapitres, cœur du couple, statut « en cours ».
   ============================================================ */
:root {
    --wd-card-bg:     #FFFFFF;
    --wd-card-border: #ECE7DF;
    --wd-card-shadow: 0 1px 2px rgba(27, 24, 22, 0.05), 0 14px 30px -16px rgba(27, 24, 22, 0.22);
}
body, .ep-main-content { background: #FFFFFF; }

/* Cartes de contenu : blanches, soulevées */
.wd-home-panel, .board.wd-reg, .wd-retro, .wd-ev-panel {
    background: var(--wd-card-bg);
    border-color: var(--wd-card-border);
    box-shadow: var(--wd-card-shadow);
}

/* Carte-titre : noir chaud, à plat (« plus élégant », 22/10/2026).
   Texte blanc, secondaires en blanc atténué, or chaud pour la puce J−X et
   les jauges ; avatar et contrôles blancs sur le noir. */
.wd-ev-cover, .wd-home-next, a.wd-home-next:hover {
    background: var(--wd-onyx);
    border-color: var(--wd-onyx);
    box-shadow: none;
    color: #FFFFFF;
}
.wd-ev-cover h1, .wd-home-next h2 { color: #FFFFFF; }
.wd-ev-kicker, .wd-ev-meta, .wd-ev-desc,
.wd-home-next .wd-home-kicker, .wd-home-next-meta, .wd-home-count span { color: rgba(255, 255, 255, 0.68); }
.wd-ev-meta li .ms { color: rgba(255, 255, 255, 0.45); }
.wd-ev-meta li .ms.ms-accent { color: var(--wd-jaune); }
.wd-ev-meta a, .wd-home-next .wd-home-chips li.wd-home-chip-link { color: #FFFFFF; }
.wd-home-count b { color: #FFFFFF; }
.wd-ev-av, .wd-home-next .wd-home-av { background: #FFFFFF; color: var(--wd-onyx); box-shadow: none; }
.wd-ev-cover .wd-st, .wd-home-next .wd-st { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; }
.wd-ev-cover .wd-st-accent, .wd-home-next .wd-st-accent { background: var(--wd-jaune-pale); color: #6B4F22; }
.wd-ev-cover-right .wd-ev-btn {
    background: transparent; color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.28) !important;
}
.wd-ev-cover-right .wd-ev-btn:hover { background: rgba(255, 255, 255, 0.1); color: #FFFFFF; }
.wd-ev-jchip { background: var(--wd-jaune-pale); }
.wd-home-next .wd-home-chips { border-top-color: rgba(255, 255, 255, 0.14); }
.wd-home-next .wd-home-chips li { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.72); }
.wd-home-next .wd-home-chips li b { color: #FFFFFF; }
.wd-home-next .wd-home-chips li.wd-home-chip-link { background: transparent; }

/* Touche de couleur : l'or chaud, jamais en aplat — compteurs des chapitres
   (onglets desktop et feuille mobile ; le retard reste rouge) */
.wd-dossier-tabs a em, .wd-chapter-item em { background: var(--wd-jaune-pale); color: #6B4F22; }
.wd-dossier-tabs a.active em { background: var(--wd-jaune); color: var(--wd-onyx); }
.wd-st-accent { background: var(--wd-jaune-pale); color: #6B4F22; }

/* Avatar d'événement : registre (petit) et choix de la photo (formulaire) */
.board.wd-reg .cell-name { display: flex; align-items: center; gap: 12px; }
.wd-reg-av {
    width: 36px; height: 36px; border-radius: 12px; flex: none; overflow: hidden;
    background: var(--wd-jaune-pale); color: var(--wd-onyx);
    display: grid; place-items: center;
    font-family: var(--wd-font-display); font-weight: 600; font-size: 0.74rem;
}
.wd-reg-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-cover-pick { display: flex; align-items: flex-start; gap: 14px; }
.wd-cover-pick-av { width: 72px; height: 72px; border-radius: 22px; font-size: 1.1rem; }
.wd-cover-pick-body { flex: 1 1 auto; min-width: 0; }

/* ============================================================
   DOSSIER ÉVÉNEMENT — en-tête commun : couverture compacte, onglets
   (desktop) ou sélecteur de chapitre + feuille (mobile). Puis le bloc
   « À faire maintenant » de la vue d'ensemble et la page Rétroplanning
   par phases. L'ancien rail/liste de la bande est retiré.
   ============================================================ */

/* Couverture compacte, sans description */
/* Case à cocher et formulaire de génération, partagés par le bloc « À faire maintenant » et la page Rétroplanning */
.wd-retro-tick { margin: 0; display: flex; }
.wd-retro-box { width: 18px; height: 18px; border: 1.5px solid var(--wd-hairline-2); border-radius: 6px; background: #fff; padding: 0; cursor: pointer; position: relative; flex: none; transition: background 150ms var(--wd-ease), border-color 150ms var(--wd-ease), transform 200ms var(--wd-ease); }
.wd-retro-box:hover { border-color: var(--wd-onyx); }
.wd-retro-box::after { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5l3 3 6-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 12px no-repeat; opacity: 0; transform: scale(0.6); transition: opacity 150ms var(--wd-ease), transform 220ms var(--wd-ease); }
.wd-retro-box.is-done { background: var(--wd-onyx); border-color: var(--wd-onyx); }
.wd-retro-box.is-done::after { opacity: 1; transform: scale(1); }
.wd-ev-cover--dossier .wd-ev-av { width: 56px; height: 56px; border-radius: 18px; font-size: 1rem; }
.wd-ev-cover--dossier h1 { font-size: 1.55rem; margin-bottom: 4px; }
.wd-ev-cover--dossier .wd-ev-meta { gap: 4px 18px; font-size: 0.88rem; }
.wd-ev-cover--dossier .wd-ev-desc { display: none; }
/* Onglets de chapitre */
.wd-dossier-tabs { display: flex; gap: 2px; margin: 18px 0 26px; border-bottom: 1px solid var(--wd-hairline); overflow-x: auto; scrollbar-width: none; }
.wd-dossier-tabs::-webkit-scrollbar { display: none; }
.wd-dossier-tabs a { height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500; color: var(--ep-text-secondary); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; transition: color 150ms var(--wd-ease), border-color 150ms var(--wd-ease); }
.wd-dossier-tabs a:hover { color: var(--wd-onyx); border-bottom-color: var(--wd-hairline-2); }
.wd-dossier-tabs a.active { color: var(--wd-onyx); font-weight: 600; border-bottom-color: var(--wd-onyx); }
.wd-dossier-tabs a em { font-style: normal; font-size: 0.76rem; font-weight: 500; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; padding: 2px 7px; border-radius: 999px; background: var(--wd-papier); }
.wd-dossier-tabs a em.late { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-dossier-tabs .sep { width: 1px; background: var(--wd-hairline); margin: 10px 8px; flex: none; }
/* Sélecteur de chapitre (mobile) */
.wd-chapter-picker { margin: 14px 0 18px; }
.wd-chapter { width: 100%; display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 12px 0 14px; border: 1px solid var(--wd-hairline-2); border-radius: 12px; background: #fff; font-family: var(--wd-font-sans); font-weight: 600; font-size: 0.95rem; color: var(--wd-onyx); text-align: left; }
.wd-chapter-cur { display: inline-flex; align-items: center; gap: 10px; }
.wd-chapter-cur small { font-weight: 500; font-size: 0.78rem; color: var(--ep-text-muted); }
.wd-chapter .ms { color: var(--ep-text-secondary); }
.wd-chapter-sheet { padding: 0.6rem 0.75rem calc(1rem + env(safe-area-inset-bottom)); }
.wd-chapter-sheet-title { font-size: 0.8rem; color: var(--ep-text-muted); padding: 6px 10px 6px; }
.wd-chapter-item { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 10px; border-radius: 10px; font-size: 0.95rem; font-weight: 500; color: var(--wd-onyx); text-decoration: none; }
.wd-chapter-item.active { background: var(--wd-papier); font-weight: 600; }
.wd-chapter-item .ms { color: var(--ep-text-secondary); }
.wd-chapter-item em { margin-left: auto; font-style: normal; font-size: 0.76rem; color: var(--ep-text-muted); padding: 2px 8px; border-radius: 999px; background: var(--wd-papier); font-variant-numeric: tabular-nums; }
.wd-chapter-item em.late { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
/* Alerte budget sur la vue d'ensemble */
.wd-ev-flag { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 14px; border: 1px solid var(--wd-st-danger-bg); border-radius: 12px; background: #FFFBFA; color: var(--wd-onyx); text-decoration: none; font-size: 0.88rem; }
.wd-ev-flag .ms { color: var(--wd-st-danger); font-size: 20px; }
.wd-ev-flag .wd-budget-flag--over { color: var(--wd-st-danger); font-weight: 600; }
.wd-ev-flag-more { margin-left: auto; color: var(--ep-text-secondary); font-size: 0.84rem; }
/* « À faire maintenant » */
.wd-now { border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); padding: 6px 20px; margin-bottom: 24px; background: #fff; }
.wd-now--empty { border-style: dashed; background: #FDFCFA; }
.wd-now-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; flex-wrap: wrap; }
.wd-now-head h4 { font-size: 0.98rem; font-weight: 600; margin: 0; }
.wd-now-head h4 small { font-size: 0.86rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-now-head h4 small.wd-now-late { color: var(--wd-st-danger); }
.wd-now-head > a, .wd-now-link { font-family: var(--wd-font-sans); font-size: 0.84rem; font-weight: 500; color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); background: none; border: 0; padding: 0; cursor: pointer; }
.wd-now-acts { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.wd-now-acts form { margin: 0; }
.wd-now-rows { list-style: none; margin: 0; padding: 0; }
.wd-now-rows li { display: flex; align-items: center; gap: 12px; height: 44px; border-top: 1px solid var(--wd-hairline); font-size: 0.9rem; }
.wd-now-rows .wd-retro-tick { margin: 0; display: flex; }
.wd-now-rows .t { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wd-onyx); text-decoration: none; }
.wd-now-rows .t:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-now-rows .d { flex: none; text-align: right; font-size: 0.82rem; color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
.wd-now-rows .d b { color: var(--wd-onyx); font-weight: 600; }
.wd-now-rows li.is-late .d, .wd-now-rows li.is-late .d b { color: var(--wd-st-danger); }
.wd-now-rows li.is-late .d::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--wd-st-danger); margin-right: 4px; }
/* Page Rétroplanning */
.wd-rp-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wd-rp-head h1 { font-size: 1.75rem; margin: 0; }
.wd-rp-head .acts { margin-left: auto; display: flex; gap: 8px; }
.wd-rp-head .acts form { margin: 0; }
.wd-rp-sum { margin: 12px 0 0; font-size: 0.9rem; color: var(--ep-text-secondary); }
.wd-rp-sum b { color: var(--wd-onyx); font-weight: 600; }
.wd-rp-late { color: var(--wd-st-danger); font-weight: 500; }
.wd-rp-gauge { height: 3px; border-radius: 2px; background: var(--wd-papier); margin: 10px 0 18px; position: relative; overflow: hidden; }
.wd-rp-gauge::after { content: ''; position: absolute; inset: 0; width: var(--v); background: var(--wd-jaune); transform-origin: left center; animation: wd-bar-grow 800ms 150ms var(--wd-ease) backwards; }
.wd-rp-filters { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.wd-rp-filters .seg { display: inline-flex; background: var(--wd-papier); border-radius: 10px; padding: 3px; gap: 2px; }
.wd-rp-filters .seg a { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 0.84rem; font-weight: 500; color: var(--ep-text-secondary); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.wd-rp-filters .seg a.on { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.wd-rp-filters .seg a em { font-style: normal; font-size: 0.74rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-rp-filters .mine { height: 36px; padding: 0 12px; border: 1px solid var(--wd-hairline); border-radius: 10px; background: #fff; font-size: 0.84rem; font-weight: 500; color: var(--ep-text-secondary); display: inline-flex; align-items: center; text-decoration: none; }
.wd-rp-filters .mine.on { background: var(--wd-onyx); color: #fff; border-color: var(--wd-onyx); }
.wd-rp { border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); background: #fff; }
.wd-rp-group { border-top: 1px solid var(--wd-hairline); }
.wd-rp-group:first-child { border-top: 0; }
.wd-rp-phase { position: sticky; top: 64px; z-index: 2; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px; background: #FCFAF7; border-bottom: 1px solid var(--wd-hairline); font-size: 0.84rem; font-weight: 600; color: var(--wd-onyx); cursor: pointer; list-style: none; }
.wd-rp-phase::-webkit-details-marker { display: none; }
.wd-rp-group:first-child .wd-rp-phase { border-radius: var(--wd-r-card) var(--wd-r-card) 0 0; }
.wd-rp-group:last-child:not([open]) .wd-rp-phase { border-bottom: 0; border-radius: 0 0 var(--wd-r-card) var(--wd-r-card); }
.wd-rp-phase .ms { font-size: 18px; color: var(--ep-text-muted); transition: transform 200ms var(--wd-ease); }
.wd-rp-group:not([open]) .wd-rp-phase .ms { transform: rotate(-90deg); }
.wd-rp-phase small { margin-left: auto; font-size: 0.78rem; font-weight: 500; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-rp-rows { list-style: none; margin: 0; padding: 4px 10px; }
.wd-rp-rows li { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0 10px; border-bottom: 1px solid var(--wd-hairline); font-size: 0.9rem; border-radius: 10px; transition: background 150ms var(--wd-ease); }
.wd-rp-rows li:last-child { border-bottom: 0; }
.wd-rp-rows li:hover { background: #F9F7F3; }
.wd-rp-rows .wd-retro-tick { margin: 0; display: flex; }
.wd-rp-rows .when { width: 128px; flex: none; font-size: 0.84rem; color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.wd-rp-rows .when b { color: var(--wd-onyx); font-weight: 600; }
.wd-rp-rows .when .jx { color: var(--ep-text-muted); }
.wd-rp-rows .t { flex: 1; min-width: 0; font-weight: 500; color: var(--wd-onyx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.wd-rp-rows .t:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-rp-rows .av { width: 24px; height: 24px; border-radius: 50%; background: var(--wd-onyx); color: #fff; font-size: 0.62rem; font-weight: 600; display: grid; place-items: center; flex: none; }
.wd-rp-rows .pr { width: 7px; height: 7px; border-radius: 50%; background: var(--wd-jaune); flex: none; }
.wd-rp-rows li.is-done .t { color: var(--ep-text-muted); text-decoration: line-through; font-weight: 400; }
.wd-rp-rows li.is-done .when b { color: var(--ep-text-muted); font-weight: 500; }
.wd-rp-rows li.is-late .when, .wd-rp-rows li.is-late .when b { color: var(--wd-st-danger); }
.wd-rp-rows .late-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wd-st-danger); flex: none; }
.wd-rp-blank { border: 1px dashed var(--wd-hairline-2); border-radius: var(--wd-r-card); padding: 28px 24px; text-align: center; color: var(--ep-text-secondary); font-size: 0.9rem; }
.wd-rp-blank p { margin: 0 0 8px; }
.wd-rp-blank a { color: var(--wd-onyx); font-weight: 500; }
.wd-rp-blank--empty .ms { font-size: 32px; color: var(--ep-text-muted); }
.wd-rp-blank--empty h2 { font-size: 1.1rem; margin: 8px 0 4px; }
/* Sous-pages : leur ancien héros sombre passe en clair sous la couverture noire */
.ep-event-hero--sub { background: #fff !important; color: var(--wd-onyx) !important; border: 1px solid var(--wd-hairline); box-shadow: none !important; }
.ep-event-hero--sub .ep-event-hero-title, .ep-event-hero--sub small, .ep-event-hero--sub .ep-event-hero-desc { color: var(--wd-onyx) !important; }
.ep-event-hero--sub .ep-event-hero-icon { display: none; }
.wd-page-header--sub .wd-page-title { font-size: 1.35rem; }
@media (max-width: 767.98px) {
    .wd-ev-cover--dossier { padding: 16px !important; }
    .wd-ev-cover--dossier .wd-ev-av { width: 48px; height: 48px; border-radius: 16px; }
    .wd-ev-cover--dossier .wd-ev-meta { gap: 2px 14px; font-size: 0.84rem; }
    .wd-ev-cover--dossier .wd-ev-meta li .ms { display: none; }
    .wd-ev-cover--dossier .wd-ev-cover-right { width: 100%; margin: 8px 0 0; }
    .wd-now { padding: 4px 16px; }
    .wd-now-rows .d { font-size: 0.8rem; }
    .wd-now-rows .d .jx { display: none; }
    .wd-rp-head .acts { width: 100%; margin-left: 0; }
    .wd-rp-filters .seg { overflow-x: auto; max-width: 100%; }
    .wd-rp-rows .when { width: 92px; font-size: 0.78rem; }
    .wd-rp-rows .t { white-space: normal; }
    .wd-rp-rows .av { display: none; }
    .wd-rp-phase { top: 0; }
}
/* Sous-pages : le héros clair perd son filigrane, ses pastilles et boutons redeviennent lisibles */
.ep-event-hero--sub::before, .ep-event-hero--sub::after { display: none !important; }
.ep-event-hero--sub { padding: 20px 24px !important; border-radius: var(--wd-r-card) !important; }
.ep-event-hero--sub .ep-event-hero-title { font-size: 1.5rem !important; }
.ep-event-hero--sub .ep-budget-pill { background: var(--wd-papier) !important; color: var(--wd-onyx) !important; border: 0 !important; opacity: 1 !important; }
.ep-event-hero--sub .ep-budget-pill-label { color: var(--ep-text-secondary) !important; }
.ep-event-hero--sub .ep-budget-pill-value { color: var(--wd-onyx) !important; }
.ep-event-hero--sub .ep-event-hero-actions .btn { background: #fff !important; color: var(--wd-onyx) !important; border: 1px solid var(--wd-hairline-2) !important; opacity: 1 !important; }
.ep-event-hero--sub .ep-event-hero-actions .btn-primary { background: var(--wd-onyx) !important; color: #fff !important; border-color: var(--wd-onyx) !important; }
.ep-event-hero--sub .ep-event-hero-actions a[href$="/events"], .ep-event-hero--sub .ep-event-hero-actions a.btn:has(.bi-arrow-left) { display: none !important; }

/* Couverture sur les chapitres : le titre garde la taille du h1 sans en être un */
.wd-ev-cover .wd-ev-cover-h1 { font-family: var(--wd-font-display); font-weight: 600; letter-spacing: -0.02em; font-size: 2rem; line-height: 1.05; margin: 0 0 6px; text-wrap: balance; }
.wd-ev-cover--dossier .wd-ev-cover-h1 { font-size: 1.55rem; margin-bottom: 4px; }
@media (max-width: 991.98px) { .wd-ev-cover .wd-ev-cover-h1 { font-size: 1.5rem; } }

/* ============================================================
   SANTÉ DU PROJET — vue d'ensemble : trois cartes (Budget, Préparation,
   Jour J), un chiffre, un verdict en toutes lettres, une jauge.
   Pastille : vert = en ordre, or = à surveiller, rouge = à traiter.
   ============================================================ */
.wd-health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
.wd-health-card {
    display: block; min-width: 0;
    border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); background: #fff;
    padding: 20px 22px 18px; text-decoration: none; color: var(--wd-onyx);
    transition: box-shadow 220ms var(--wd-ease), transform 220ms var(--wd-ease);
}
.wd-health-card:hover { color: var(--wd-onyx); box-shadow: 0 10px 28px rgba(27, 24, 22, 0.08); transform: translateY(-2px); }
.wd-health-h { display: flex; align-items: center; gap: 8px; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wd-gris); margin-bottom: 14px; }
.wd-health-dot { width: 9px; height: 9px; border-radius: 50%; margin-left: auto; flex: none; background: #7FA07C; box-shadow: 0 0 0 3px rgba(127, 160, 124, 0.18); }
.wd-health-card.is-warn .wd-health-dot { background: var(--wd-jaune); box-shadow: 0 0 0 3px rgba(201, 160, 99, 0.2); animation: wd-breathe 2.6s ease-in-out infinite; }
.wd-health-card.is-bad .wd-health-dot { background: var(--wd-st-danger); box-shadow: 0 0 0 3px rgba(176, 57, 46, 0.15); animation: wd-breathe 2.2s ease-in-out infinite; }
.wd-health-big { font-family: var(--wd-font-display); font-size: 2rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-health-big small { font-family: var(--wd-font-sans); font-size: 1rem; color: var(--wd-gris); font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.wd-health-verdict { margin: 10px 0 12px; font-size: 0.9rem; line-height: 1.4; color: var(--wd-onyx); min-height: 2.5em; }
.wd-health-card.is-bad .wd-health-verdict { color: var(--wd-st-danger); font-weight: 500; }
.wd-health-g { height: 6px; border-radius: 3px; background: var(--wd-papier); overflow: hidden; display: flex; }
.wd-health-g i { display: block; height: 100%; flex: none; transition: width 600ms var(--wd-ease); }
.wd-health-g .is-paid, .wd-health-g .is-confirmed { background: #7FA07C; }
.wd-health-g .is-committed, .wd-health-g .is-done { background: var(--wd-onyx); }
.wd-health-g .is-planned, .wd-health-g .is-pending { background: repeating-linear-gradient(-45deg, #D9D2C6 0 3px, #EFEAE1 3px 6px); }
.wd-health-g .is-late { background: var(--wd-st-danger); }
.wd-health-g .is-declined { background: #C9C2B8; }
.wd-health-card.is-bad[data-health="budget"] .wd-health-g .is-committed { background: var(--wd-st-danger); }
.wd-health-kv { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.8rem; color: var(--wd-gris); }
.wd-health-kv b { color: var(--wd-onyx); font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-health-kv .bad, .wd-health-kv .bad b { color: var(--wd-st-danger); }
@media (max-width: 1199.98px) { .wd-health-big { font-size: 1.7rem; } .wd-health-card { padding: 18px 18px 16px; } }
@media (max-width: 767.98px) { .wd-health { grid-template-columns: 1fr; gap: 12px; } .wd-health-verdict { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .wd-health-dot { animation: none !important; } .wd-health-card:hover { transform: none; } }

/* Vue d'ensemble sans volet latéral : une seule colonne. Page Prestataires : le panneau reprend l'air du chapitre */
.wd-ev-cols--single { grid-template-columns: 1fr; }
.wd-vendors { margin-top: 20px; }
.wd-vendors .ep-list { margin-bottom: 0 !important; }
/* Bouton plein de l'en-tête d'un chapitre (« + Tâche », « + Ajouter ») */
.wd-ev-btn--primary { background: var(--wd-onyx); color: #fff; border-color: var(--wd-onyx); }
.wd-ev-btn--primary:hover { background: #000; color: #fff; }
.wd-ev-btn--primary .ms { font-size: 18px; }

/* ============================================================
   BUDGET — chapitre : enveloppe, répartition par catégorie,
   registre des postes groupé avec totaux. Chiffres tabulaires,
   le reste à payer en gras, le réglé par une coche.
   ============================================================ */
.wd-bud { margin-top: 20px; }
.wd-bud .wd-budget-env { border-color: var(--wd-hairline); border-radius: var(--wd-r-card); box-shadow: none; padding: 20px 22px 18px; margin-bottom: 16px; }
.wd-bud .wd-budget-env-label { color: var(--wd-gris); letter-spacing: 0.08em; font-size: 0.72rem; }
.wd-bud-mix { border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); padding: 16px 22px 14px; margin-bottom: 24px; }
.wd-bud-mix-head { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wd-gris); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.wd-bud-mix-head small { font-size: 0.8rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.wd-bud-mix-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--wd-papier); gap: 2px; }
.wd-bud-mix-bar span { display: block; height: 100%; min-width: 2px; }
.wd-bud-mix-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.82rem; color: var(--wd-gris); }
.wd-bud-mix-legend li { display: inline-flex; align-items: center; gap: 6px; }
.wd-bud-mix-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.wd-bud-mix-legend b { color: var(--wd-onyx); font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-bud-mix-legend small { font-size: 0.78rem; }

.wd-bud-table-wrap { border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); overflow: hidden; }
.wd-bud-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.wd-bud-table th, .wd-bud-table td { padding: 12px 14px; vertical-align: middle; }
.wd-bud-table thead th { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wd-gris); border-bottom: 1px solid var(--wd-hairline); background: #fff; padding-top: 14px; padding-bottom: 12px; }
.wd-bud-table .c-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; width: 11%; }
.wd-bud-table .c-status { width: 150px; }
.wd-bud-table .c-act { width: 74px; text-align: right; white-space: nowrap; }
.wd-bud-table .c-name { padding-left: 22px; }
.wd-bud-cat th { background: var(--wd-papier); font-weight: 600; font-size: 0.9rem; padding-left: 22px; border-top: 1px solid var(--wd-hairline); }
.wd-bud-cat th i { color: var(--wd-gris); margin-right: 6px; font-size: 0.95em; }
.wd-bud-cat th small { color: var(--wd-gris); font-weight: 400; margin-left: 6px; font-size: 0.82rem; }
.wd-bud-cat td { background: var(--wd-papier); color: var(--wd-gris); font-size: 0.84rem; border-top: 1px solid var(--wd-hairline); }
.wd-bud-row { border-top: 1px solid var(--wd-hairline); transition: background 150ms var(--wd-ease); }
.wd-bud-row:hover { background: #FDFCFA; }
.wd-bud-name { color: var(--wd-onyx); font-weight: 500; text-decoration: none; display: block; }
.wd-bud-name:hover { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-bud-row .c-name small { display: block; color: var(--wd-gris); font-size: 0.8rem; margin-top: 2px; }
.wd-bud-row .c-name small i { font-size: 0.85em; margin-right: 2px; }
.wd-bud-row.is-cancelled .c-name, .wd-bud-row.is-cancelled .c-num { color: var(--wd-gris); text-decoration: line-through; }
.wd-bud-row.is-cancelled .wd-pill { opacity: 0.7; }
.wd-bud-var { display: inline-block; margin-left: 6px; font-size: 0.76rem; color: var(--wd-gris); font-variant-numeric: tabular-nums; }
.wd-bud-var.is-up { color: var(--wd-st-danger); }
.wd-bud-var.is-down { color: var(--wd-st-ok); }
.wd-bud-table .c-rest b { font-weight: 600; color: var(--wd-onyx); }
.wd-bud-table .c-rest small { color: var(--wd-gris); font-size: 0.8rem; }
.wd-bud-ok { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--wd-st-ok-bg); color: var(--wd-st-ok); align-items: center; justify-content: center; }
.wd-bud-ok .ms { font-size: 16px; }
.wd-bud-table .c-act form { display: inline; margin: 0; }
.wd-bud-ic { display: inline-flex; width: 30px; height: 30px; border-radius: 8px; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--ep-text-muted); opacity: 0; transition: opacity 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-bud-row:hover .wd-bud-ic, .wd-bud-ic:focus-visible { opacity: 1; }
.wd-bud-ic:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-bud-ic--danger:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-bud-table tfoot th, .wd-bud-table tfoot td { border-top: 2px solid var(--wd-onyx); font-weight: 600; background: #fff; padding-top: 14px; padding-bottom: 14px; }
.wd-bud-table tfoot th { padding-left: 22px; }
.wd-bud-table tfoot th small { color: var(--wd-gris); font-weight: 400; margin-left: 6px; font-size: 0.82rem; }
.wd-bud-table tfoot .c-rest { color: var(--wd-onyx); }
/* État vide : les règles génériques de .wd-rp-blank (liens onyx, icône 32 px) ne doivent pas déteindre sur le bouton noir */
.wd-bud .wd-rp-blank--empty p { max-width: 56ch; margin: 0 auto 8px; }
.wd-bud .wd-rp-blank--empty .wd-ev-btn--primary { color: #fff; margin-top: 14px; }
.wd-bud .wd-rp-blank--empty .wd-ev-btn--primary .ms { font-size: 18px; color: inherit; }

/* Mobile : le registre devient une pile de fiches — poste, statut, engagé et reste */
@media (max-width: 767.98px) {
    .wd-bud .wd-budget-env, .wd-bud-mix { padding: 14px 16px; }
    .wd-bud-table thead { display: none; }
    .wd-bud-table, .wd-bud-table tbody, .wd-bud-table tfoot, .wd-bud-table tr, .wd-bud-table th, .wd-bud-table td { display: block; width: auto; text-align: left; }
    .wd-bud-cat th { padding: 10px 16px; border-top: 0; }
    .wd-bud-cat td { display: none; }
    .wd-bud-cat td.c-rest { display: block; padding: 0 16px 10px; border-top: 0; }
    .wd-bud-cat td.c-rest::before { content: 'Reste à payer '; }
    .wd-bud-table tr.wd-bud-row { padding: 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
    .wd-bud-row td { padding: 0; }
    .wd-bud-table .c-num, .wd-bud-table .c-status, .wd-bud-table .c-act { width: auto; }
    .wd-bud-row .c-num[data-label="Engagé"], .wd-bud-row .c-num[data-label="Reste"] { white-space: nowrap; display: inline-flex; align-items: baseline; gap: 5px; }
    .wd-bud-row .c-num[data-label="Prévu"], .wd-bud-row .c-num[data-label="Payé"] { display: none; }
    .wd-bud-row .c-name { grid-column: 1; grid-row: 1; padding-left: 0; }
    .wd-bud-row .c-status { grid-column: 2; grid-row: 1; justify-self: end; }
    .wd-bud-row .c-num { display: none; }
    .wd-bud-row .c-num[data-label="Engagé"], .wd-bud-row .c-num[data-label="Reste"] { grid-row: 2; font-size: 0.84rem; color: var(--wd-gris); }
    .wd-bud-row .c-num[data-label="Engagé"] { grid-column: 1; }
    .wd-bud-row .c-num[data-label="Engagé"]::before { content: 'Engagé'; }
    .wd-bud-row .c-num[data-label="Reste"] { grid-column: 2; justify-self: end; text-align: right; }
    .wd-bud-row .c-num[data-label="Reste"]::before { content: 'Reste'; }
    .wd-bud-row .c-num[data-label="Reste"] b { color: var(--wd-onyx); }
    .wd-bud-row .c-act { grid-column: 1 / -1; grid-row: 3; text-align: right; }
    .wd-bud-ic { opacity: 1; }
    .wd-bud-table tfoot tr { padding: 12px 16px; display: grid; grid-template-columns: 1fr auto; }
    .wd-bud-table tfoot th, .wd-bud-table tfoot td { padding: 0; border-top: 0; }
    .wd-bud-table tfoot tr { border-top: 2px solid var(--wd-onyx); }
    .wd-bud-table tfoot .c-num { display: none; }
    .wd-bud-table tfoot .c-rest { display: block; grid-column: 2; text-align: right; }
}

/* ============================================================
   POSTE DE BUDGET — formulaire à une colonne : le poste, le montant
   (un seul, + « Réservé »), une note repliée. 640 px de large.
   ============================================================ */
.wd-bif-wrap { max-width: 680px; margin-top: 20px; }
/* Retour vers le chapitre : un lien discret au-dessus du titre, flèche vers la gauche */
.wd-back { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 6px; margin: 0 0 6px -6px; border-radius: 8px; font-size: 0.86rem; font-weight: 500; color: var(--wd-gris); text-decoration: none; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-back .ms { font-size: 18px; transform: rotate(180deg); transition: transform 200ms var(--wd-ease); }
.wd-back:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-back:hover .ms { transform: rotate(180deg) translateX(2px); }
.wd-bif-title { font-size: 1.75rem; margin: 0; }
.wd-bif { margin-top: 18px; display: flex; flex-direction: column; gap: 16px; }
.wd-bif-sec { border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); padding: 18px 22px 20px; background: #fff; }
.wd-bif-h { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wd-gris); margin: 0 0 14px; font-family: var(--wd-font-sans); }
.wd-bif-row { margin-bottom: 14px; min-width: 0; }
.wd-bif-sec > .wd-bif-row:last-child, .wd-bif-2 .wd-bif-row { margin-bottom: 0; }
.wd-bif-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wd-bif .form-label { font-size: 0.84rem; font-weight: 500; color: var(--wd-onyx); margin-bottom: 6px; }
.wd-bif .form-control, .wd-bif .form-select { height: 42px; border: 1px solid var(--wd-hairline-2); border-radius: 10px; font-size: 0.92rem; background-color: #fff; }
.wd-bif textarea.form-control { height: auto; }
.wd-bif .form-control:focus, .wd-bif .form-select:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-bif .form-text { font-size: 0.8rem; color: var(--wd-gris); }
.wd-bif-link { border: 0; background: none; padding: 0; margin-top: 6px; font-size: 0.82rem; font-weight: 500; color: var(--wd-onyx); display: inline-flex; align-items: center; gap: 2px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-bif-link .ms { font-size: 16px; text-decoration: none; }
/* Prestataire : la liste, ou un nom à créer — jamais les deux */
.wd-bif-new { display: none; }
.wd-bif-vendor.is-new .wd-bif-pick { display: none; }
.wd-bif-vendor.is-new .wd-bif-new { display: block; animation: wd-rise-soft 220ms var(--wd-ease); }
.wd-bif-new-in { position: relative; }
.wd-bif-new-in .form-control { padding-right: 40px; }
.wd-bif-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--wd-gris); display: inline-flex; align-items: center; justify-content: center; }
.wd-bif-x:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-bif-x .ms { font-size: 18px; }
/* Montant : un champ large, l'interrupteur « Réservé » à côté */
.wd-bif-amount { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 18px; align-items: end; margin-bottom: 16px; }
.wd-bif-amount .wd-bif-row { margin-bottom: 0; }
.wd-bif-money { position: relative; }
.wd-bif-money .form-control { padding-right: 34px; font-variant-numeric: tabular-nums; font-weight: 500; }
.wd-bif-amount .wd-bif-money .form-control { height: 48px; font-size: 1.15rem; font-family: var(--wd-font-display); font-weight: 600; }
.wd-bif-money > span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--wd-gris); pointer-events: none; }
.wd-bif-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 6px 0; min-height: 48px; }
.wd-bif-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-bif-switch-ui { width: 40px; height: 24px; border-radius: 999px; background: var(--wd-hairline-2); position: relative; flex: none; transition: background 180ms var(--wd-ease); }
.wd-bif-switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: transform 200ms var(--wd-ease); }
.wd-bif-switch input:checked + .wd-bif-switch-ui { background: var(--wd-onyx); }
.wd-bif-switch input:checked + .wd-bif-switch-ui::after { transform: translateX(16px); }
.wd-bif-switch input:focus-visible + .wd-bif-switch-ui { box-shadow: 0 0 0 3px rgba(201, 160, 99, 0.45); }
.wd-bif-switch-t { display: flex; flex-direction: column; line-height: 1.3; }
.wd-bif-switch-t b { font-weight: 600; font-size: 0.92rem; }
.wd-bif-switch-t small { font-size: 0.8rem; color: var(--wd-gris); }
.wd-bif-paid-in { display: flex; align-items: center; gap: 14px; }
.wd-bif-paid-in .wd-bif-money { width: 220px; flex: none; }
.wd-bif-paid-in .wd-bif-link { margin-top: 0; }
/* Note repliée */
.wd-bif-more { padding-bottom: 16px; }
.wd-bif-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; margin: 0; }
.wd-bif-more > summary::-webkit-details-marker { display: none; }
.wd-bif-more > summary .ms { font-size: 18px; transition: transform 200ms var(--wd-ease); transform: rotate(-90deg); }
.wd-bif-more[open] > summary { margin-bottom: 14px; }
.wd-bif-more[open] > summary .ms { transform: none; }
.wd-bif-cancel { margin-top: 12px; }
.wd-bif-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.wd-bif-foot .wd-ev-btn { height: 42px; padding: 0 18px; }
.wd-bif-delete { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--wd-hairline); }
.wd-bif-delete button { border: 0; background: none; padding: 0; color: var(--wd-st-danger); font-size: 0.86rem; font-weight: 500; }
.wd-bif-delete button:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 575.98px) {
    .wd-bif-sec { padding: 16px; }
    .wd-bif-2, .wd-bif-amount { grid-template-columns: 1fr; gap: 14px; }
    .wd-bif-paid-in { flex-wrap: wrap; }
    .wd-bif-paid-in .wd-bif-money { width: 100%; }
    .wd-bif-foot { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); background: #fff; padding: 12px 0; margin: 0 -4px; }
    .wd-bif-foot .wd-ev-btn { flex: 1; justify-content: center; }
}

/* Rétroplanning : trois repères sous le titre (avancement, prochain jalon, retards) */
.wd-rp-stats { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr) minmax(0, 0.8fr); border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); margin: 18px 0 20px; overflow: hidden; }
.wd-rp-stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-left: 1px solid var(--wd-hairline); min-width: 0; text-decoration: none; color: var(--wd-onyx); }
.wd-rp-stat:first-child { border-left: 0; }
a.wd-rp-stat:hover { background: #FDFCFA; color: var(--wd-onyx); }
.wd-rp-stat .l { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wd-gris); }
.wd-rp-stat .v { font-family: var(--wd-font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.wd-rp-stat .v small { font-family: var(--wd-font-sans); font-size: 0.9rem; font-weight: 500; color: var(--wd-gris); letter-spacing: 0; margin-left: 5px; }
.wd-rp-stat .t { font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--wd-onyx); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
a.wd-rp-stat .t, .wd-rp-stat a.t:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-rp-stat .w { font-size: 0.82rem; color: var(--wd-gris); }
.wd-rp-stat .g { display: block; height: 4px; border-radius: 2px; background: var(--wd-papier); margin-top: 6px; overflow: hidden; }
.wd-rp-stat .g i { display: block; height: 100%; background: var(--wd-onyx); border-radius: 2px; }
.wd-rp-stat.is-bad .v, .wd-rp-stat.is-bad .w { color: var(--wd-st-danger); }
@media (max-width: 767.98px) {
    .wd-rp-stats { grid-template-columns: 1fr 1fr; }
    .wd-rp-stat--next { grid-column: 1 / -1; grid-row: 1; border-left: 0; border-bottom: 1px solid var(--wd-hairline); }
    .wd-rp-stat:nth-child(1) { border-left: 0; }
    .wd-rp-stat { padding: 14px 16px; }
}

/* L'état vide générique : son bouton plein garde son texte blanc (les liens y sont onyx) */
.wd-rp-blank--empty .wd-ev-btn--primary { color: #fff; }
.wd-rp-blank--empty .wd-ev-btn .ms { font-size: 18px; color: inherit; }

/* ============================================================
   PROGRAMME — vue du chef de projet : repères, ruban horaire de la
   journée, déroulé dense groupé par moment. Doré = moment fort (le
   couple le voit), encre = repère privé.
   ============================================================ */
.wd-pg-chip { height: 26px; padding: 0 10px; border-radius: 999px; background: var(--wd-st-ok-bg); color: var(--wd-st-ok); font-size: 0.78rem; font-weight: 600; display: inline-flex; align-items: center; }
.wd-pg-page .wd-ev-menu .dropdown-item small { display: block; font-size: 0.76rem; color: var(--wd-gris); white-space: normal; line-height: 1.35; margin-top: 2px; max-width: 240px; }
.wd-pg-page .wd-ev-menu .dropdown-item i { font-size: 1rem; color: var(--ep-text-secondary); width: 20px; text-align: center; align-self: flex-start; margin-top: 2px; }
.wd-pg-page .wd-ev-menu form, .wd-pg-access { margin: 0; }
.wd-pg-page .wd-ev-menu .dropdown-item { align-items: flex-start; }
.wd-pg-clock { font-variant-numeric: tabular-nums; }
.wd-pg-vendors { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ruban : l'axe des heures, une barre par étape, un couloir par chevauchement */
.wd-pg-ribbon { border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); padding: 30px 22px 16px; margin-bottom: 24px; overflow: hidden; }
.wd-pg-track { position: relative; height: calc(var(--lanes) * 30px - 4px); }
.wd-pg-tick { position: absolute; top: -8px; bottom: -6px; width: 0; border-left: 1px dashed var(--wd-hairline-2); }
.wd-pg-tick em { position: absolute; top: -20px; left: 0; transform: translateX(-50%); font-style: normal; font-size: 0.72rem; color: var(--wd-gris); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-pg-blk { position: absolute; top: calc(var(--lane) * 30px); height: 26px; border-radius: 7px; background: var(--wd-papier); border: 1px solid var(--wd-hairline-2); color: var(--wd-onyx); font-size: 0.76rem; font-weight: 500; text-decoration: none; display: flex; align-items: center; padding: 0 7px; overflow: hidden; min-width: 8px; transition: transform 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-pg-blk span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-pg-blk:hover { color: var(--wd-onyx); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(27, 24, 22, 0.1); z-index: 2; }
.wd-pg-blk.is-highlight { background: var(--wd-jaune-pale); border-color: var(--wd-jaune); }
.wd-pg-blk.is-focus { box-shadow: inset 0 0 0 1.5px var(--wd-onyx); }
.wd-pg-blk.is-point { width: 10px !important; padding: 0; border-radius: 50%; height: 10px; margin-top: 8px; background: var(--wd-onyx); border-color: var(--wd-onyx); }
.wd-pg-blk.is-point.is-highlight { background: var(--wd-jaune); border-color: var(--wd-jaune); }
.wd-pg-blk.is-point span { display: none; }

/* Déroulé dense */
.wd-pg { border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); overflow: hidden; }
.wd-pg-group { display: flex; align-items: baseline; gap: 10px; padding: 10px 22px; background: var(--wd-papier); border-top: 1px solid var(--wd-hairline); position: sticky; top: 0; z-index: 1; }
.wd-pg-group:first-child { border-top: 0; }
.wd-pg-group span { font-weight: 600; font-size: 0.9rem; }
.wd-pg-group small { color: var(--wd-gris); font-size: 0.82rem; }
.wd-pg-group em { margin-left: auto; font-style: normal; font-size: 0.78rem; color: var(--wd-gris); }
.wd-pg-gap { padding: 0 22px 0 112px; border-top: 1px solid var(--wd-hairline); }
.wd-pg-gap span { display: inline-block; font-size: 0.76rem; color: var(--wd-gris); padding: 5px 0; border-left: 2px dotted var(--wd-hairline-2); padding-left: 12px; margin-left: -1px; }
.wd-pg-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 70px 74px; gap: 0 18px; align-items: start; padding: 14px 22px; border-top: 1px solid var(--wd-hairline); scroll-margin-top: 90px; transition: background 150ms var(--wd-ease); }
.wd-pg-group + .wd-pg-row { border-top: 1px solid var(--wd-hairline); }
.wd-pg-row:hover { background: #FDFCFA; }
.wd-pg-row:target { background: var(--wd-jaune-pale); }
.wd-pg-row.is-highlight { box-shadow: inset 3px 0 0 var(--wd-jaune); }
.wd-pg-time { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; padding-top: 1px; }
.wd-pg-time b { font-family: var(--wd-font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.wd-pg-time small { font-size: 0.8rem; color: var(--wd-gris); }
.wd-pg-time small::before { content: '→ '; }
.wd-pg-t { font-size: 0.98rem; font-weight: 600; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-family: var(--wd-font-sans); letter-spacing: 0; }
.wd-pg-t > i { color: var(--wd-gris); font-size: 0.95rem; }
.wd-pg-t a { color: var(--wd-onyx); text-decoration: none; }
.wd-pg-t a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-pg-flag { height: 20px; padding: 0 8px; border-radius: 999px; background: var(--wd-jaune-pale); color: #6B4F22; font-size: 0.7rem; font-weight: 600; display: inline-flex; align-items: center; }
.wd-pg-flag--focus { background: var(--wd-onyx); color: #fff; }
.wd-pg-d { margin: 4px 0 0; font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-pg-note { margin: 8px 0 0; font-size: 0.84rem; padding: 7px 10px; border-radius: 8px; background: var(--wd-papier); display: flex; gap: 8px; }
.wd-pg-note i { color: var(--wd-gris); }
.wd-pg-m { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.82rem; color: var(--wd-gris); }
.wd-pg-m span { display: inline-flex; align-items: center; gap: 5px; }
.wd-pg-m i { font-size: 0.85rem; }
.wd-pg-par { color: var(--wd-onyx); }
.wd-pg-dur { text-align: right; font-size: 0.84rem; color: var(--wd-gris); font-variant-numeric: tabular-nums; padding-top: 3px; white-space: nowrap; }
.wd-pg-act { display: flex; justify-content: flex-end; gap: 2px; }
.wd-pg-act form { margin: 0; }
.wd-pg-row:hover .wd-bud-ic, .wd-pg-row .wd-bud-ic:focus-visible { opacity: 1; }
.wd-pg-add { display: flex; align-items: center; gap: 6px; padding: 14px 22px; border-top: 1px solid var(--wd-hairline); font-size: 0.88rem; font-weight: 500; color: var(--wd-gris); text-decoration: none; }
.wd-pg-add:hover { color: var(--wd-onyx); background: #FDFCFA; }
.wd-pg-add .ms { font-size: 18px; }
.wd-pg-blank-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 767.98px) {
    .wd-pg-ribbon { padding: 28px 12px 12px; }
    .wd-pg-blk span { display: none; }
    .wd-pg-blk { padding: 0; }
    .wd-pg-group { padding: 10px 16px; }
    .wd-pg-gap { padding-left: 16px; }
    .wd-pg-row { grid-template-columns: 54px minmax(0, 1fr); gap: 0 12px; padding: 12px 16px; }
    .wd-pg-time b { font-size: 0.98rem; }
    .wd-pg-dur { display: none; }
    .wd-pg-act { grid-column: 2; justify-content: flex-start; margin: 4px 0 0 -8px; }
    .wd-pg-act .wd-bud-ic { opacity: 1; }
    .wd-pg-add { padding: 14px 16px; }
}
/* Le déroulé planner prend toute la largeur (timeline.css le borne à 940 px pour la vue récit) */
.wd-tl-day.wd-pg { max-width: none; margin-top: 0; }
@media (max-width: 767.98px) {
    .wd-rp-stats--pg .wd-rp-stat:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--wd-hairline); }
}
/* Étape du lendemain : le « +1 j » sous l'heure, pour qu'un 01:00 ne se lise pas comme le petit matin */
.wd-pg-time .wd-tl-nextday { margin-top: 4px; align-self: flex-start; }

/* ============================================================
   MODALE D'ÉTAPE DU PROGRAMME — la chaîne de défilement de Bootstrap
   exige que .modal-body soit l'enfant direct de .modal-content ; ici il
   est enveloppé par le conteneur AJAX puis par le <form>. Sans ces règles
   le contenu est coupé et le bouton « Ajouter » hors d'atteinte.
   ============================================================ */
.wd-tl-modal .modal-content > [data-timeline-entry-target="modalBody"],
.wd-tl-modal .wd-tlm-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.wd-tl-modal .modal-content > [data-timeline-entry-target="modalBody"] { overflow: hidden; }
.wd-tl-modal .wd-tlm-form > .modal-body { overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.wd-tl-modal .wd-tlm-form > .modal-footer { flex: none; }

.wd-tlm { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.wd-tlm .form-label { font-size: 0.8rem; font-weight: 500; color: var(--wd-onyx); margin-bottom: 5px; display: block; }
.wd-tlm .form-control, .wd-tlm .form-select { height: 40px; border: 1px solid var(--wd-hairline-2); border-radius: 10px; font-size: 0.9rem; background-color: #fff; }
.wd-tlm textarea.form-control { height: auto; }
.wd-tlm .form-control:focus, .wd-tlm .form-select:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-tlm-when { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 12px; }
.wd-tlm-when .form-control { font-variant-numeric: tabular-nums; }
.wd-tlm-hint { margin: -6px 0 0; font-size: 0.78rem; color: var(--wd-gris); }
.wd-tlm-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wd-tlm-icons { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.wd-tlm-icons .wd-tl-icon-opt { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 10px; border-color: var(--wd-hairline-2); }
.wd-tlm-icons .wd-tl-icon-opt > i { font-size: 1rem; color: var(--wd-gris); }
.wd-tlm-icons .wd-tl-icon-opt:hover { border-color: var(--wd-onyx); }
.wd-tlm-icons .wd-tl-icon-opt:hover > i { color: var(--wd-onyx); }
.wd-tlm-icons .wd-tl-icon-opt:has(input:checked) { background: var(--wd-onyx); border-color: var(--wd-onyx); box-shadow: none; }
.wd-tlm-icons .wd-tl-icon-opt:has(input:checked) > i { color: #fff; }
.wd-tlm-flags { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wd-tlm-flag { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--wd-hairline); border-radius: 12px; cursor: pointer; margin: 0; }
.wd-tlm-flag:has(input:checked) { border-color: var(--wd-jaune); background: #FFFCF6; }
.wd-tlm-flag--private:has(input:checked) { border-color: var(--wd-onyx); background: #fff; }
.wd-tlm-flag b { display: block; font-size: 0.88rem; font-weight: 600; }
.wd-tlm-flag small { display: block; font-size: 0.76rem; color: var(--wd-gris); }
.wd-tlm-flag .form-check-input { width: 2.1em; height: 1.15em; margin-top: 2px; cursor: pointer; }
.wd-tlm-flag .form-check-input:checked { background-color: var(--wd-onyx); border-color: var(--wd-onyx); }
.wd-tlm-flag .form-check-label { display: none; }
.wd-tlm-note summary { font-size: 0.84rem; font-weight: 500; cursor: pointer; color: var(--wd-gris); list-style: none; }
.wd-tlm-note summary::-webkit-details-marker { display: none; }
.wd-tlm-note summary::before { content: '+ '; }
.wd-tlm-note[open] summary { margin-bottom: 8px; color: var(--wd-onyx); }
.wd-tlm-note[open] summary::before { content: '− '; }
.wd-tl-modal .wd-tlm-foot { padding: 12px 22px; gap: 8px; border-top: 1px solid var(--wd-hairline); }
.wd-tl-modal .wd-tlm-foot .wd-ev-btn { height: 40px; padding: 0 16px; border-radius: var(--wd-r-ctl) !important; }
.wd-tl-modal .wd-tlm-foot .wd-ev-btn--primary { color: #fff; }
@media (max-width: 575.98px) {
    .wd-tlm { padding: 16px; }
    .wd-tlm-when { grid-template-columns: 1fr 1fr; }
    .wd-tlm-when > div:last-child { grid-column: 1 / -1; }
    .wd-tlm-3, .wd-tlm-flags { grid-template-columns: 1fr; }
    .wd-tl-modal .wd-tlm-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
    .wd-tl-modal .wd-tlm-foot .wd-ev-btn { flex: 1; justify-content: center; }
}

/* ============================================================
   INVITÉS — repères (réponses, couverts, repas, placement), barre
   d'outils (réponse, recherche, regroupement), table par famille.
   ============================================================ */
.wd-rp-stats--gu { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wd-rp-stats--gu .wd-rp-stat .w b { color: var(--wd-onyx); font-weight: 600; }
.wd-gu-warn { color: #8A5A12 !important; }
.wd-gu-meals { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-gu-bar { display: flex; height: 4px; border-radius: 2px; background: var(--wd-papier); overflow: hidden; margin-top: 6px; gap: 2px; }
.wd-gu-bar i { display: block; height: 100%; }
.wd-gu-bar .is-yes { background: #7FA07C; }
.wd-gu-bar .is-wait { background: repeating-linear-gradient(-45deg, #D9D2C6 0 3px, #EFEAE1 3px 6px); }
.wd-gu-bar .is-no { background: #C9C2B8; }

.wd-gu-bar-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.wd-gu-seg { display: inline-flex; background: var(--wd-papier); border-radius: 10px; padding: 3px; gap: 2px; }
.wd-gu-seg a { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 0.84rem; font-weight: 500; color: var(--ep-text-secondary); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.wd-gu-seg a em { font-style: normal; font-size: 0.76rem; color: var(--wd-gris); }
.wd-gu-seg a.on { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.wd-gu-search { position: relative; flex: 1 1 200px; max-width: 320px; margin: 0; }
.wd-gu-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--wd-gris); font-size: 0.85rem; }
.wd-gu-search input { width: 100%; height: 36px; border: 1px solid var(--wd-hairline-2); border-radius: 10px; padding: 0 12px 0 34px; font-size: 0.88rem; background: #fff; }
.wd-gu-search input:focus { outline: 0; border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-gu-view { margin-left: auto; }
.wd-gu-mail { height: 36px; }

.wd-gu-wrap { border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); overflow: hidden; }
.wd-gu { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.wd-gu th, .wd-gu td { padding: 11px 14px; vertical-align: middle; }
.wd-gu thead th { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wd-gris); border-bottom: 1px solid var(--wd-hairline); }
.wd-gu .c-who { padding-left: 22px; }
.wd-gu .c-rsvp { width: 160px; }
.wd-gu .c-meal { width: 24%; }
.wd-gu .c-table { width: 16%; }
.wd-gu .c-act { width: 74px; text-align: right; white-space: nowrap; }
.wd-gu .c-act form { display: inline; margin: 0; }
.wd-gu-group th { background: var(--wd-papier); font-weight: 600; font-size: 0.88rem; padding-left: 22px; border-top: 1px solid var(--wd-hairline); }
.wd-gu-group th small { color: var(--wd-gris); font-weight: 400; margin-left: 6px; font-size: 0.8rem; }
.wd-gu-row { border-top: 1px solid var(--wd-hairline); scroll-margin-top: 90px; transition: background 150ms var(--wd-ease); }
.wd-gu-row:hover { background: #FDFCFA; }
.wd-gu-row:target { background: var(--wd-jaune-pale); }
.wd-gu-row:hover .wd-bud-ic, .wd-gu-row .wd-bud-ic:focus-visible { opacity: 1; }
.wd-gu-row.is-declined .wd-gu-name { color: var(--wd-gris); }
.wd-gu-name { color: var(--wd-onyx); font-weight: 500; text-decoration: none; }
.wd-gu-name:hover { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-gu .c-who small, .wd-gu .c-table small { display: block; color: var(--wd-gris); font-size: 0.8rem; margin-top: 2px; }
.wd-gu .c-table small { display: inline; margin: 0 0 0 4px; }
.wd-gu-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-left: 6px; border-radius: 6px; background: var(--wd-papier); color: var(--wd-gris); font-size: 0.7rem; font-weight: 600; vertical-align: 1px; }
.wd-gu-muted { color: var(--wd-gris); font-size: 0.84rem; }
.wd-gu-allergy { display: flex !important; align-items: center; gap: 5px; color: #8A5A12 !important; }
.wd-gu-allergy i { font-size: 0.8rem; }
/* La réponse : une pastille qui s'ouvre sur les quatre choix */
.wd-gu-rsvp { height: 28px; padding: 0 6px 0 10px; border-radius: 999px; border: 1px solid transparent; font-size: 0.8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; background: var(--wd-papier); color: var(--ep-text-secondary); cursor: pointer; transition: border-color 150ms var(--wd-ease); }
span.wd-gu-rsvp { padding-right: 10px; cursor: default; }
.wd-gu-rsvp .ms { font-size: 18px; opacity: 0.6; }
.wd-gu-rsvp:hover { border-color: var(--wd-hairline-2); }
.wd-gu-rsvp.is-confirmed { background: var(--wd-st-ok-bg); color: var(--wd-st-ok); }
.wd-gu-rsvp.is-declined { background: #F1EEEA; color: var(--wd-gris); }
.wd-gu-rsvp.is-maybe { background: var(--wd-jaune-pale); color: #6B4F22; }
.wd-gu-rsvp-menu { min-width: 180px; }
.wd-gu-rsvp-menu form { margin: 0; }
.wd-gu-rsvp-menu .dropdown-item.active { background: var(--wd-papier); color: var(--wd-onyx); font-weight: 600; }
.wd-gu-dot { width: 8px; height: 8px; border-radius: 50%; background: #C9C2B8; flex: none; }
.wd-gu-dot.is-confirmed { background: #7FA07C; }
.wd-gu-dot.is-maybe { background: var(--wd-jaune); }
.wd-gu-dot.is-pending { background: transparent; box-shadow: inset 0 0 0 1.5px #A39B91; }
@media (max-width: 991.98px) {
    .wd-rp-stats--gu { grid-template-columns: 1fr 1fr; }
    .wd-rp-stats--gu .wd-rp-stat:nth-child(3) { border-left: 0; }
    .wd-rp-stats--gu .wd-rp-stat:nth-child(n+3) { border-top: 1px solid var(--wd-hairline); }
}
@media (max-width: 767.98px) {
    .wd-gu-view { margin-left: 0; }
    .wd-gu-search { max-width: none; flex-basis: 100%; order: -1; }
    .wd-gu thead { display: none; }
    .wd-gu, .wd-gu tbody, .wd-gu tr, .wd-gu th, .wd-gu td { display: block; width: auto !important; }
    .wd-gu-group th { padding: 10px 16px; }
    .wd-gu tr.wd-gu-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 16px; }
    .wd-gu-row td { padding: 0; }
    .wd-gu-row .c-who { grid-column: 1; grid-row: 1; padding-left: 0; }
    .wd-gu-row .c-rsvp { grid-column: 2; grid-row: 1; }
    .wd-gu-row .c-meal { grid-column: 1; grid-row: 2; font-size: 0.84rem; color: var(--wd-gris); }
    .wd-gu-row .c-table { grid-column: 2; grid-row: 2; text-align: right; font-size: 0.84rem; }
    /* Sur téléphone, on touche le nom pour modifier ; la suppression vit dans la fiche */
    .wd-gu-row .c-act { display: none; }
}
.wd-gu-rsvp:focus { outline: 0; }
.wd-gu-rsvp:focus-visible, .wd-gu-rsvp[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(201, 160, 99, 0.35); border-color: var(--wd-jaune); }
/* Un état vide qui suit directement le titre d'un chapitre (Invités, Programme,
   Rétroplanning vides) : l'air que donnent d'ordinaire les repères */
.wd-rp-head + .wd-rp-blank { margin-top: 24px; }
.wd-rp-blank--empty { padding: 40px 24px 36px; }

/* ============================================================
   FICHE INVITÉ — saisie en une colonne, fiche récapitulative collante
   à droite ; segments (un choix) et pastilles (plusieurs choix) rendus
   à la main ; sections secondaires repliées.
   ============================================================ */
.wd-gf-page { margin-top: 20px; }
.wd-gf { margin-top: 18px; }
.wd-gf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.wd-gf-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wd-gf .wd-bif-h { display: flex; align-items: baseline; gap: 8px; }
.wd-gf .wd-bif-h em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--wd-gris); font-size: 0.8rem; margin-left: auto; }
.wd-gf .form-label { font-size: 0.84rem; font-weight: 500; color: var(--wd-onyx); margin-bottom: 6px; display: block; }
.wd-gf .form-label small { color: var(--wd-gris); font-weight: 400; margin-left: 4px; }
.wd-gf .form-control, .wd-gf .form-select { height: 42px; border: 1px solid var(--wd-hairline-2); border-radius: 10px; font-size: 0.92rem; background-color: #fff; }
.wd-gf textarea.form-control { height: auto; }
.wd-gf .form-control:focus, .wd-gf .form-select:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-gf-f { min-width: 0; margin-bottom: 14px; }
.wd-bif-sec > .wd-gf-f:last-child, .wd-gf-row .wd-gf-f { margin-bottom: 0; }
.wd-gf-row { display: grid; gap: 12px; margin-bottom: 14px; }
.wd-gf-row--name { grid-template-columns: 110px 1fr 1fr; }
.wd-gf-row--2 { grid-template-columns: 1fr 1fr; align-items: start; }
.wd-gf-row--addr { grid-template-columns: 2fr 1fr 1.2fr; }
.wd-gf-row--stay { grid-template-columns: 1.4fr 90px 2fr; }
.wd-gf-row--table { grid-template-columns: 140px 1fr; max-width: 520px; }
.wd-gf-row--child { grid-template-columns: 120px auto; align-items: end; justify-content: start; gap: 24px; margin-bottom: 0; }
.wd-bif-sec > .wd-gf-row:last-child { margin-bottom: 0; }
.wd-gf-hint { font-size: 0.78rem; color: var(--wd-gris); margin: 6px 0 0; }
.wd-gf-private { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--wd-gris); margin: 4px 0 0; }
/* Segments : un seul choix */
.wd-gf-seg { display: inline-flex; flex-wrap: wrap; background: var(--wd-papier); border-radius: 10px; padding: 3px; gap: 2px; }
.wd-gf-seg .wd-gf-opt { margin: 0; cursor: pointer; }
.wd-gf-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-gf-seg .wd-gf-opt span { height: 34px; padding: 0 14px; border-radius: 8px; font-size: 0.86rem; font-weight: 500; color: var(--ep-text-secondary); display: inline-flex; align-items: center; transition: background 150ms var(--wd-ease); }
.wd-gf-seg .wd-gf-opt:hover span { color: var(--wd-onyx); }
.wd-gf-seg .wd-gf-opt input:checked + span { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.wd-gf-seg .wd-gf-opt input[value="confirmed"]:checked + span { background: var(--wd-st-ok-bg); color: var(--wd-st-ok); box-shadow: none; }
.wd-gf-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(201, 160, 99, 0.45) !important; }
/* Pastilles : plusieurs choix */
.wd-gf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-gf-chips .wd-gf-opt { margin: 0; cursor: pointer; }
.wd-gf-chips .wd-gf-opt span { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--wd-hairline-2); font-size: 0.84rem; display: inline-flex; align-items: center; gap: 5px; color: var(--ep-text-secondary); background: #fff; transition: background 150ms var(--wd-ease), border-color 150ms var(--wd-ease); }
.wd-gf-chips .wd-gf-opt span i { display: none; font-size: 0.9rem; }
.wd-gf-chips .wd-gf-opt:hover span { border-color: var(--wd-onyx); color: var(--wd-onyx); }
.wd-gf-chips .wd-gf-opt input:checked + span { background: var(--wd-onyx); border-color: var(--wd-onyx); color: #fff; }
.wd-gf-chips .wd-gf-opt input:checked + span i { display: inline; }
/* Groupe : la liste, ou un nom à créer */
.wd-gf-new { display: none; }
.wd-gf-group.is-new .wd-gf-pick { display: none; }
.wd-gf-group.is-new .wd-gf-new { display: block; }
/* Interrupteurs */
.wd-gf-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; margin: 0; min-height: 42px; }
.wd-gf-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-gf-switch input:checked + .wd-bif-switch-ui { background: var(--wd-onyx); }
.wd-gf-switch input:checked + .wd-bif-switch-ui::after { transform: translateX(16px); }
.wd-gf-switch input:focus-visible + .wd-bif-switch-ui { box-shadow: 0 0 0 3px rgba(201, 160, 99, 0.45); }
.wd-gf-age .form-control::placeholder { color: #A39B91; }
/* Foyer */
.wd-gf-companions { display: flex; flex-direction: column; gap: 8px; }
.wd-gf-companions:not(:empty) { margin-bottom: 10px; }
.wd-gf-companion { display: grid; grid-template-columns: 30px 150px 1fr 1fr 80px 30px; gap: 8px; align-items: center; padding: 8px 8px 8px 10px; border: 1px solid var(--wd-hairline); border-radius: 12px; }
.wd-gf-companion .wd-gf-f { margin: 0; }
.wd-gf-companion .form-control, .wd-gf-companion .form-select { height: 36px; font-size: 0.86rem; }
.wd-gf-companion:has(select option[value="partner"]:checked) .wd-gf-cage { visibility: hidden; }
.wd-gf-cx { position: static; transform: none; }
.wd-gf-av { width: 30px; height: 30px; border-radius: 10px; background: var(--wd-papier); color: var(--wd-gris); display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 600; flex: none; }
.wd-gf-chips-add { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-gf-add { height: 32px; padding: 0 12px 0 8px; border-radius: 999px; border: 1px dashed var(--wd-hairline-2); background: #fff; font-size: 0.84rem; color: var(--ep-text-secondary); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; margin: 0; }
.wd-gf-add .ms { font-size: 18px; }
.wd-gf-add:hover { border-color: var(--wd-onyx); color: var(--wd-onyx); }
.wd-gf-add--toggle { padding: 0 12px; }
.wd-gf-add--toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-gf-add--toggle:has(input:checked) { background: var(--wd-onyx); border: 1px solid var(--wd-onyx); color: #fff; }
.wd-gf-link { margin-top: 12px; }
.wd-gf-link summary { font-size: 0.84rem; color: var(--wd-gris); cursor: pointer; list-style: none; }
.wd-gf-link summary::-webkit-details-marker { display: none; }
.wd-gf-link summary::before { content: '+ '; }
.wd-gf-link[open] summary { margin-bottom: 8px; color: var(--wd-onyx); }
.wd-gf-link .form-select { max-width: 360px; }
.wd-gf-household-of { margin: 0; font-size: 0.9rem; }
.wd-gf-household-of a { color: var(--wd-onyx); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
/* Sections repliées */
.wd-gf-fold { padding: 0; }
.wd-gf-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 22px; }
.wd-gf-fold > summary::-webkit-details-marker { display: none; }
.wd-gf-fold > summary .wd-bif-h { margin: 0; }
.wd-gf-fold > summary small { color: var(--wd-gris); font-size: 0.82rem; }
.wd-gf-fold > summary .ms { margin-left: auto; color: var(--wd-gris); transition: transform 200ms var(--wd-ease); }
.wd-gf-fold[open] > summary .ms { transform: rotate(180deg); }
.wd-gf-fold[open] > summary small { display: none; }
.wd-gf-fold > :not(summary) { margin-left: 22px; margin-right: 22px; width: auto; }
.wd-gf-fold > textarea.form-control { width: calc(100% - 44px); }
.wd-gf-fold[open] { padding-bottom: 20px; }
/* Contraintes de placement */
.wd-gf-rel-src { display: none !important; }
.wd-gf-rel-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wd-gf-rel-chip { height: 32px; padding: 0 6px 0 12px; border-radius: 999px; border: 1px solid var(--wd-jaune); background: var(--wd-jaune-pale); color: #6B4F22; font-size: 0.84rem; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; }
.wd-gf-rel:last-of-type .wd-gf-rel-chip { border-color: var(--wd-onyx); background: var(--wd-onyx); color: #fff; }
.wd-gf-rel-chip .ms { font-size: 16px; opacity: 0.7; }
.wd-gf .wd-gf-rel-add { width: auto; height: 32px; border-radius: 999px; border-style: dashed; font-size: 0.84rem; padding-top: 0; padding-bottom: 0; }
/* Fiche récapitulative */
.wd-gf-side { position: sticky; top: 84px; border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-card); padding: 18px 20px; background: #fff; }
.wd-gf-side-h { font-size: 0.72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wd-gris); margin-bottom: 12px; }
.wd-gf-who { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; min-width: 0; }
.wd-gf-who .wd-gf-av { width: 44px; height: 44px; border-radius: 14px; font-size: 1rem; background: var(--wd-jaune-pale); color: #6B4F22; }
.wd-gf-who b { font-family: var(--wd-font-display); font-size: 1.1rem; display: block; line-height: 1.2; }
.wd-gf-who small { color: var(--wd-gris); font-size: 0.82rem; }
.wd-gf-sum { list-style: none; margin: 0; padding: 0; font-size: 0.86rem; }
.wd-gf-sum li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--wd-hairline); }
.wd-gf-sum li[hidden] { display: none; }
.wd-gf-sum li i { color: var(--wd-gris); width: 16px; text-align: center; flex: none; }
.wd-gf-warn { color: #8A5A12; }
.wd-gf-side-foot { display: flex; gap: 8px; margin-top: 16px; }
.wd-gf-side-foot .wd-ev-btn { flex: 1; justify-content: center; height: 42px; }
.wd-gf-side-foot .wd-ev-btn--primary { color: #fff; }
.wd-gf-page .wd-bif-delete { max-width: calc(100% - 344px); }
@media (max-width: 991.98px) {
    .wd-gf-grid { grid-template-columns: 1fr; }
    .wd-gf-side { position: static; }
    .wd-gf-page .wd-bif-delete { max-width: none; }
    /* Ligne du foyer : lien + ×, puis prénom | nom, puis l'âge d'un enfant */
    .wd-gf-companion { grid-template-columns: 1fr 1fr 30px; padding: 10px; }
    .wd-gf-companion > .wd-gf-av { display: none; }
    .wd-gf-companion .wd-gf-kind { grid-column: 1 / 3; grid-row: 1; }
    .wd-gf-companion .wd-gf-cx { grid-column: 3; grid-row: 1; }
    .wd-gf-companion .wd-gf-cage { grid-column: 1; }
    .wd-gf-companion:has(select option[value="partner"]:checked) .wd-gf-cage { display: none; }
}
@media (max-width: 575.98px) {
    .wd-gf-row--name, .wd-gf-row--addr, .wd-gf-row--stay { grid-template-columns: 1fr 1fr; }
    .wd-gf-row--name > :first-child, .wd-gf-row--addr > :first-child, .wd-gf-row--stay > :last-child { grid-column: 1 / -1; }
    .wd-gf-row--2 { grid-template-columns: 1fr; }
    .wd-gf .wd-bif-h em { display: none; }
    .wd-gf-seg { display: flex; }
    .wd-gf-seg .wd-gf-opt { flex: 1 1 auto; }
    .wd-gf-seg .wd-gf-opt span { width: 100%; justify-content: center; padding: 0 10px; }
    .wd-gf-fold > summary small { display: none; }
}
.wd-gu-tag--role { background: var(--wd-jaune-pale); color: #6B4F22; }

/* Suggestions d'adresse (Base Adresse Nationale) */
.wd-addr-anchor { position: relative; }
.wd-addr-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--wd-hairline); border-radius: 12px; box-shadow: 0 12px 32px rgba(27, 24, 22, 0.12); }
.wd-addr-list[hidden] { display: none; }
.wd-addr-list [role="option"] { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.wd-addr-list [role="option"] .ms { font-size: 18px; color: var(--wd-gris); }
.wd-addr-list [role="option"] b { display: block; font-weight: 500; font-size: 0.9rem; }
.wd-addr-list [role="option"] small { display: block; color: var(--wd-gris); font-size: 0.8rem; }
.wd-addr-list [role="option"]:hover, .wd-addr-list [role="option"].is-active { background: var(--wd-papier); }
.wd-addr-credit { font-size: 0.7rem; color: var(--wd-gris); padding: 6px 10px 2px; text-align: right; }
/* Âge : champ court, unité à droite ; libellé secondaire de l'interrupteur */
.wd-gf-unit { position: relative; }
.wd-gf-unit .form-control { padding-right: 40px; font-variant-numeric: tabular-nums; }
.wd-gf-unit > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--wd-gris); font-size: 0.86rem; pointer-events: none; }
.wd-gf-switch small { display: block; color: var(--wd-gris); font-size: 0.78rem; }

/* ============================================================
   FORMULAIRE D'ÉVÉNEMENT — création et modification : une colonne de
   saisie dans la grammaire de la fiche invité (.wd-bif-sec, .wd-gf-*) ;
   à droite l'aperçu de la couverture noire du dossier, mis à jour
   pendant la saisie (event_form_controller), la photo et les boutons.
   ============================================================ */
.wd-gf-page.wd-evf-page { margin-top: 0; }
.wd-evf .wd-evf-hint { margin: -4px 0 14px; }
/* Statut : « En préparation » porte l'or chaud, « Annulé » le rouge pâle */
.wd-evf .wd-gf-seg .wd-gf-opt input[value="planning"]:checked + span { background: var(--wd-jaune-pale); color: #6B4F22; box-shadow: none; }
.wd-evf .wd-gf-seg .wd-gf-opt input[value="cancelled"]:checked + span { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); box-shadow: none; }
/* Adresse : la zone de texte se tient comme un champ d'une ligne */
.wd-evf textarea.wd-evf-addr { height: 42px; min-height: 42px; resize: none; overflow: hidden; line-height: 1.45; padding-top: 9px; }
.wd-evf-venue { border: 1px solid var(--wd-hairline); border-radius: 14px; background: #FDFCFA; padding: 14px 16px; margin-bottom: 14px; }
.wd-evf-venue-h { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 0.84rem; font-weight: 600; color: var(--wd-onyx); }
.wd-evf-venue-h .ms { font-size: 18px; color: var(--wd-fumee-fonce); }
.wd-evf-venue .wd-gf-row { margin-bottom: 0; }
.wd-evf-venue .wd-gf-hint { margin-top: 10px; }
/* Enveloppe : un montant bien lisible, l'unité dans le champ */
.wd-evf-env .wd-bif-money { max-width: 260px; }
.wd-evf .wd-evf-env .wd-bif-money .form-control { height: 48px; font-size: 1.1rem; font-family: var(--wd-font-display); font-weight: 600; }
/* Aperçu : la couverture du dossier, en petit */
.wd-evf-cover { position: relative; padding: 18px; margin-bottom: 14px; border-radius: 16px; background: var(--wd-onyx); color: #fff; overflow: hidden; }
.wd-evf-av { width: 56px; height: 56px; border-radius: 18px; background: #fff; color: var(--wd-onyx); font-size: 1rem; margin-bottom: 14px; }
.wd-evf-cover:hover .wd-evf-av { transform: rotate(-4deg) scale(1.04); }
.wd-evf-av .ms { font-size: 24px; color: var(--wd-fumee-fonce); }
.wd-evf-cover .wd-ev-jchip { position: absolute; top: 18px; right: 18px; height: 30px; padding: 0 11px; font-size: 0.86rem; color: var(--wd-onyx); }
.wd-evf-cover .wd-ev-jchip[hidden] { display: none; }
.wd-evf-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wd-evf-tags .wd-st { background: rgba(255, 255, 255, 0.12); color: #fff; }
.wd-evf-tags .wd-st:empty, .wd-evf-tags .wd-st[hidden] { display: none; }
.wd-evf-tags .wd-st.wd-st-accent { background: var(--wd-jaune-pale); color: #6B4F22; }
.wd-evf-tags .wd-st.wd-st-ok { background: var(--wd-st-ok-bg); color: var(--wd-st-ok); }
.wd-evf-tags .wd-st.wd-st-danger { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-evf-title { display: block; font-family: var(--wd-font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.wd-evf-meta { flex-direction: column; gap: 5px; margin-top: 10px; font-size: 0.84rem; }
.wd-evf-meta li[hidden] { display: none; }
.wd-evf-meta li .ms { font-size: 17px; }
/* Photo : tout le cadre est le bouton (le champ fichier reste focalisable) */
.wd-evf-photo { position: relative; display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border: 1.5px dashed var(--wd-hairline-2); border-radius: 12px; background: #FDFCFA; cursor: pointer; transition: border-color 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-evf-photo:hover { border-color: var(--wd-onyx); background: #fff; }
.wd-evf-photo .ms { font-size: 22px; color: var(--wd-fumee-fonce); transition: transform 240ms var(--wd-ease); }
.wd-evf-photo:hover .ms { transform: translateY(-2px); }
.wd-evf-photo .t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.wd-evf-photo b { font-size: 0.88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-evf-photo small { font-size: 0.78rem; color: var(--wd-fumee-fonce); }
.wd-evf-photo input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.wd-evf-photo:has(input:focus-visible) { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-evf-photo.is-picked { border-style: solid; border-color: var(--wd-onyx); background: var(--wd-papier); }
.wd-evf-photo.is-picked .ms { color: var(--wd-onyx); }
.wd-evf-remove { margin-top: 8px; min-height: 36px; font-size: 0.86rem; }
.wd-evf-side .wd-gf-hint { margin-top: 8px; }
.wd-evf-side .wd-gf-side-foot .wd-ev-btn--primary { flex: 2; }

/* ============================================================
   CALENDRIER DES ÉVÉNEMENTS — mois, semaine, jour (vue Calendrier de
   /events). Barre sans cadre au-dessus d'une carte en relief ; un
   événement = pastille teintée par son statut, avec l'avatar du dossier
   et les prénoms du couple. Le calendrier des tâches (/tasks) reprend
   la même grammaire, en fin de section.
   ============================================================ */
.wd-cal { margin-bottom: 24px; }
.wd-cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.wd-cal-nav, .wd-cal-modes { display: flex; align-items: center; gap: 8px; }
.wd-cal-prev .ms { transform: rotate(180deg); }
.wd-cal-nav .wd-ev-btn--icon .ms { font-size: 20px; }
.wd-cal-title { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 4px 8px 4px 10px; border: 0; border-radius: 10px; background: none; font-family: var(--wd-font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--wd-onyx); white-space: nowrap; transition: background 150ms var(--wd-ease); }
.wd-cal-title:hover { background: var(--wd-papier); }
.wd-cal-chev { font-size: 22px; color: var(--ep-text-muted); transition: transform 200ms var(--wd-ease); }
.wd-cal-title.ep-calendar-title-btn--open .wd-cal-chev { transform: rotate(180deg); }
.wd-cal-seg { display: inline-flex; background: var(--wd-papier); border-radius: 10px; padding: 3px; gap: 2px; }
.wd-cal-seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font-size: 0.86rem; font-weight: 500; color: var(--ep-text-secondary); transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-cal-seg button:hover { color: var(--wd-onyx); }
.wd-cal-seg button.active { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
/* Choix du mois, sous le titre */
.wd-cal .wd-cal-picker { top: 50px; left: 92px; transform: none; min-width: 280px; padding: 14px; border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-panel); box-shadow: var(--wd-shadow-lift); }
.wd-cal-picker .ep-month-picker-year > span { font-family: var(--wd-font-display); font-weight: 600; color: var(--wd-onyx); }
.wd-cal-picker .ep-month-picker-year button .ms { font-size: 18px; font-weight: 400; color: inherit; }
.wd-cal-picker .ep-month-picker-year button { width: 32px; height: 32px; padding: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ep-text-secondary); }
.wd-cal-picker .ep-month-picker-year button:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-cal-picker .ep-month-picker-year .ms { font-size: 18px; }
.wd-cal-picker .ep-month-picker-month { height: 36px; border-radius: 8px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-cal-picker .ep-month-picker-month:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-cal-picker .ep-month-picker-month.active { background: var(--wd-onyx); color: #fff; }
.wd-cal .ep-calendar-content.loading::after { border-top-color: var(--wd-onyx); }
/* La carte */
.wd-cal-card { background: var(--wd-card-bg); border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); overflow: hidden; }
/* Mois */
.wd-cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--wd-hairline); }
.wd-cal-dow span { padding: 12px 12px 10px; font-size: 0.8rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-cal-dow span.is-we { color: var(--ep-text-muted); }
.wd-cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wd-cal-day { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 118px; padding: 8px 8px 10px; border-right: 1px solid var(--wd-hairline); border-bottom: 1px solid var(--wd-hairline); transition: background 150ms var(--wd-ease); }
.wd-cal-day:nth-child(7n) { border-right: 0; }
.wd-cal-days > .wd-cal-day:nth-last-child(-n+7) { border-bottom: 0; }
.wd-cal-day.is-we { background: #FCFBF9; }
.wd-cal-day.is-out { background: #FAF8F5; }
.wd-cal-day:not(.is-out):hover { background: #F9F7F3; }
.wd-cal-day-head { display: flex; align-items: center; justify-content: space-between; min-height: 26px; }
.wd-cal-day .n { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 999px; font-size: 0.84rem; font-weight: 500; color: var(--wd-onyx); font-variant-numeric: tabular-nums; }
.wd-cal-day.is-out .n { color: #C2BAAF; }
.wd-cal-day > .n { align-self: flex-start; }
.wd-cal-day.is-past .n { color: var(--ep-text-muted); }
.wd-cal-day.is-today .n, .wd-cal-wday.is-today .wd-cal-wday-head .n { background: var(--wd-onyx); color: #fff; font-weight: 600; }
.wd-cal-add { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ep-text-secondary); text-decoration: none; opacity: 0; transform: scale(0.85); transition: opacity 150ms var(--wd-ease), transform 200ms var(--wd-ease), background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-cal-add .ms { font-size: 18px; }
.wd-cal-day:hover .wd-cal-add, .wd-cal-wday:hover .wd-cal-add, .wd-cal-add:focus-visible { opacity: 1; transform: none; }
.wd-cal-add:hover { background: var(--wd-onyx); color: #fff; }
.wd-cal-more { padding: 0 6px; font-size: 0.76rem; color: var(--ep-text-secondary); }
/* Un événement : pastille teintée par son statut (l'or chaud pour « En préparation ») */
.wd-cal-ev { --st: #5C5A56; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 3px 8px 3px 3px; border-radius: 9px; background: color-mix(in srgb, var(--st) 12%, #fff); color: var(--wd-onyx); font-size: 0.8rem; line-height: 1.25; text-decoration: none; transition: background 150ms var(--wd-ease), transform 200ms var(--wd-ease), box-shadow 200ms var(--wd-ease); }
.wd-cal-ev:hover { background: color-mix(in srgb, var(--st) 20%, #fff); color: var(--wd-onyx); transform: translateY(-1px); box-shadow: 0 4px 10px -6px rgba(27, 24, 22, 0.35); }
.wd-cal-ev.is-planning, .wd-cal-st.is-planning { --st: #C9A063; }
.wd-cal-ev.is-confirmed, .wd-cal-st.is-confirmed { --st: #6B8E6F; }
.wd-cal-ev.is-completed, .wd-cal-st.is-completed { --st: #8E867C; }
.wd-cal-ev.is-cancelled, .wd-cal-st.is-cancelled { --st: #B25A4A; }
.wd-cal-ev.is-cancelled b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--st) 70%, transparent); }
.wd-cal-av { width: 20px; height: 20px; flex: none; border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: #fff; font-family: var(--wd-font-display); font-weight: 600; font-size: 0.58rem; color: var(--wd-onyx); }
.wd-cal-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-cal-ev .t { min-width: 0; display: flex; flex-direction: column; }
.wd-cal-ev b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cal-ev small { font-size: 0.74rem; color: color-mix(in srgb, var(--st) 55%, #000); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Semaine */
.wd-cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wd-cal-wday { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 280px; padding: 10px 8px 12px; border-right: 1px solid var(--wd-hairline); }
.wd-cal-wday:last-child { border-right: 0; }
.wd-cal-wday.is-we { background: #FCFBF9; }
.wd-cal-wday-head { display: flex; align-items: center; gap: 6px; padding: 0 2px 10px; border-bottom: 1px solid var(--wd-hairline); }
.wd-cal-wday-head .d { font-size: 0.8rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-cal-wday-head .n { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 999px; font-family: var(--wd-font-display); font-weight: 600; font-size: 1.2rem; color: var(--wd-onyx); font-variant-numeric: tabular-nums; }
.wd-cal-wday.is-past .wd-cal-wday-head .n { color: var(--ep-text-muted); }
.wd-cal-wday-head .wd-cal-add { margin-left: auto; }
.wd-cal-wday-evs { display: flex; flex-direction: column; gap: 6px; }
.wd-cal-wday .wd-cal-ev { align-items: flex-start; padding: 6px 8px 6px 6px; }
.wd-cal-wday .wd-cal-av { width: 28px; height: 28px; border-radius: 8px; font-size: 0.66rem; }
.wd-cal-wday .wd-cal-ev b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* Jour : lignes de registre */
.wd-cal-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 12px 20px; border-bottom: 1px solid var(--wd-hairline); font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-cal-list-head b { color: var(--wd-onyx); font-weight: 600; }
.wd-cal-list-head .wd-ev-btn .ms { font-size: 18px; }
.wd-cal-row { display: grid; grid-template-columns: 44px minmax(0, 1.4fr) minmax(0, 1fr) 110px 130px; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--wd-hairline); color: var(--wd-onyx); text-decoration: none; transition: background 150ms var(--wd-ease); }
.wd-cal-row:last-child { border-bottom: 0; }
.wd-cal-row:hover { background: #F9F7F3; color: var(--wd-onyx); }
.wd-cal-row .wd-cal-row-av { width: 44px; height: 44px; border-radius: 14px; font-size: 0.82rem; }
.wd-cal-row .main, .wd-cal-row .place { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.wd-cal-row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cal-row .main b { font-family: var(--wd-font-display); font-size: 1rem; }
.wd-cal-row .place b { font-weight: 500; }
.wd-cal-row small { font-size: 0.82rem; color: var(--ep-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cal-row .guests { font-size: 0.88rem; color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; }
.wd-cal-st { --st: #5C5A56; justify-self: start; height: 26px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 0.8rem; font-weight: 500; white-space: nowrap; background: color-mix(in srgb, var(--st) 13%, #fff); color: color-mix(in srgb, var(--st) 85%, #000); }
.wd-cal-empty { padding: 48px 24px; }
.wd-cal-empty .wd-ev-btn--primary { margin-top: 14px; }
@media (max-width: 767.98px) {
    .wd-cal-nav { width: 100%; }
    .wd-cal-title { font-size: 1.15rem; margin-left: 2px; }
    .wd-cal-modes { width: 100%; }
    .wd-cal-seg { flex: 1; }
    .wd-cal-seg button { flex: 1; padding: 0 8px; }
    .wd-cal .wd-cal-picker { left: 0; right: 0; min-width: 0; }
    /* Mois : des cases serrées, les événements deviennent des traits de couleur */
    .wd-cal-dow span { padding: 8px 0; text-align: center; font-size: 0.72rem; }
    .wd-cal-day { min-height: 64px; padding: 4px 3px 6px; gap: 3px; align-items: center; }
    .wd-cal-day-head { justify-content: center; min-height: 24px; }
    .wd-cal-day .n { min-width: 24px; height: 24px; font-size: 0.78rem; }
    .wd-cal-day > .n { align-self: center; }
    .wd-cal-add { display: none; }
    .wd-cal-day .wd-cal-ev { width: 100%; height: 6px; padding: 0; border-radius: 3px; background: var(--st); }
    .wd-cal-day .wd-cal-ev > * { display: none; }
    .wd-cal-more { padding: 0; font-size: 0.66rem; }
    /* Semaine : un jour par ligne */
    .wd-cal-week { grid-template-columns: 1fr; }
    .wd-cal-wday { min-height: 0; flex-direction: row; align-items: flex-start; gap: 12px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--wd-hairline); }
    .wd-cal-wday:last-child { border-bottom: 0; }
    .wd-cal-wday-head { flex-direction: column; gap: 0; width: 44px; flex: none; padding: 0; border-bottom: 0; }
    .wd-cal-wday-evs { flex: 1; min-width: 0; padding-top: 4px; }
    .wd-cal-wday:has(.wd-cal-wday-evs:empty) { align-items: center; }
    /* Jour : avatar, couple, statut ; le lieu passe en seconde ligne */
    .wd-cal-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; }
    .wd-cal-row .wd-cal-row-av { width: 40px; height: 40px; border-radius: 12px; grid-row: span 2; }
    .wd-cal-row .place { grid-column: 2 / -1; grid-row: 2; flex-direction: row; gap: 6px; }
    .wd-cal-row .place b { font-weight: 400; font-size: 0.82rem; color: var(--ep-text-secondary); }
    .wd-cal-row .guests { display: none; }
    .wd-cal-row .wd-cal-st { grid-column: 3; grid-row: 1; }
}

/* ── Calendrier des tâches (/tasks, vue Calendrier) : mêmes cases ; une tâche =
   case d'état + titre, l'or chaud pour « En cours », le rouge pour le retard,
   les tâches faites s'effacent et se barrent ── */
.wd-cal-task { --st: #5C5A56; padding: 4px 8px 4px 6px; }
.wd-cal-task.is-t-in_progress { --st: #C9A063; }
.wd-cal-task.is-t-completed, .wd-cal-task.is-t-cancelled { --st: #8E867C; background: transparent; box-shadow: inset 0 0 0 1px var(--wd-hairline); }
.wd-cal-task.is-t-completed b, .wd-cal-task.is-t-cancelled b { color: var(--ep-text-muted); font-weight: 400; text-decoration: line-through; }
.wd-cal-task.is-late { --st: #B0392E; }
.wd-cal-task.is-late b { color: var(--wd-st-danger); }
.wd-cal-tick { position: relative; width: 14px; height: 14px; flex: none; border-radius: 5px; border: 1.5px solid color-mix(in srgb, var(--st, #8E867C) 60%, #fff); background: #fff; }
.wd-cal-tick.is-done { background: var(--wd-onyx); border-color: var(--wd-onyx); }
.wd-cal-tick.is-done::after { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5l3 3 6-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 10px no-repeat; }
.wd-cal-pri { width: 7px; height: 7px; flex: none; margin-left: auto; border-radius: 50%; background: var(--wd-jaune); }
.wd-cal-pri.is-urgent { background: var(--wd-st-danger); }
.wd-cal-wday .wd-cal-task .wd-cal-tick { margin-top: 2px; }
.wd-cal-wday .wd-cal-pri { margin-top: 5px; }
/* Jour : lignes de tâches */
.wd-cal-row--task { grid-template-columns: 18px minmax(0, 1.6fr) minmax(0, 1fr) 96px 120px; }
.wd-cal-row--task .wd-cal-tick { width: 18px; height: 18px; border-radius: 6px; }
.wd-cal-row--task .main b { font-family: var(--wd-font-sans); font-size: 0.94rem; }
.wd-cal-row--task.is-done .main b { color: var(--ep-text-muted); font-weight: 500; text-decoration: line-through; }
.wd-cal-row--task.is-late .main b { color: var(--wd-st-danger); }
.wd-cal-row .who { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-cal-who { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--wd-onyx); color: #fff; font-style: normal; font-size: 0.62rem; font-weight: 600; display: grid; place-items: center; }
.wd-cal-st.is-t-pending { --st: #5C5A56; }
.wd-cal-st.is-t-in_progress, .wd-cal-st.is-p-high { --st: #C9A063; }
.wd-cal-st.is-t-completed { --st: #6B8E6F; }
.wd-cal-st.is-t-cancelled, .wd-cal-st.is-p-low { --st: #8E867C; }
.wd-cal-st.is-p-urgent, .wd-cal-row--task.is-late > .wd-cal-st { --st: #B0392E; }
@media (max-width: 767.98px) {
    .wd-cal-row--task { grid-template-columns: 18px minmax(0, 1fr) auto; }
    .wd-cal-row--task .wd-cal-tick { grid-row: span 2; align-self: start; margin-top: 3px; }
    .wd-cal-row--task .who { grid-column: 2 / -1; grid-row: 2; font-size: 0.8rem; color: var(--ep-text-secondary); }
    .wd-cal-row--task .who .wd-cal-who { width: 18px; height: 18px; font-size: 0.5rem; }
    .wd-cal-row--task .pri { display: none; }
}

/* ============================================================
   FICHE CLIENT — réorganisée d'après la revue UX du 22/10 : carte-titre
   noire avec UNE action selon le stade, « À faire » (absent si rien
   n'attend), une carte par événement avec ses pièces, un seul fil de
   suivi, et à côté le couple (contact + accès au portail).
   ============================================================ */
/* A. Carte-titre */
.wd-cl .wd-ev-cover .wd-ev-meta { align-items: center; }
.wd-cl .wd-ev-cover .wd-st { height: 26px; }
.wd-cl-cover .wd-ev-cover-right { flex-wrap: wrap; justify-content: flex-end; }
.wd-cl-cover .wd-ev-cover-right .wd-ev-btn .ms { font-size: 18px; color: inherit; }
.wd-cl-status { border: 0; gap: 2px; padding: 0 6px 0 10px; cursor: pointer; transition: filter 150ms var(--wd-ease); }
.wd-cl-status .ms { font-size: 16px; opacity: 0.75; }
.wd-cl-status:hover { filter: brightness(1.12); }
.wd-cl-status-menu { min-width: 190px; }
.wd-cl-status-menu .dropdown-item i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.wd-cl-primary { height: 38px; padding: 0 12px 0 16px; border: 0; border-radius: var(--wd-r-ctl); background: #fff; color: var(--wd-onyx); font-size: 0.88rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: transform 200ms var(--wd-ease), box-shadow 200ms var(--wd-ease); }
.wd-cl-primary .ms { font-size: 18px; transition: transform 200ms var(--wd-ease); }
.wd-cl-primary:hover { color: var(--wd-onyx); transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5); }
.wd-cl-primary:hover .ms { transform: translateX(2px); }
.wd-cl-primary:disabled { opacity: 0.6; }
/* Sous la carte, sur téléphone : l'action principale en pleine largeur, noire */
.wd-cl-primary--wide { width: 100%; justify-content: center; height: 46px; margin: 12px 0 4px; background: var(--wd-onyx); color: #fff; }
.wd-cl-primary--wide:hover { color: #fff; }
.wd-cl-danger, .wd-cl-danger .ms { color: var(--wd-st-danger) !important; }
.wd-cl-danger:hover { background: var(--wd-st-danger-bg) !important; }
/* Onglets : la grammaire du dossier événement (.wd-dossier-tabs, sélecteur mobile) */
.wd-cl .wd-dossier-tabs { margin-bottom: 24px; }
.wd-cl .wd-ev-cols { margin-top: 0; }
.wd-cl > .wd-ev-panel { margin-bottom: 24px; }
.wd-cl > .wd-rp-head { margin-bottom: 18px; }
/* Vue d'ensemble : les cartes de santé du dossier, en relief comme les autres blocs de la fiche */
.wd-cl .wd-health-card { border-color: var(--wd-card-border); box-shadow: var(--wd-card-shadow); }
.wd-cl .wd-health-card:hover { box-shadow: 0 1px 2px rgba(27, 24, 22, 0.06), 0 24px 40px -20px rgba(27, 24, 22, 0.32); }
.wd-cl > .wd-rp-head .wd-ev-btn .ms { font-size: 18px; }
.wd-cl > .wd-rp-head .wd-ev-btn--primary { color: #fff; }
.wd-cl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.wd-cl-head .wd-ev-h { margin: 0; }
.wd-cl .wd-ev-add { text-decoration: none; }
.wd-cl .wd-ev-h small { margin-left: 4px; font-family: var(--wd-font-sans); font-size: 0.82rem; font-weight: 500; color: var(--ep-text-muted); }
.wd-cl-link { border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: 2px; font-size: 0.86rem; font-weight: 500; color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-cl-link:hover { color: var(--wd-onyx); text-decoration-thickness: 3px; }
.wd-cl-textbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 500; color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--wd-jaune); cursor: pointer; }
.wd-cl-textbtn:hover { text-decoration-thickness: 2px; }
.wd-cl-inline-form { display: inline; margin: 0; }
/* B. À faire : le composant « À faire maintenant » de la fiche, en relief */
.wd-cl .wd-cl-todo { margin-bottom: 0; border-color: var(--wd-card-border); box-shadow: var(--wd-card-shadow); }
.wd-cl-todo .wd-now-head h4 small { color: var(--ep-text-muted); }
.wd-cl-todo .wd-now-rows li { gap: 16px; height: auto; min-height: 52px; padding: 8px 0; }
.wd-cl-todo .wd-now-rows .t { white-space: normal; display: flex; flex-direction: column; line-height: 1.3; }
.wd-cl-todo .wd-now-rows .t small { font-weight: 400; font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-cl-todo .wd-now-rows li.is-late .t { color: var(--wd-st-danger); }
.wd-cl-todo .wd-now-rows li.is-late .t::before { content: ''; display: none; }
.wd-cl-todo .wd-now-link { flex: none; white-space: nowrap; }
/* C. Le mariage : une carte par événement, ses pièces dessous */
.wd-cl-wed .wd-ev-h { margin-bottom: 14px; }
.wd-cl-ev + .wd-cl-ev { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--wd-hairline); }
.wd-cl-ev-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 20px; align-items: center; gap: 14px; margin: -8px -12px 0; padding: 8px 12px; border-radius: 14px; color: var(--wd-onyx); text-decoration: none; transition: background 150ms var(--wd-ease); }
.wd-cl-ev-head:hover { background: #F9F7F3; color: var(--wd-onyx); }
.wd-cl-ev-head .wd-cl-ev-av { width: 52px; height: 52px; border-radius: 16px; font-size: 0.9rem; }
.wd-cl-ev-head .main { min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.wd-cl-ev-head .main b { font-family: var(--wd-font-display); font-size: 1.02rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cl-ev-head .main small { font-size: 0.82rem; color: var(--ep-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cl-chev { font-size: 18px; color: var(--ep-text-muted); transition: transform 200ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-cl-ev-head:hover .wd-cl-chev { color: var(--wd-onyx); transform: translateX(2px); }
.wd-cl-money { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 12px 0 6px; padding: 10px 14px; border-radius: 12px; background: #FBF9F6; font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-cl-money b { margin-left: 4px; color: var(--wd-onyx); font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-cl-money .is-bad, .wd-cl-money .is-bad b { color: var(--wd-st-danger); }
.wd-cl-money--link { align-items: center; text-decoration: none; transition: background 150ms var(--wd-ease); }
.wd-cl-money--link > .ms { margin-left: auto; font-size: 17px; color: var(--ep-text-muted); transition: transform 200ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-cl-money--link:hover { background: var(--wd-papier); color: var(--ep-text-secondary); }
.wd-cl-money--link:hover > .ms { color: var(--wd-onyx); transform: translateX(2px); }
.wd-cl-wed .wd-cl-money--link { margin-bottom: 0; }
/* Devis & factures : en-tête de groupe = l'événement */
.wd-cl-group-h { display: inline-flex; align-items: baseline; gap: 8px; margin: 0 0 2px; color: var(--wd-onyx); text-decoration: none; }
.wd-cl-group-h b { font-family: var(--wd-font-display); font-size: 1rem; font-weight: 600; }
.wd-cl-group-h small { font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-cl-group-h .ms { align-self: center; font-size: 16px; color: var(--ep-text-muted); transition: transform 200ms var(--wd-ease); }
.wd-cl-group-h:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-cl-group-h:hover .ms { transform: translateX(2px); color: var(--wd-onyx); }
.wd-cl-loose-h { margin: 0 0 4px; font-size: 0.84rem; font-weight: 600; color: var(--ep-text-secondary); }
.wd-cl-docs { margin: 0 -12px; }
.wd-cl-row { display: grid; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 12px; color: var(--wd-onyx); text-decoration: none; transition: background 150ms var(--wd-ease); }
.wd-cl-row + .wd-cl-row { box-shadow: inset 0 1px 0 var(--wd-hairline); }
.wd-cl-row:hover { background: #F9F7F3; color: var(--wd-onyx); box-shadow: none; }
.wd-cl-row:hover + .wd-cl-row { box-shadow: none; }
.wd-cl-row--doc { grid-template-columns: 64px minmax(0, 1fr) 120px 150px; }
.wd-cl-row .main, .wd-cl-row .amount { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.wd-cl-row b { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cl-row small { font-size: 0.8rem; color: var(--ep-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cl-row .amount { text-align: right; }
.wd-cl-row .amount b { font-weight: 500; font-variant-numeric: tabular-nums; }
.wd-cl-row .wd-cal-st { justify-self: end; }
.wd-cl-kind { justify-self: start; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--wd-papier); font-size: 0.74rem; font-weight: 500; color: var(--ep-text-secondary); display: inline-flex; align-items: center; }
/* Sans événement : un creux d'une ligne, pas un panneau vide */
.wd-cl-hollow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 16px 20px; border: 1.5px dashed var(--wd-hairline-2); border-radius: var(--wd-r-card); font-size: 0.9rem; color: var(--ep-text-secondary); }
.wd-cl-hollow > span:first-child { margin-right: 6px; font-weight: 600; color: var(--wd-onyx); }
/* D. Suivi : saisie repliée sur une ligne, un seul fil */
.wd-cl-compose { margin: 0 0 16px; padding: 4px; border: 1px solid var(--wd-hairline-2); border-radius: 14px; background: #fff; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
/* app.css force height: auto !important sur les zones de texte : on joue sur min-height */
/* Composeur de note : Trix replié sur une ligne, ouvert (classe is-open posée
   par note_composer_controller) tant qu'on y travaille */
.wd-cl-compose trix-editor { min-height: 38px; max-height: 50vh; overflow-y: auto; margin: 0; padding: 8px 10px; border: 0; border-radius: 10px; box-shadow: none; background: transparent; font-size: 0.9rem; line-height: 1.55; color: var(--wd-onyx); transition: min-height 200ms var(--wd-ease); }
.wd-cl-compose trix-editor:focus { border: 0; box-shadow: none; outline: 0; }
.wd-cl-compose trix-editor:empty:not(:focus)::before { color: var(--ep-text-muted); }
.wd-cl-compose.is-open { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.06); }
.wd-cl-compose.is-open trix-editor { min-height: 110px; }
.wd-cl-compose.is-open .wd-cl-compose-more { display: flex; animation: wd-rise-soft 200ms var(--wd-ease); }
.wd-cl-compose-more trix-toolbar { flex: 0 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; position: relative; }
.wd-cl-compose-more trix-toolbar .trix-button-row { gap: 0; overflow: visible; }
.wd-cl-compose-more trix-toolbar .trix-button-group { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.wd-cl-compose-more trix-toolbar .trix-button-group + .trix-button-group { margin-left: 4px; padding-left: 4px; border-left: 1px solid var(--wd-hairline); }
.wd-cl-compose-more trix-toolbar .trix-button-group--history-tools, .wd-cl-compose-more trix-toolbar .trix-button-group--file-tools,
.wd-cl-compose-more trix-toolbar .trix-button--icon-code, .wd-cl-compose-more trix-toolbar .trix-button--icon-heading-1, .wd-cl-compose-more trix-toolbar .trix-button--icon-decrease-nesting-level, .wd-cl-compose-more trix-toolbar .trix-button--icon-increase-nesting-level { display: none; }
.wd-cl-compose-more trix-toolbar .trix-button, .wd-cl-compose-more trix-toolbar .trix-button--icon { width: 30px; height: 30px; border-radius: 8px; border: 0; }
.wd-cl-compose-more trix-toolbar .trix-button:hover { background: var(--wd-papier); }
.wd-cl-compose-more trix-toolbar .trix-button.trix-active { background: var(--wd-papier); box-shadow: none; }
.wd-cl-compose-more trix-toolbar .trix-dialogs { position: absolute; left: 0; bottom: 100%; width: min(420px, 70vw); }
.wd-cl-compose-more trix-toolbar .trix-dialog { top: auto; bottom: 8px; border-radius: 12px; border: 1px solid var(--wd-hairline); box-shadow: var(--wd-shadow-lift); }
.wd-cl-compose-more .wd-ev-btn--primary { margin-left: auto; }
.wd-cl-compose.is-shake { animation: wd-cv-shake 380ms var(--wd-ease); }
.wd-cl-compose-more { display: none; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; padding: 6px 6px 4px; border-top: 1px solid var(--wd-hairline); }
.wd-cl-types { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--wd-papier); }
.wd-cl-types label { margin: 0; cursor: pointer; }
.wd-cl-types input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-cl-types label > span { height: 30px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px; font-size: 0.82rem; font-weight: 500; color: var(--ep-text-secondary); transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-cl-types .ms { font-size: 17px; }
.wd-cl-types input:checked + span { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.wd-cl-types input:focus-visible + span { outline: 2px solid var(--wd-onyx); outline-offset: 1px; }
.wd-cl-compose .wd-ev-btn--primary { height: 36px; color: #fff; }
.wd-cl-feed { list-style: none; margin: 0; padding: 0; }
.wd-cl-feed li { position: relative; display: flex; gap: 12px; padding: 0 0 16px; }
.wd-cl-feed li:last-child, .wd-cl-feed li:has(+ li[hidden]) { padding-bottom: 0; }
.wd-cl-feed li[hidden] { display: none; }
.wd-cl-feed li:not(:last-child):not(:has(+ li[hidden]))::before { content: ''; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 1px; background: var(--wd-hairline); }
.wd-cl-feed .ico { width: 30px; height: 30px; flex: none; border-radius: 10px; background: var(--wd-papier); color: var(--ep-text-secondary); display: grid; place-items: center; }
.wd-cl-feed .ico .ms { font-size: 17px; }
.wd-cl-feed .ico.is-meeting { background: var(--wd-jaune-pale); color: #6B4F22; }
.wd-cl-feed .body { min-width: 0; flex: 1; padding-top: 4px; color: var(--wd-onyx); text-decoration: none; }
a.wd-cl-feed .body:hover, .wd-cl-feed a.body:hover p { color: var(--wd-onyx); }
.wd-cl-feed .meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-cl-feed .meta b { font-weight: 600; color: var(--wd-onyx); }
.wd-cl-feed .meta time { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ep-text-muted); }
.wd-cl-feed p { margin: 4px 0 0; font-size: 0.9rem; line-height: 1.5; color: var(--wd-onyx); overflow-wrap: anywhere; }
.wd-cl-feed a.body p { color: var(--ep-text-secondary); }
.wd-cl-feed a.body:hover .meta b { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wd-jaune); }
.wd-cl-feed a.body.is-unread .meta b { color: var(--wd-onyx); }
.wd-cl-feed a.body.is-unread .meta b::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--wd-jaune); vertical-align: middle; }
.wd-cl-feed a.body.is-unread p { color: var(--wd-onyx); font-weight: 500; }
/* Questionnaires remplis, en fin de suivi (liste tenue par questionnaire_response) */
.wd-cl-quests:empty { display: none; }
.wd-cl-quests { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--wd-hairline); }
.wd-cl-quests::before { content: 'Questionnaires'; display: block; margin-bottom: 6px; font-size: 0.8rem; font-weight: 600; color: var(--ep-text-secondary); }
.wd-cl-quests .ep-qr-response-item { padding: 8px 0; }
.wd-cl-quests .ep-qr-response-item + .ep-qr-response-item { border-top: 1px solid var(--wd-hairline); }
.wd-cl-quests .btn { width: 30px !important; height: 30px !important; min-height: 0; padding: 0 !important; border: 0 !important; background: transparent !important; color: var(--ep-text-secondary); }
.wd-cl-quests .btn:hover { background: var(--wd-papier) !important; color: var(--wd-onyx); }
/* E. Le couple : reste visible au défilement */
@media (min-width: 992px) { .wd-cl-side { position: sticky; top: 88px; } }
.wd-cl-person { padding: 10px 0; border-bottom: 1px solid var(--wd-hairline); }
.wd-cl-people .wd-ev-h + .wd-cl-person { padding-top: 0; }
.wd-cl-person .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.wd-cl-person .top b { min-width: 0; font-weight: 600; font-size: 0.94rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cl-person .acts { display: flex; gap: 4px; flex: none; }
.wd-cl-ico { width: 32px; height: 32px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); display: inline-flex; align-items: center; justify-content: center; color: var(--wd-onyx); text-decoration: none; transition: background 150ms var(--wd-ease), transform 200ms var(--wd-ease); }
.wd-cl-ico .ms { font-size: 17px; }
.wd-cl-ico:hover { background: var(--wd-papier); color: var(--wd-onyx); transform: translateY(-1px); }
.wd-cl-portal { display: block; margin-top: 2px; font-size: 0.78rem; color: var(--ep-text-secondary); }
.wd-cl-portal:empty { display: none; }
.wd-cl-portal .dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--wd-hairline-2); vertical-align: middle; }
.wd-cl-portal .dot.is-on { background: var(--wd-st-ok); }
.wd-cl-person--other .top b { font-weight: 500; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-cl-invite-toggle { display: inline-block; margin: 10px 0 0; font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-cl-invite { display: flex; gap: 8px; margin-top: 8px; }
.wd-cl-invite .form-control { height: 36px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font-size: 0.86rem; }
.wd-cl-invite .wd-ev-btn { height: 36px; }
/* F. La date : libre, option, prise ; et l'option qu'on pose au client */
.wd-cl-date-d { margin: 0 0 6px; font-size: 1.05rem; font-weight: 600; }
.wd-cl-date-st { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.9rem; font-weight: 500; }
.wd-cl-date-st i { width: 8px; height: 8px; border-radius: 50%; background: var(--wd-st-mute); flex: none; }
.wd-cl-date-st.is-ok i { background: var(--wd-st-ok); }
.wd-cl-date-st.is-warn i { background: var(--wd-st-warn); }
.wd-cl-date-st.is-danger i { background: var(--wd-st-danger); }
.wd-cl-date-st.is-info i { background: var(--wd-st-info); }
.wd-cl-date-x { margin: 4px 0 0 16px; font-size: 0.82rem; color: var(--ep-text-secondary); overflow-wrap: anywhere; }
.wd-cl-date-holds { list-style: none; margin: 4px 0 0 16px; padding: 0; font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-cl-date-holds a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--wd-jaune); }
.wd-cl-date-own { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--wd-hairline); }
.wd-cl-date-own p { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.86rem; }
.wd-cl-date-own p .ms { font-size: 17px; color: var(--ep-text-secondary); }
.wd-cl-date-own b { font-weight: 600; }
.wd-cl-date-own .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.wd-cl-date-own .acts form { margin: 0; }
.wd-cl-date-own .acts .wd-ev-btn { height: 34px; }
.wd-cl-date-own .acts .wd-cl-textbtn { font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-cl-date-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--wd-hairline); }
.wd-cl-date-form label { display: block; margin-bottom: 6px; font-size: 0.84rem; font-weight: 500; }
.wd-cl-date-form .row-in { display: flex; gap: 8px; }
.wd-cl-date-form .form-control { height: 36px; min-width: 0; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font-size: 0.86rem; }
.wd-cl-date-form .wd-ev-btn { height: 36px; flex: none; }
.wd-cl-date-form small { display: block; margin-top: 6px; font-size: 0.76rem; color: var(--ep-text-secondary); }
/* Paramètres › Disponibilités */
.wd-av-num { max-width: 7rem; }
.wd-av-days { display: flex; align-items: center; gap: 8px; }
.wd-av-days span { font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-cl-kv { margin-top: 12px; }
.wd-cl-kv li b { line-height: 1.4; }
@media (max-width: 767.98px) {
    .wd-cl-cover .wd-ev-cover-right { justify-content: flex-start; }
    .wd-cl-ev-head { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; }
    .wd-cl-ev-head .wd-cl-ev-av { width: 44px; height: 44px; border-radius: 14px; }
    .wd-cl-chev { display: none; }
    .wd-cl-ev-head .main small { white-space: normal; }
    .wd-cl-row--doc { grid-template-columns: minmax(0, 1fr) auto; }
    .wd-cl-row--doc .wd-cl-kind { display: none; }
    .wd-cl-row--doc .wd-cal-st { grid-column: 1 / -1; justify-self: start; }
    .wd-cl-todo .wd-now-rows li { align-items: flex-start; }
    .wd-cl-types { flex: 1; }
    .wd-cl-types label { flex: 1 1 0; }
    .wd-cl-types label > span { width: 100%; justify-content: center; padding: 0; font-size: 0; gap: 0; }
    .wd-cl-types .ms { font-size: 19px; }
}

/* ── Formulaire client (modales « Nouveau client » / « Modifier », pages
   /clients/new et /edit) : sections à plat séparées d'un filet, segments
   pour le type et le statut, second contact replié ── */
.ep-edit-client-modal .modal-header, .ep-new-client-modal .modal-header { padding: 18px 24px 14px; border-bottom: 1px solid var(--wd-hairline); background: #fff; }
.ep-edit-client-modal .modal-title, .ep-new-client-modal .modal-title { font-family: var(--wd-font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.ep-edit-client-modal .modal-content, .ep-new-client-modal .modal-content { border: 0; border-radius: var(--wd-r-card); overflow: hidden; }
.wd-clf.modal-body { padding: 6px 24px 18px; }
.wd-clf-sec { padding: 16px 0; border-bottom: 1px solid var(--wd-hairline); }
.wd-clf-sec:last-child { border-bottom: 0; padding-bottom: 4px; }
.wd-clf-h { margin: 0 0 12px; font-family: var(--wd-font-sans); font-size: 0.9rem; font-weight: 600; letter-spacing: 0; color: var(--wd-onyx); }
.wd-clf-h small { margin-left: 6px; font-weight: 400; font-size: 0.8rem; color: var(--ep-text-muted); }
.wd-clf .form-label { margin-bottom: 6px; font-size: 0.84rem; font-weight: 500; color: var(--wd-onyx); display: block; }
.wd-clf .form-control, .wd-clf .form-select { height: 42px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font-size: 0.92rem; background-color: #fff; }
.wd-clf .form-control:focus, .wd-clf .form-select:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-clf textarea.wd-clf-addr { height: 42px; min-height: 42px; resize: none; overflow: hidden; line-height: 1.45; padding-top: 9px; }
.wd-clf-f { min-width: 0; }
.wd-clf-row { display: grid; gap: 12px; margin-bottom: 12px; }
.wd-clf-sec > .wd-clf-row:last-child { margin-bottom: 0; }
.wd-clf-row--name { grid-template-columns: 110px 1fr 1fr; }
.wd-clf-row--2 { grid-template-columns: 1fr 1fr; }
.wd-clf-row--co { grid-template-columns: 2fr 1fr 1fr; margin: 14px 0 0; }
.wd-clf-row--co.d-none { display: none; }
.wd-clf-row--addr { grid-template-columns: 2fr 1fr 1.2fr; }
.wd-clf-row--follow { grid-template-columns: auto 1fr 11rem; align-items: end; }
/* Segments : un seul choix */
.wd-clf-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: var(--wd-papier); }
.wd-clf-seg label { margin: 0; cursor: pointer; }
.wd-clf-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-clf-seg span { height: 34px; padding: 0 14px; border-radius: 8px; display: inline-flex; align-items: center; font-size: 0.86rem; font-weight: 500; color: var(--ep-text-secondary); transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-clf-seg label:hover span { color: var(--wd-onyx); }
.wd-clf-seg input:checked + span { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.wd-clf-seg input[value="discussion"]:checked + span { background: var(--wd-jaune-pale); color: #6B4F22; box-shadow: none; }
.wd-clf-seg input[value="confirmed"]:checked + span { background: var(--wd-st-ok-bg); color: var(--wd-st-ok); box-shadow: none; }
.wd-clf-seg input:focus-visible + span { outline: 2px solid var(--wd-onyx); outline-offset: 1px; }
/* Second contact : bouton en pointillés, jamais en pilule */
.wd-clf-add { display: inline-flex; align-items: center; gap: 4px; height: 36px; margin: 14px 0 0; padding: 0 12px 0 8px; border: 1px dashed var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; font-size: 0.86rem; font-weight: 500; color: var(--ep-text-secondary); transition: border-color 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-clf-add .ms { font-size: 18px; }
.wd-clf-add:hover { border-color: var(--wd-onyx); color: var(--wd-onyx); }
.wd-clf-add + .wd-clf-sec { margin-top: 2px; }
.wd-clf-second > .wd-clf-sec { padding-bottom: 0; border-bottom: 0; }
.wd-clf-foot { display: flex; justify-content: flex-end; gap: 8px; }
.modal-footer.wd-clf-foot { padding: 14px 24px; border-top: 1px solid var(--wd-hairline); }
.modal-footer.wd-clf-foot > * { margin: 0; }
.wd-clf-foot .wd-ev-btn { height: 42px; padding: 0 18px; }
.wd-clf-foot .wd-ev-btn--primary { color: #fff; }
/* En page : une carte de 760 px */
.wd-clf-page { max-width: 760px; }
.wd-clf-page .wd-rp-head { margin-bottom: 18px; }
.wd-clf-card { padding: 4px 24px 18px; margin-bottom: 16px; border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); background: var(--wd-card-bg); box-shadow: var(--wd-card-shadow); }
@media (max-width: 575.98px) {
    .wd-clf.modal-body { padding: 4px 16px 14px; }
    .wd-clf-row--name, .wd-clf-row--addr { grid-template-columns: 1fr 1fr; }
    .wd-clf-row--name > :first-child, .wd-clf-row--addr > :first-child { grid-column: 1 / -1; }
    .wd-clf-row--2, .wd-clf-row--co, .wd-clf-row--follow { grid-template-columns: 1fr; }
    .wd-clf-seg { display: flex; }
    .wd-clf-seg label { flex: 1 1 auto; }
    .wd-clf-seg span { width: 100%; justify-content: center; padding: 0 10px; }
    .modal-footer.wd-clf-foot { padding: 12px 16px; }
    .wd-clf-foot .wd-ev-btn { flex: 1; justify-content: center; }
}

/* ============================================================
   RENDEZ-VOUS — en-tête commun (lien de la page à copier, onglets
   Agenda · Types · Disponibilités · Ma page), agenda groupé par jour,
   fiche d'un rendez-vous à carte-titre noire, registre des types,
   formulaire d'un type (grammaire de la fiche invité) et réglages.
   ============================================================ */
.wd-ap-head .wd-ev-btn .ms { font-size: 18px; }
.wd-ap-copy.is-copied, .wd-ap-ico.is-copied, .wd-ap-snips .wd-ev-btn.is-copied, .wd-ap-mypage .wd-ev-btn.is-copied { color: var(--wd-st-ok); border-color: var(--wd-st-ok-bg); }
.wd-ap-tabs { margin-bottom: 22px; }
.wd-ap-bar .wd-ev-btn--primary, .wd-ap-settings .wd-ev-btn--primary { color: #fff; }

/* Filtres : segments À venir / Passés / Annulés, recherche à droite */
.wd-ap-search { margin: 0 0 0 auto; height: 36px; width: 260px; max-width: 100%; display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-ctl); background: #fff; transition: border-color 150ms var(--wd-ease); }
.wd-ap-search:focus-within { border-color: var(--wd-onyx); }
.wd-ap-search .ms { font-size: 18px; color: var(--ep-text-muted); }
.wd-ap-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 0.86rem; color: var(--wd-onyx); }

/* Agenda : une carte, un groupe par jour */
.wd-ap { list-style: none; margin: 0; padding: 0; border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); background: var(--wd-card-bg); box-shadow: var(--wd-card-shadow); }
.wd-ap-group + .wd-ap-group { border-top: 1px solid var(--wd-hairline); }
.wd-ap-day { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 16px 22px 6px; font-family: var(--wd-font-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--wd-onyx); }
.wd-ap-day small { font-family: var(--wd-font-sans); font-size: 0.84rem; font-weight: 400; letter-spacing: 0; color: var(--ep-text-secondary); }
.wd-ap-day em { margin-left: auto; font-family: var(--wd-font-sans); font-style: normal; font-size: 0.78rem; font-weight: 500; letter-spacing: 0; color: var(--ep-text-muted); }
.wd-ap-group.is-today .wd-ap-day > span { display: inline-flex; align-items: center; gap: 8px; }
.wd-ap-group.is-today .wd-ap-day > span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--wd-jaune); box-shadow: 0 0 0 3px rgba(201, 160, 99, 0.2); animation: wd-breathe 2.6s ease-in-out infinite; }
.wd-ap-rows { list-style: none; margin: 0; padding: 2px 10px 10px; }
.wd-ap-row { position: relative; display: grid; grid-template-columns: 58px 36px minmax(0, 1.5fr) minmax(0, 1fr) 150px 124px; align-items: center; gap: 14px; min-height: 64px; padding: 8px 12px; border-radius: 12px; transition: background 150ms var(--wd-ease); }
.wd-ap-row + .wd-ap-row { box-shadow: inset 0 1px 0 var(--wd-hairline); }
.wd-ap-row:hover { background: #F9F7F3; box-shadow: none; }
.wd-ap-row:hover + .wd-ap-row { box-shadow: none; }
.wd-ap-row .when { display: flex; flex-direction: column; line-height: 1.25; font-variant-numeric: tabular-nums; }
.wd-ap-row .when b { font-family: var(--wd-font-display); font-size: 1rem; font-weight: 600; color: var(--wd-onyx); }
.wd-ap-row .when small { font-size: 0.78rem; color: var(--ep-text-muted); }
.wd-ap-row .av { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--wd-jaune-pale); color: #6B4F22; font-family: var(--wd-font-display); font-size: 0.74rem; font-weight: 600; transition: transform 220ms var(--wd-ease); }
.wd-ap-row .av.is-client { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-ap-row:hover .av { transform: rotate(-4deg); }
.wd-ap-row .who { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.wd-ap-row .who .t { font-weight: 600; font-size: 0.94rem; color: var(--wd-onyx); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-ap-row .who .t::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.wd-ap-row:hover .who .t { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-ap-row .who small { font-size: 0.8rem; color: var(--ep-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-ap-msg { font-size: 15px; margin-left: 6px; vertical-align: -3px; color: var(--wd-jaune); position: relative; z-index: 1; cursor: help; }
.wd-ap-row .where { min-width: 0; display: flex; align-items: center; gap: 7px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-ap-row .where .ms { font-size: 18px; color: var(--ep-text-muted); flex: none; }
.wd-ap-row .where > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-ap-row .crm { min-width: 0; }
.wd-ap-row .crm .wd-st { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.wd-ap-row .acts { position: relative; z-index: 1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; pointer-events: none; }
.wd-ap-row .acts:has(.dropdown-menu.show) { z-index: 5; }
.wd-ap-row .acts > * { pointer-events: auto; }
.wd-ap-go { height: 32px; padding: 0 12px 0 10px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; color: var(--wd-onyx); font-size: 0.82rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; transition: transform 200ms var(--wd-ease), background 150ms var(--wd-ease), color 150ms var(--wd-ease), border-color 150ms var(--wd-ease); }
.wd-ap-go .ms { font-size: 17px; }
.wd-ap-go:hover { background: var(--wd-onyx); border-color: var(--wd-onyx); color: #fff; transform: translateY(-1px); }
.wd-ap-row .chev { font-size: 18px; color: var(--ep-text-muted); pointer-events: none; transition: transform 200ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-ap-row:hover .chev { color: var(--wd-onyx); transform: translateX(2px); }
.wd-ap-row.is-past .when b, .wd-ap-row.is-cancelled .when b { color: var(--ep-text-secondary); }
.wd-ap-row.is-cancelled .when b { text-decoration: line-through; }
.wd-ap-row.is-cancelled .who .t { color: var(--ep-text-secondary); }
.wd-ap-row.is-cancelled .av, .wd-ap-row.is-past .av { background: var(--wd-papier); color: var(--ep-text-secondary); }
.wd-ap-blank { background: #fff; }
.wd-ap-blank p { max-width: 52ch; margin-left: auto; margin-right: auto; }
.wd-ap-blank .wd-ev-btn { margin-top: 6px; }
.wd-ap-textbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 500; color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); cursor: pointer; }
.wd-ap-textbtn.is-copied { color: var(--wd-st-ok); text-decoration-color: var(--wd-st-ok); }

/* Un rendez-vous : carte-titre noire, le message, la fiche client */
.wd-ap-cover .wd-ev-av { width: 72px; height: 72px; border-radius: 22px; font-size: 1.2rem; font-family: var(--wd-font-display); font-weight: 600; display: grid; place-items: center; }
.wd-ap-cover h1 { font-size: 2.1rem; margin-bottom: 12px; }
.wd-ap-cover .wd-ev-kicker { color: rgba(255, 255, 255, 0.68); }
.wd-ap-cover .wd-st-ok { background: var(--wd-st-ok-bg); color: var(--wd-st-ok); }
.wd-ap-cover .wd-st-danger { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-ap-cover .wd-ev-jchip { height: 38px; }
.wd-ap-cols { margin-top: 24px; }
.wd-ap-quote { margin: 0 0 14px; padding: 12px 16px; border-left: 3px solid var(--wd-jaune); border-radius: 0 12px 12px 0; background: #FBF9F6; font-size: 0.94rem; line-height: 1.55; color: var(--wd-onyx); overflow-wrap: anywhere; }
.wd-ap-quote--cancel { margin: 14px 0 0; border-left-color: var(--wd-st-danger); }
.wd-ap-client { display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; gap: 12px; margin: -8px; padding: 8px; border-radius: 14px; color: var(--wd-onyx); text-decoration: none; transition: background 150ms var(--wd-ease); }
.wd-ap-client:hover { background: #F9F7F3; color: var(--wd-onyx); }
.wd-ap-client:hover .wd-cl-chev { color: var(--wd-onyx); transform: translateX(2px); }
.wd-ap-client .wd-reg-av { width: 40px; height: 40px; }
.wd-ap-client .main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.wd-ap-client .main b { max-width: 100%; font-family: var(--wd-font-display); font-weight: 600; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-ap-cancel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 600; color: var(--wd-onyx); }
.wd-ap-cancel > summary::-webkit-details-marker { display: none; }
.wd-ap-cancel > summary .ms { font-size: 19px; color: var(--wd-st-danger); }
.wd-ap-cancel > summary .chev { margin-left: auto; color: var(--ep-text-muted); transition: transform 200ms var(--wd-ease); }
.wd-ap-cancel[open] > summary { margin-bottom: 14px; }
.wd-ap-cancel[open] > summary .chev { transform: rotate(180deg); }
.wd-ap-cancel .form-label { font-size: 0.84rem; font-weight: 500; color: var(--wd-onyx); }
.wd-ap-cancel .form-label small { color: var(--ep-text-muted); font-weight: 400; margin-left: 4px; }
.wd-ap-cancel .form-control { border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font-size: 0.9rem; }
.wd-ap-cancel .form-control:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-ap-cancel .wd-gf-hint { margin: 8px 0 12px; }
.wd-ap-cancel-btn { color: var(--wd-st-danger); }
.wd-ap-cancel-btn:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-ap-cancel-btn .ms { font-size: 18px; }

/* Un rendez-vous, revue UX du 23/10 : préparer, noter, enchaîner */
.wd-ap-cover .wd-ev-meta a { color: #fff; text-decoration-color: var(--wd-jaune); }
.wd-ap-cover .wd-ev-kicker { flex-wrap: wrap; gap: 8px 10px; }
.wd-ap-chip-inline { display: none; }
.wd-ap-booked { margin: 12px 0 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); }
.wd-ap-cover .wd-ev-cover-right .wd-ev-btn .ms { font-size: 18px; color: inherit; }
.wd-ap-cover .wd-cl-primary .ms { font-size: 18px; }
.wd-ap-sheet .wd-cl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.wd-ap-sheet .wd-cl-head .wd-ev-h, .wd-ap-sheet .wd-cl-head h3 { margin: 0; }
.wd-ap-sheet .wd-cl-link { text-decoration: none; }
.wd-ap-sheet .wd-cl-link > span:not(.ms) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-ap-sheet .wd-cl-link:hover > span:not(.ms) { text-decoration-thickness: 3px; }
.wd-ap-sheet .wd-cl-link .ms { font-size: 16px; margin-left: 2px; transition: transform 200ms var(--wd-ease); }
.wd-ap-sheet .wd-cl-link:hover .ms { transform: translateX(2px); }
.wd-ap-sheet .wd-ev-h small { margin-left: 4px; font-family: var(--wd-font-sans); font-size: 0.82rem; font-weight: 500; color: var(--ep-text-muted); }
.wd-ap-quote-h { margin: 0 0 6px; font-size: 0.8rem; font-weight: 600; color: var(--ep-text-secondary); }
.wd-ap-project .wd-ap-quote--cancel { margin: 0 0 14px; }
/* Repères du projet : trois cases dans la même carte */
.wd-ap-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--wd-hairline); border-radius: 14px; overflow: hidden; }
.wd-ap-fact { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding: 14px 16px; box-shadow: -1px 0 0 var(--wd-hairline); }
.wd-ap-fact .l { font-size: 0.78rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-ap-fact .v { max-width: 100%; font-family: var(--wd-font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; color: var(--wd-onyx); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wd-ap-fact .w { font-size: 0.8rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-ap-free { margin-top: 6px; height: 24px; }
.wd-ap-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 14px; padding: 14px 16px; border: 1.5px dashed var(--wd-hairline-2); border-radius: 14px; }
.wd-ap-ask > .ms { font-size: 20px; color: var(--wd-jaune); }
.wd-ap-ask p { flex: 1 1 260px; margin: 0; font-size: 0.9rem; color: var(--wd-onyx); }
.wd-ap-ask .wd-ev-btn .ms { font-size: 18px; }
/* Notes : la saisie du compte rendu s'ouvre d'elle-même une fois le rendez-vous commencé */
.wd-ap-feed { margin-bottom: 16px; }
/* L'éditeur (Trix), habillé comme celui des conversations : la mise en forme et « Enregistrer » sous le texte */
.wd-ap-compose { border: 1px solid var(--wd-hairline-2); border-radius: 16px; background: #fff; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-ap-compose:focus-within, .wd-ap-compose.is-open { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.06); }
.wd-ap-compose trix-editor { min-height: 52px; max-height: 55vh; overflow-y: auto; margin: 0; padding: 12px 14px 4px; border: 0; border-radius: 16px 16px 0 0; box-shadow: none; background: transparent; font-size: 0.92rem; line-height: 1.55; color: var(--wd-onyx); }
.wd-ap-compose.is-open trix-editor, .wd-ap-compose trix-editor:focus { min-height: 140px; }
.wd-ap-compose trix-editor:focus { border: 0; box-shadow: none; }
.wd-ap-compose trix-editor:empty:not(:focus)::before { color: var(--ep-text-muted); }
.wd-ap-bar-ed { display: flex; align-items: center; gap: 4px; padding: 6px 8px 8px; }
.wd-ap-bar-ed trix-toolbar { position: relative; flex: 0 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.wd-ap-bar-ed trix-toolbar .trix-button-row { gap: 0; overflow: visible; }
.wd-ap-bar-ed trix-toolbar .trix-button-group { margin: 0; padding: 0; gap: 0; border: 0; border-radius: 0; background: transparent; }
.wd-ap-bar-ed trix-toolbar .trix-button-group + .trix-button-group { margin-left: 4px; padding-left: 4px; border-left: 1px solid var(--wd-hairline); border-radius: 0; }
.wd-ap-bar-ed trix-toolbar .trix-button-group--history-tools, .wd-ap-bar-ed trix-toolbar .trix-button-group--file-tools,
.wd-ap-bar-ed trix-toolbar .trix-button--icon-code, .wd-ap-bar-ed trix-toolbar .trix-button--icon-decrease-nesting-level, .wd-ap-bar-ed trix-toolbar .trix-button--icon-increase-nesting-level { display: none; }
.wd-ap-bar-ed trix-toolbar .trix-button, .wd-ap-bar-ed trix-toolbar .trix-button--icon { width: 30px; height: 30px; border-radius: 8px; }
.wd-ap-bar-ed trix-toolbar .trix-button:hover { background: var(--wd-papier); }
.wd-ap-bar-ed trix-toolbar .trix-button.trix-active { background: var(--wd-papier); box-shadow: none; }
.wd-ap-bar-ed trix-toolbar .trix-dialogs { position: absolute; left: 0; bottom: 100%; width: min(420px, 70vw); }
.wd-ap-bar-ed trix-toolbar .trix-dialog { top: auto; bottom: 8px; border-radius: 12px; border: 1px solid var(--wd-hairline); box-shadow: var(--wd-shadow-lift); }
.wd-ap-bar-ed .wd-ev-btn--primary { flex: none; margin-left: auto; height: 36px; }
.wd-ap-compose-hint { margin: 8px 0 0; }
/* Note mise en forme (compte rendu) : dans le fil du rendez-vous et dans le suivi du client */
.wd-cl-feed .wd-cl-rich { margin: 4px 0 0; font-size: 0.9rem; line-height: 1.55; color: var(--wd-onyx); overflow-wrap: anywhere; }
.wd-cl-rich > :first-child { margin-top: 0; }
.wd-cl-rich > :last-child { margin-bottom: 0; }
.wd-cl-rich h1 { margin: 0.5em 0 0.2em; font-family: var(--wd-font-sans); font-size: 0.98rem; font-weight: 600; letter-spacing: 0; }
.wd-cl-rich ul, .wd-cl-rich ol { margin: 0.25em 0; padding-left: 1.3em; }
.wd-cl-rich blockquote { margin: 0.4em 0; padding-left: 10px; border-left: 3px solid var(--wd-hairline-2); color: var(--ep-text-secondary); }
.wd-cl-rich a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wd-jaune); }
.wd-ap-last { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--wd-hairline); }
.wd-ap-last h3 { font-family: var(--wd-font-sans); font-size: 0.86rem; font-weight: 600; letter-spacing: 0; color: var(--ep-text-secondary); }
/* Le client */
.wd-ap-who-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.wd-ap-who-head .wd-reg-av { width: 44px; height: 44px; border-radius: 14px; }
.wd-ap-who-head .main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.wd-ap-who-head .main b { max-width: 100%; font-family: var(--wd-font-display); font-size: 1.05rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-ap-who-head .wd-cl-status { height: 24px; }
.wd-ap-nofile { font-size: 0.8rem; color: var(--ep-text-muted); }
.wd-ap-who-link { margin-top: 12px; }
@media (min-width: 992px) { .wd-ap-sheet .wd-ev-side { position: sticky; top: 88px; } }
/* Annulation : une modale */
.wd-ap-cancel.modal-content { border: 0; border-radius: var(--wd-r-card); }
.wd-ap-cancel .modal-header { padding: 18px 24px 12px; border-bottom: 1px solid var(--wd-hairline); }
.wd-ap-cancel .modal-title { font-family: var(--wd-font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.wd-ap-cancel .modal-body { padding: 18px 24px 8px; }
.wd-ap-cancel .modal-footer { padding: 12px 24px 18px; border-top: 0; gap: 8px; }
.wd-ap-cancel .modal-footer > * { margin: 0; }

/* Types : registre */
.wd-ap-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.wd-ap-bar .wd-rp-sum { margin: 0; }
.wd-ap-bar .wd-ev-btn .ms { font-size: 18px; }
.wd-apt { padding: 6px 10px; }
.wd-apt-row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 70px 96px 112px 76px; align-items: center; gap: 14px; min-height: 68px; padding: 10px 12px; border-radius: 12px; transition: background 150ms var(--wd-ease); }
.wd-apt-row + .wd-apt-row { box-shadow: inset 0 1px 0 var(--wd-hairline); }
.wd-apt-row:hover { background: #F9F7F3; box-shadow: none; }
.wd-apt-row:hover + .wd-apt-row { box-shadow: none; }
.wd-apt-row .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--wd-jaune-pale); color: #6B4F22; transition: transform 220ms var(--wd-ease); }
.wd-apt-row .ic .ms { font-size: 20px; }
.wd-apt-row:hover .ic { transform: rotate(-4deg); }
.wd-apt-row .who { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.wd-apt-row .who .t { font-family: var(--wd-font-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--wd-onyx); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-apt-row .who .t::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.wd-apt-row:hover .who .t { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-apt-row .who small { font-size: 0.8rem; color: var(--ep-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-apt-row .dur { font-size: 0.88rem; font-weight: 500; color: var(--wd-onyx); font-variant-numeric: tabular-nums; }
.wd-apt-row .next { font-size: 0.84rem; color: var(--ep-text-muted); }
.wd-apt-row .next b { color: var(--wd-onyx); font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-apt-row .state, .wd-apt-row .acts { position: relative; z-index: 1; }
/* Actions au-dessus du lien qui couvre la ligne (z-index 1)… mais alors chaque ligne
   isole les siennes : un menu ouvert passerait sous les pastilles des lignes suivantes. */
.wd-apt-row .acts:has(.dropdown-menu.show) { z-index: 5; }
.wd-apt-row .state form { margin: 0; }
.wd-apt-toggle { border: 0; cursor: pointer; gap: 6px; transition: filter 150ms var(--wd-ease), transform 200ms var(--wd-ease); }
.wd-apt-toggle i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wd-apt-toggle:hover { filter: brightness(0.96); transform: translateY(-1px); }
.wd-apt-row .acts { display: flex; justify-content: flex-end; gap: 2px; }
.wd-apt-row.is-off .ic { background: var(--wd-papier); color: var(--ep-text-muted); }
.wd-apt-row.is-off .who .t { color: var(--ep-text-secondary); }
.wd-ap-ico { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--ep-text-muted); display: inline-flex; align-items: center; justify-content: center; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-ap-ico .ms { font-size: 18px; }
.wd-ap-ico:hover { background: var(--wd-papier); color: var(--wd-onyx); }

/* Un type : la grammaire de la fiche invité */
.wd-apf-page .wd-rp-sum { margin: 4px 0 0; }
.wd-apf-alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--wd-st-danger-bg); color: var(--wd-st-danger); font-size: 0.88rem; }
.wd-apf-alert .ms { font-size: 20px; }
.wd-apf .form-control.wd-apf-name { height: 48px; font-family: var(--wd-font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.wd-apf-url { display: flex; height: 42px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; overflow: hidden; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-apf-url:focus-within { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-apf-url-base { flex: 0 1 auto; max-width: 60%; display: flex; align-items: center; padding: 0 2px 0 12px; background: #FBF9F6; font-size: 0.84rem; color: var(--ep-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-apf .wd-apf-url .form-control { flex: 1; min-width: 0; height: 40px; border: 0; border-radius: 0; box-shadow: none; padding-left: 6px; background: transparent; }
.wd-apf-dur { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wd-apf-preset { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font-size: 0.86rem; font-weight: 500; color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-apf-preset:hover { color: var(--wd-onyx); }
.wd-apf-preset.is-active { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.wd-apf-dur-in { width: 120px; }
.wd-apf-locs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wd-apf-loc { position: relative; display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 14px; border: 1px solid var(--wd-hairline-2); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease), transform 200ms var(--wd-ease); }
.wd-apf-loc input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-apf-loc .ms { font-size: 22px; color: var(--wd-fumee-fonce); margin-bottom: 6px; transition: color 150ms var(--wd-ease); }
.wd-apf-loc b { font-size: 0.9rem; font-weight: 600; color: var(--wd-onyx); }
.wd-apf-loc small { font-size: 0.76rem; line-height: 1.35; color: var(--ep-text-secondary); }
.wd-apf-loc:hover { border-color: var(--wd-onyx); transform: translateY(-1px); }
.wd-apf-loc::after { content: ''; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--wd-onyx) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5l3 3 6-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 12px no-repeat; opacity: 0; transform: scale(0.6); transition: opacity 150ms var(--wd-ease), transform 220ms var(--wd-ease); }
.wd-apf-loc:has(input:checked) { border-color: var(--wd-onyx); box-shadow: inset 0 0 0 1px var(--wd-onyx); }
.wd-apf-loc:has(input:checked) .ms { color: var(--wd-onyx); font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.wd-apf-loc:has(input:checked)::after { opacity: 1; transform: scale(1); }
.wd-apf-loc:has(input:focus-visible) { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-apf-rules > summary { flex-wrap: wrap; }
.wd-apf-rules > summary small { flex: 1 1 auto; min-width: 0; }
.wd-apf-rules-hint { margin-top: -4px; margin-bottom: 4px; }
.wd-apf-rules-hint a, .wd-ap-mypage .wd-gf-hint a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-apf-rule-list { display: flex; flex-direction: column; }
.wd-apf-rule { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--wd-hairline); }
.wd-apf-rule:first-child { border-top: 0; }
.wd-apf-rule-t { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.wd-apf-rule-t label { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--wd-onyx); }
.wd-apf-rule-t small { font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-apf-rule-in { width: 130px; flex: none; }
.wd-apf-rule-in .form-control { text-align: right; padding-right: 52px; }
.wd-apf-preview { padding: 16px; border: 1px solid var(--wd-hairline); border-radius: 14px; background: #fff; box-shadow: var(--wd-card-shadow); }
.wd-apf-preview .k { margin: 0 0 6px; font-size: 0.78rem; font-weight: 600; color: #6B4F22; }
.wd-apf-preview .n { display: block; margin-bottom: 6px; font-family: var(--wd-font-display); font-size: 1.15rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; color: var(--wd-onyx); overflow-wrap: anywhere; }
.wd-apf-preview .n.is-placeholder { color: var(--ep-text-muted); }
.wd-apf-preview .m { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-apf-preview .m > span { display: inline-flex; align-items: center; gap: 4px; }
.wd-apf-preview .m .ms { font-size: 16px; color: var(--ep-text-muted); }
.wd-apf-preview .d { margin: 10px 0 0; font-size: 0.84rem; color: var(--ep-text-secondary); white-space: pre-line; }
.wd-apf-preview .s { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.wd-apf-preview .s span { height: 32px; display: grid; place-items: center; border: 1px solid var(--wd-hairline-2); border-radius: 8px; font-size: 0.8rem; font-variant-numeric: tabular-nums; color: var(--wd-onyx); }
.wd-apf-preview .s span:first-child { background: var(--wd-onyx); border-color: var(--wd-onyx); color: #fff; }
.wd-apf-preview-url { display: flex; align-items: flex-start; gap: 5px; margin: 10px 0 6px; font-size: 0.78rem; color: var(--ep-text-secondary); overflow-wrap: anywhere; }
.wd-apf-preview-url .ms { font-size: 16px; color: var(--ep-text-muted); }
.wd-apf-online { margin-top: 6px; padding: 10px 0; border-top: 1px solid var(--wd-hairline); }
.wd-apf-page .wd-bif-delete { max-width: calc(100% - 344px); }

/* Disponibilités et Ma page */
.wd-ap-settings { display: flex; flex-direction: column; gap: 16px; max-width: 880px; }
.wd-ap-settings.wd-gf, .wd-ap-settings .wd-gf { margin-top: 0; }
.wd-ap-settings > .wd-bif-sec, .wd-ap-settings form > .wd-bif-sec { border-color: var(--wd-card-border); box-shadow: var(--wd-card-shadow); }
.wd-ap-settings .wd-bif-foot { padding-top: 16px; }
form.wd-ap-settings > .wd-bif-foot { padding-top: 0; }
.wd-ap-lede { margin: -6px 0 14px; max-width: 70ch; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-ap-lede code, .wd-ap-settings .wd-gf-hint code { font-size: 0.8rem; color: var(--wd-onyx); background: var(--wd-papier); padding: 1px 5px; border-radius: 5px; }
.wd-ap-week { border-top: 1px solid var(--wd-hairline); }
.wd-ap-wday { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--wd-hairline); }
.wd-ap-wday-sw b { font-size: 0.92rem; font-weight: 600; color: var(--wd-onyx); transition: color 150ms var(--wd-ease); }
.wd-ap-ranges { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.wd-ap-range { display: inline-flex; align-items: center; gap: 6px; color: var(--ep-text-muted); }
.wd-ap-range .form-control { width: 116px; height: 38px; padding: 0 10px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.wd-ap-range .form-control:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-ap-closed { display: none; font-size: 0.88rem; color: var(--ep-text-muted); }
.wd-ap-wday:has(.wd-ap-wday-sw input:not(:checked)) .wd-ap-ranges { display: none; }
.wd-ap-wday:has(.wd-ap-wday-sw input:not(:checked)) .wd-ap-closed { display: inline; }
.wd-ap-wday:has(.wd-ap-wday-sw input:not(:checked)) .wd-ap-wday-sw b { color: var(--ep-text-secondary); font-weight: 500; }
.wd-ap-also { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.wd-ap-cal { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--wd-hairline); border-radius: 12px; background: #FDFCFA; }
.wd-ap-cal > .ms { font-size: 20px; color: var(--wd-fumee-fonce); }
.wd-ap-cal .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.wd-ap-cal .t b { font-size: 0.9rem; font-weight: 600; color: var(--wd-onyx); }
.wd-ap-cal .t small { font-size: 0.8rem; color: var(--ep-text-secondary); overflow-wrap: anywhere; }
.wd-ap-cal .wd-cl-link { flex: none; }
.wd-ap-block-add { display: grid; grid-template-columns: 170px 170px minmax(0, 1fr) auto; align-items: end; gap: 10px; margin: 0 0 14px; }
.wd-ap-block-add .wd-gf-f { margin: 0; }
.wd-ap-block-add .wd-ev-btn { height: 42px; }
.wd-ap-block-add .wd-ev-btn .ms { font-size: 18px; }
.wd-ap-blocks-empty { padding: 4px 0 2px; }
.wd-ap-block-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wd-hairline); }
.wd-ap-block-list li { display: flex; align-items: center; gap: 12px; min-height: 58px; border-bottom: 1px solid var(--wd-hairline); }
.wd-ap-block-list li:last-child { border-bottom: 0; }
.wd-ap-block-list .ic { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--wd-papier); color: var(--wd-fumee-fonce); }
.wd-ap-block-list .ic .ms { font-size: 18px; }
.wd-ap-block-list .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.wd-ap-block-list .t b { font-size: 0.92rem; font-weight: 600; color: var(--wd-onyx); }
.wd-ap-block-list .t small { font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-ap-block-list form { margin: 0; }
.wd-ap-block-list .wd-ap-ico:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-ap-url { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border: 1px solid var(--wd-hairline-2); border-radius: 12px; background: #fff; }
.wd-ap-url .dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--wd-hairline-2); }
.wd-ap-url .dot.is-on { background: var(--wd-st-ok); box-shadow: 0 0 0 3px rgba(47, 122, 78, 0.15); }
.wd-ap-url .u { flex: 1; min-width: 0; font-size: 0.95rem; font-weight: 500; color: var(--wd-onyx); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-ap-url .u:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-ap-url .wd-ev-btn { height: 36px; }
.wd-ap-url .wd-ev-btn .ms, .wd-ap-snips .wd-ev-btn .ms { font-size: 18px; }
.wd-ap-mypage .wd-gf-hint { margin-top: 10px; }
.wd-ap-warn { color: var(--wd-st-danger); }
.wd-ap-snips { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--wd-hairline); }
.wd-ap-snips li { display: flex; align-items: center; gap: 8px; min-height: 58px; border-bottom: 1px solid var(--wd-hairline); }
.wd-ap-snips .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.wd-ap-snips .t b { font-size: 0.9rem; font-weight: 600; color: var(--wd-onyx); }
.wd-ap-snips .t small { font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-ap-snips .wd-ev-btn { height: 34px; padding: 0 12px; }
.wd-ap-iframe { margin-top: 14px; }
.wd-ap-iframe > summary { font-size: 0.84rem; color: var(--ep-text-secondary); cursor: pointer; }
.wd-ap-iframe[open] > summary { margin-bottom: 10px; color: var(--wd-onyx); }

@media (max-width: 991.98px) {
    .wd-apf-page .wd-bif-delete { max-width: none; }
    .wd-apf-locs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wd-ap-row { grid-template-columns: 58px 36px minmax(0, 1.4fr) minmax(0, 1fr) 124px; }
    .wd-ap-row .crm { display: none; }
}
@media (max-width: 767.98px) {
    .wd-ap-head .acts { width: auto; margin-left: auto; }
    .wd-ap-copy span[data-copy-target="label"] { display: none; }
    .wd-ap-copy { width: 38px; padding: 0; justify-content: center; }
    .wd-ap-tabs { gap: 0; }
    .wd-ap-tabs a { padding: 0 8px; gap: 5px; font-size: 0.86rem; }
    .wd-ap-tab-x { display: none; }
    .wd-ap-day small, .wd-ap-day em { display: none; }
    .wd-ap-cover .wd-ev-cover-right { flex-wrap: wrap; }
    .wd-apf-dur .wd-gf-seg { display: flex; width: 100%; }
    .wd-apf-preset { flex: 1 1 0; padding: 0 4px; }
    .wd-ap-search { width: 100%; margin-left: 0; }
    .wd-ap-day { padding: 14px 16px 4px; }
    .wd-ap-rows { padding: 2px 6px 8px; }
    .wd-ap-row { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px; }
    .wd-ap-row .av, .wd-ap-row .where { display: none; }
    .wd-ap-row .crm { display: block; grid-column: 2; grid-row: 2; }
    .wd-ap-row .crm:empty { display: none; }
    .wd-ap-row .acts { grid-column: 3; grid-row: 1 / span 2; }
    .wd-ap-row .chev { display: none; }
    .wd-ap-cover h1 { font-size: 1.6rem; }
    .wd-ap-cover .wd-ev-av { width: 56px; height: 56px; border-radius: 18px; font-size: 1rem; }
    /* Fiche : la puce de temps passe dans la ligne de statut, la carte ne garde que l'icône secondaire et ⋯ */
    .wd-ap-cover .wd-ap-chip { display: none; }
    .wd-ap-chip-inline { display: inline-flex; height: 24px; padding: 0 9px; border-radius: 999px; align-items: center; background: var(--wd-jaune-pale); color: #6B4F22; font-size: 0.76rem; font-weight: 600; }
    .wd-ap-cover .wd-ev-cover-right { order: 0; width: auto; margin: 0 0 0 auto; align-self: flex-start; }
    .wd-ap-cover .wd-ev-cover-body { order: 1; flex-basis: 100%; }
    .wd-ap-cover .wd-ev-meta { flex-direction: column; gap: 4px; }
    .wd-ap-booked { margin-top: 8px; }
    /* Une fois le rendez-vous commencé, le compte rendu passe devant le projet */
    .wd-ap-sheet.is-live .wd-ap-notes, .wd-ap-sheet.is-past .wd-ap-notes { order: -1; }
    .wd-ap-fact { padding: 12px 14px; }
    .wd-ap-fact .v { font-size: 1.05rem; }
    .wd-apt { padding: 4px 6px; }
    .wd-apt-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px; }
    .wd-apt-row .dur, .wd-apt-row .next { display: none; }
    .wd-apt-row .state { grid-column: 2; grid-row: 2; }
    .wd-apt-row .acts { grid-column: 3; grid-row: 1 / span 2; }
    .wd-apt-row .ic { grid-row: 1 / span 2; }
    .wd-ap-wday { grid-template-columns: 1fr; gap: 2px; padding: 8px 0; }
    .wd-ap-ranges { gap: 8px 14px; }
    .wd-ap-range .form-control { width: 104px; }
    .wd-ap-block-add { grid-template-columns: 1fr 1fr; }
    .wd-ap-block-add .wd-gf-f:nth-child(5), .wd-ap-block-add .wd-ev-btn { grid-column: 1 / -1; justify-content: center; }
    .wd-ap-cal { flex-wrap: wrap; }
    .wd-ap-snips li { flex-wrap: wrap; padding: 10px 0; }
    .wd-ap-snips .t { flex: 1 1 100%; }
    .wd-apf-locs { grid-template-columns: 1fr 1fr; gap: 8px; }
    .wd-apf-rule { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-ap-group.is-today .wd-ap-day > span::before { animation: none; }
    .wd-ap-row .av, .wd-apt-row .ic, .wd-apf-loc { transition: none; }
}

/* ============================================================
   MESSAGES — boîte de réception à deux volets dans un seul cadre :
   à gauche la liste (recherche, vues À répondre / Ouvertes / Toutes),
   à droite le fil (le client à gauche sur papier, l'équipe à droite en
   noir) ou la rédaction. Sur grand écran le cadre tient dans la fenêtre
   et chaque volet défile seul ; en dessous de 992 px, un volet à la fois.
   ============================================================ */
.wd-cv { --wd-cv-top: 192px; }
.wd-cv-head { margin-bottom: 20px; }
.wd-cv-head .wd-ev-btn .ms { font-size: 18px; }
.wd-cv--new .wd-cv-head .acts { visibility: hidden; }
@media (min-width: 992px) { #sidebar ~ main.ep-main-content:has(.wd-cv-box) { padding-bottom: 24px; } }

.wd-cv-box { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); height: calc(100dvh - var(--wd-cv-top)); min-height: 540px; border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); background: var(--wd-card-bg); box-shadow: var(--wd-card-shadow); overflow: clip; }
.wd-cv-blank { padding: 56px 24px; }
.wd-cv-blank p { max-width: 54ch; margin: 0 auto 14px; }
.wd-cv-blank .wd-ev-btn--primary { color: #fff; }

/* Liste */
.wd-cv-side { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--wd-hairline); }
.wd-cv-tools { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid var(--wd-hairline); }
.wd-cv-search { height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-ctl); background: #fff; transition: border-color 150ms var(--wd-ease); }
.wd-cv-search:focus-within { border-color: var(--wd-onyx); }
.wd-cv-search .ms { font-size: 18px; color: var(--ep-text-muted); }
.wd-cv-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 0.86rem; color: var(--wd-onyx); }
.wd-cv-filter { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 34px; margin: 0; padding: 0 4px 0 12px; border-radius: var(--wd-r-ctl); background: var(--wd-jaune-pale); color: #6B4F22; font-size: 0.84rem; }
.wd-cv-filter > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cv-filter b { font-weight: 600; }
.wd-cv-filter a { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; color: inherit; transition: background 150ms var(--wd-ease); }
.wd-cv-filter a:hover { background: rgba(107, 79, 34, 0.1); }
.wd-cv-filter a .ms { font-size: 18px; }
.wd-cv-views { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 3px; border-radius: var(--wd-r-ctl); background: var(--wd-papier); }
.wd-cv-views a { height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; font-size: 0.82rem; font-weight: 500; color: var(--ep-text-secondary); text-decoration: none; white-space: nowrap; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-cv-views a:hover { color: var(--wd-onyx); }
.wd-cv-views a.on { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.wd-cv-views em { font-style: normal; font-size: 0.72rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-cv-views a.has-reply em { min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--wd-jaune); color: #fff; font-weight: 600; }

.wd-cv-items { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; margin: 0; padding: 6px 8px 10px; }
.wd-cv-item a { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 12px; padding: 12px 10px; border-radius: 12px; color: var(--wd-onyx); text-decoration: none; transition: background 150ms var(--wd-ease); }
.wd-cv-item + .wd-cv-item::before { content: ''; display: block; height: 1px; margin: 0 10px; background: var(--wd-hairline); }
.wd-cv-item:hover::before, .wd-cv-item.is-current::before,
.wd-cv-item:hover + .wd-cv-item::before, .wd-cv-item.is-current + .wd-cv-item::before { background: transparent; }
.wd-cv-item a:hover { background: #F9F7F3; }
.wd-cv-item.is-current a { background: var(--wd-papier); }
.wd-cv-av { width: 40px; height: 40px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: var(--wd-papier); color: var(--wd-onyx); font-family: var(--wd-font-display); font-size: 0.78rem; font-weight: 600; transition: transform 220ms var(--wd-ease); }
.wd-cv-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-cv-item.is-current .wd-cv-av { background: #fff; }
.wd-cv-item a:hover .wd-cv-av { transform: rotate(-4deg); }
.wd-cv-item .main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wd-cv-item .top { display: flex; align-items: baseline; gap: 8px; }
.wd-cv-item .top b { flex: 1; min-width: 0; font-family: var(--wd-font-display); font-size: 0.93rem; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cv-item time { flex: none; font-size: 0.74rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-cv-item .mid { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wd-cv-item .subj { flex: 1; min-width: 0; font-size: 0.84rem; color: var(--wd-onyx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cv-item .prev { font-size: 0.8rem; line-height: 1.4; color: var(--ep-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cv-item .prev i { font-style: normal; color: var(--ep-text-muted); }
.wd-cv-item .badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--wd-jaune); color: #fff; font-size: 0.72rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-cv-item .state { flex: none; font-size: 0.72rem; color: var(--ep-text-muted); }
.wd-cv-item.is-unread .subj { font-weight: 600; }
.wd-cv-item.is-unread .prev { color: var(--wd-onyx); }
.wd-cv-item.is-unread time { color: #9A6A1E; font-weight: 600; }
.wd-cv-item.is-closed .top b, .wd-cv-item.is-closed .subj { color: var(--ep-text-secondary); }
.wd-cv-none { padding: 32px 16px; text-align: center; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-cv-none .ms { display: block; margin: 0 auto 6px; font-size: 26px; color: var(--wd-st-ok); }
.wd-cv-none a { display: block; margin-top: 6px; color: var(--wd-onyx); font-weight: 500; }
.wd-cv-pages { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--wd-hairline); font-size: 0.8rem; }
.wd-cv-pages a { color: var(--wd-onyx); font-weight: 500; }
.wd-cv-pages small { color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }

/* Volet de droite */
.wd-cv-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.wd-cv-rest { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 40px 32px; text-align: center; }
.wd-cv-rest > .ms { font-size: 38px; color: var(--wd-jaune); margin-bottom: 6px; }
.wd-cv-rest > .ms.is-ok { color: var(--wd-st-ok); }
.wd-cv-rest h2 { margin: 0; font-size: 1.2rem; }
.wd-cv-rest p { max-width: 46ch; margin: 4px 0 0; font-size: 0.9rem; color: var(--ep-text-secondary); }
.wd-cv-rest p b { color: var(--wd-onyx); font-weight: 600; }
.wd-cv-rest .wd-ev-btn--primary { margin-top: 16px; color: #fff; }
.wd-cv-rest .wd-ev-btn .ms { font-size: 18px; }

.wd-cv-th { flex: none; display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--wd-hairline); background: #fff; }
.wd-cv-th .wd-cv-av { width: 44px; height: 44px; border-radius: 14px; }
.wd-cv-av.is-new { background: var(--wd-jaune-pale); color: #6B4F22; }
.wd-cv-av.is-new .ms { font-size: 20px; }
.wd-cv-th .t { flex: 1; min-width: 0; }
.wd-cv-th h2 { margin: 0; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cv-th p { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; margin: 2px 0 0; font-size: 0.85rem; color: var(--ep-text-secondary); }
.wd-cv-th p a { color: var(--wd-onyx); text-decoration: none; }
.wd-cv-th p a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-cv-th .sep { color: var(--ep-text-muted); }
.wd-cv-th p .ev { display: contents; }
.wd-cv-j { font-style: normal; height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--wd-jaune-pale); color: #6B4F22; font-size: 0.72rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-cv-th .acts { flex: none; display: flex; align-items: center; gap: 8px; }
.wd-cv-th .acts form { margin: 0; }
.wd-cv-th .acts .wd-ev-btn .ms { font-size: 18px; }
.wd-cv-back { display: none; width: 36px; height: 36px; flex: none; place-items: center; border-radius: var(--wd-r-ctl); color: var(--wd-onyx); }
.wd-cv-back .ms { font-size: 20px; transform: rotate(180deg); }
.wd-cv-back:hover { background: var(--wd-papier); color: var(--wd-onyx); }

/* Fil */
.wd-cv-flow { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 16px; }
.wd-cv-sep { display: flex; align-items: center; gap: 12px; margin: 6px 0 0; font-size: 0.76rem; font-weight: 500; color: var(--ep-text-muted); }
.wd-cv-sep::before, .wd-cv-sep::after { content: ''; flex: 1; height: 1px; background: var(--wd-hairline); }
.wd-cv-sep--new { color: #9A6A1E; font-weight: 600; scroll-margin-top: 90px; }
.wd-cv-sep--new::before, .wd-cv-sep--new::after { background: var(--wd-jaune); opacity: 0.55; }
.wd-cv-msg { display: flex; align-items: flex-start; gap: 10px; max-width: min(640px, 84%); }
.wd-cv-msg.is-mine { align-self: flex-end; flex-direction: row-reverse; }
.wd-cv-msg.is-cont { margin-top: -10px; }
.wd-cv-msg .av { width: 32px; height: 32px; flex: none; display: grid; place-items: center; margin-top: 20px; border-radius: 11px; background: var(--wd-jaune-pale); color: #6B4F22; font-family: var(--wd-font-display); font-size: 0.7rem; font-weight: 600; }
.wd-cv-msg.is-cont .av { visibility: hidden; height: 0; margin-top: 0; }
.wd-cv-msg .col { min-width: 0; display: flex; flex-direction: column; }
.wd-cv-msg.is-mine .col { align-items: flex-end; }
.wd-cv-msg .meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin: 0 0 4px; padding: 0 4px; font-size: 0.78rem; color: var(--ep-text-muted); }
.wd-cv-msg .meta b { font-size: 0.84rem; font-weight: 600; color: var(--wd-onyx); }
.wd-cv-msg .meta time { font-variant-numeric: tabular-nums; }
.wd-cv-msg .meta .ch { display: inline-flex; align-items: center; gap: 3px; }
.wd-cv-msg .meta .ch .ms { font-size: 14px; }
.wd-cv-msg .bubble { padding: 10px 14px; border-radius: 6px 18px 18px 18px; background: var(--wd-papier); color: var(--wd-onyx); font-size: 0.92rem; line-height: 1.55; overflow-wrap: anywhere; }
.wd-cv-msg.is-mine .bubble { border-radius: 18px 6px 18px 18px; background: var(--wd-onyx); color: #fff; }
.wd-cv-msg.is-cont .bubble { border-radius: 18px; }
.wd-cv-msg .bubble p, .wd-cv-msg .bubble ul, .wd-cv-msg .bubble ol, .wd-cv-msg .bubble blockquote { margin: 0 0 0.6em; }
.wd-cv-msg .bubble > :last-child { margin-bottom: 0; }
.wd-cv-msg .bubble ul, .wd-cv-msg .bubble ol { padding-left: 1.2em; }
.wd-cv-msg .bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--wd-jaune); }
.wd-cv-msg .bubble blockquote { padding-left: 10px; border-left: 2px solid currentColor; opacity: 0.75; }
.wd-cv-msg .bubble img { max-width: 100%; height: auto; border-radius: 8px; }
.wd-cv-msg .bubble pre { white-space: pre-wrap; font-size: 0.85em; }
.wd-cv-msg .files { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; }
.wd-cv-msg.is-mine .files { justify-content: flex-end; }
.wd-cv-msg .files a { max-width: 280px; height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; color: var(--wd-onyx); text-decoration: none; transition: border-color 150ms var(--wd-ease), transform 200ms var(--wd-ease); }
.wd-cv-msg .files a:hover { border-color: var(--wd-onyx); transform: translateY(-1px); }
.wd-cv-msg .files .ic { font-size: 20px; color: var(--wd-fumee-fonce); }
.wd-cv-msg .files .n { min-width: 0; font-size: 0.84rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cv-msg .files small { flex: none; font-size: 0.74rem; color: var(--ep-text-muted); }
.wd-cv-msg .files .dl { font-size: 18px; color: var(--ep-text-muted); transition: color 150ms var(--wd-ease); }
.wd-cv-msg .files a:hover .dl { color: var(--wd-onyx); }

/* Assistant de rédaction : sa proposition (à la suite du fil, dans le dossier) */
.wd-ai { padding: 16px 18px; border: 1px solid var(--wd-hairline-2); border-radius: 16px; background: #fff; font-size: 0.88rem; }
.wd-cv-flow > .wd-ai { align-self: stretch; max-width: 640px; width: 100%; margin: 8px auto 0; }
.wd-ev-ai { margin: 0 0 20px; }
.wd-ev-ai-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 24px; }
.wd-ev-ai-col ul { margin: 0; padding-left: 1.1em; line-height: 1.55; }
.wd-ev-ai-col.is-watch h4 { color: var(--wd-st-warn); }
.wd-pg-ai { margin: 0 0 20px; }
.wd-pg-ai-ask { display: grid; gap: 8px; }
.wd-pg-ai-ask .wd-ev-btn { justify-self: start; }
.wd-pg-ai-again { margin-top: 12px; }
.wd-pg-ai-again summary { cursor: pointer; font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-pg-ai-again[open] summary { margin-bottom: 10px; }
.wd-pg-issues-rows { list-style: none; margin: 0; padding: 0; }
.wd-pg-issues-rows li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--wd-hairline); font-size: 0.86rem; }
.wd-pg-issues-rows .ms { font-size: 18px; color: var(--wd-st-warn); align-self: center; }
.wd-pg-issues-rows a { font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-ai-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.wd-ai-h .ms { font-size: 18px; color: var(--wd-jaune); }
.wd-ai-h h3 { margin: 0; font-size: 0.92rem; font-weight: 600; }
.wd-ai-h small { margin-left: auto; color: var(--ep-text-muted); font-size: 0.76rem; font-variant-numeric: tabular-nums; }
.wd-ai h4 { margin: 16px 0 6px; font-size: 0.8rem; font-weight: 600; color: var(--ep-text-secondary); }
.wd-ai h4 small { font-weight: 400; color: var(--ep-text-muted); }
.wd-ai-lede, .wd-ai-wait, .wd-ai-err { margin: 0 0 12px; color: var(--ep-text-secondary); line-height: 1.5; }
.wd-ai-err { color: var(--wd-st-danger); }
.wd-ai-wait { display: flex; align-items: center; gap: 10px; margin: 0; }
.wd-ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wd-jaune); animation: wd-ai-breathe 1.4s var(--wd-ease) infinite; }
@keyframes wd-ai-breathe { 50% { opacity: 0.25; transform: scale(0.7); } }
@media (prefers-reduced-motion: reduce) { .wd-ai-dot { animation: none; } }
.wd-ai-sum { margin: 0 0 10px; font-size: 0.92rem; line-height: 1.5; color: var(--wd-onyx); }
.wd-ai-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.wd-ai-chips li { padding: 3px 10px; border-radius: 999px; background: var(--wd-papier); font-size: 0.8rem; }
.wd-ai-cal { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 0.8rem; color: var(--wd-st-ok); }
.wd-ai-cal.is-busy { color: var(--wd-st-warn); }
.wd-ai-cal .ms { font-size: 16px; }
.wd-ai-q { margin: 0; padding-left: 1.1em; line-height: 1.55; }
.wd-ai-reply { margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; background: var(--wd-papier); line-height: 1.55; }
.wd-ai-reply p { margin: 0 0 0.6em; }
.wd-ai-reply p:last-child { margin-bottom: 0; }
.wd-ai-quote ul { list-style: none; margin: 0 0 10px; padding: 0; border-top: 1px solid var(--wd-hairline); }
.wd-ai-quote li label { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--wd-hairline); cursor: pointer; }
.wd-ai-quote input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--wd-onyx); }
.wd-ai-quote .t b { display: block; font-weight: 500; }
.wd-ai-quote .t small { color: var(--ep-text-muted); font-size: 0.78rem; }
.wd-ai-quote .a { white-space: nowrap; font-variant-numeric: tabular-nums; }
.wd-ai-f { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--wd-hairline); font-size: 0.76rem; color: var(--ep-text-muted); }
.wd-ai-f form { margin: 0; }

/* Réponse et rédaction */
.wd-cv-reply { flex: none; padding: 10px 22px 18px; background: #fff; }
.wd-cv-hint { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-cv-hint .ms { font-size: 16px; }
/* La relance automatique d'une demande, au bas du fil : discrète, avec Suspendre */
.wd-cv-remind { display: flex; align-items: center; gap: 8px; max-width: 560px; margin: 14px auto 4px; padding: 8px 12px; border: 1px dashed var(--wd-hairline-2); border-radius: 12px; font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-cv-remind > .ms { flex: none; font-size: 17px; }
.wd-cv-remind p { flex: 1; min-width: 0; margin: 0; }
.wd-cv-remind a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wd-jaune); }
.wd-cv-remind form { flex: none; margin: 0; }
.wd-cv-remind button { height: 28px; padding: 0 12px; border: 1px solid var(--wd-hairline-2); border-radius: 999px; background: #fff; font-size: 0.8rem; color: var(--wd-onyx); cursor: pointer; }
.wd-cv-remind button:hover { border-color: var(--wd-onyx); }
.wd-cv-compose { border: 1px solid var(--wd-hairline-2); border-radius: 16px; background: #fff; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-cv-compose:focus-within { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.06); }
.wd-cv-compose trix-editor { min-height: 46px; max-height: 32vh; overflow-y: auto; margin: 0; padding: 12px 14px 4px; border: 0; border-radius: 16px 16px 0 0; box-shadow: none; background: transparent; font-size: 0.92rem; line-height: 1.55; color: var(--wd-onyx); }
.wd-cv-compose trix-editor:focus { border: 0; box-shadow: none; }
.wd-cv-compose trix-editor:empty:not(:focus)::before { color: var(--ep-text-muted); }
.wd-cv-compose .wd-cv-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 4px 12px 2px; }
.wd-cv-compose .wd-cv-files:empty { display: none; }
.wd-cv-compose .wd-cv-files .ep-file-item { height: 30px; margin: 0; padding: 0 4px 0 10px; display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 8px; background: var(--wd-papier); font-size: 0.8rem; }
.wd-cv-compose .wd-cv-files .ep-file-item-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-cv-compose .wd-cv-files .ep-file-item-remove { width: 24px; height: 24px; border-radius: 6px; }
.wd-cv-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px 8px; }
/* Messages types (bouton ou « / ») et retouches par l'IA, au-dessus de la zone de saisie */
.wd-cv-compose { position: relative; }
.wd-cv-compose.is-busy trix-editor { opacity: 0.55; pointer-events: none; }
.wd-rt-pop { position: absolute; z-index: 30; left: 8px; bottom: calc(100% + 8px); width: min(380px, calc(100% - 16px)); max-height: min(360px, 52vh); display: flex; flex-direction: column; padding: 8px; overflow-y: auto; border: 1px solid var(--wd-hairline-2); border-radius: 14px; background: #fff; box-shadow: 0 14px 40px rgba(27, 24, 22, 0.14); }
.wd-rt-pop[hidden] { display: none; }
.wd-rt-search { width: 100%; height: 36px; margin: 0 0 6px; padding: 0 10px; border: 1px solid var(--wd-hairline-2); border-radius: 9px; font-size: 0.88rem; }
.wd-rt-search:focus { outline: none; border-color: var(--wd-onyx); }
.wd-rt-items { list-style: none; margin: 0; padding: 0; }
.wd-rt-items li[hidden] { display: none; }
.wd-rt-pop button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 0.88rem; color: var(--wd-onyx); cursor: pointer; }
.wd-rt-pop button:hover, .wd-rt-pop button.is-active { background: var(--wd-papier); }
.wd-rt-empty, .wd-rt-note { margin: 4px 10px 6px; font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-rt-h { margin: 4px 10px 6px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ep-text-muted); }
.wd-rt-manage { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 8px 10px 4px; border-top: 1px solid var(--wd-hairline); font-size: 0.82rem; color: var(--ep-text-secondary); text-decoration: none; }
.wd-rt-manage:hover { color: var(--wd-onyx); }
.wd-rt-manage .ms { font-size: 17px; }
.wd-rt-lang summary { padding: 8px 10px; border-radius: 8px; font-size: 0.88rem; color: var(--wd-onyx); cursor: pointer; list-style: none; }
.wd-rt-lang summary::-webkit-details-marker { display: none; }
.wd-rt-lang summary::after { content: '›'; float: right; color: var(--ep-text-muted); }
.wd-rt-lang[open] summary::after { transform: rotate(90deg); }
.wd-rt-lang summary:hover { background: var(--wd-papier); }
.wd-rt-lang button { padding-left: 22px; }
.wd-rt-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 2px 14px 0; font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-rt-status[hidden] { display: none; }
/* Paramètres › Messages types */
.wd-rt-inline { font-size: 17px; vertical-align: -3px; }
.wd-rt-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wd-hairline); }
.wd-rt-list li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--wd-hairline); }
.wd-rt-list .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 4px; color: inherit; text-decoration: none; }
.wd-rt-list .t:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wd-jaune); }
.wd-rt-list .t b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.94rem; font-weight: 600; color: var(--wd-onyx); }
.wd-rt-list .t small { font-size: 0.82rem; color: var(--ep-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-rt-list .wd-st { height: 22px; font-size: 0.72rem; font-weight: 500; }
.wd-rt-list form { margin: 0; flex: none; }
.wd-rt-auto { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.wd-rt-auto .form-select { flex: 1; min-width: 220px; }
.wd-rt-remind { display: grid; gap: 10px; margin: 12px 0 4px; }
.wd-rt-step { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.wd-rt-step label { flex: 0 0 128px; margin: 0; font-size: 0.88rem; font-weight: 500; color: var(--wd-onyx); }
.wd-rt-step .form-select { flex: 1; min-width: 200px; }
.wd-rt-after { display: flex; align-items: center; gap: 6px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-rt-after .form-control { width: 64px; height: 34px; padding: 4px 8px; text-align: center; font-variant-numeric: tabular-nums; }
.wd-rt-remind > .wd-ev-btn { justify-self: start; }
@media (max-width: 575.98px) { .wd-rt-step label { flex-basis: 100%; } }
.wd-rt-editor { min-height: 220px; }
.wd-rt-vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 4px; }
.wd-rt-var { height: 28px; padding: 0 10px; border: 1px solid var(--wd-hairline-2); border-radius: 999px; background: #fff; font-size: 0.8rem; color: var(--wd-onyx); cursor: pointer; }
.wd-rt-var:hover { border-color: var(--wd-onyx); }
.wd-cv-bar trix-toolbar { position: relative; flex: 0 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.wd-cv-bar trix-toolbar .trix-button-row { gap: 0; overflow: visible; }
.wd-cv-bar trix-toolbar .trix-button-group { margin: 0; padding: 0; gap: 0; border: 0; border-radius: 0; background: transparent; }
.wd-cv-bar trix-toolbar .trix-button-group + .trix-button-group { margin-left: 4px; padding-left: 4px; border-left: 1px solid var(--wd-hairline); border-radius: 0; }
.wd-cv-bar trix-toolbar .trix-button-group--history-tools { display: none; }
.wd-cv-bar trix-toolbar .trix-button, .wd-cv-bar trix-toolbar .trix-button--icon { width: 30px; height: 30px; border-radius: 8px; }
.wd-cv-bar trix-toolbar .trix-button:hover { background: var(--wd-papier); }
.wd-cv-bar trix-toolbar .trix-button.trix-active { background: var(--wd-papier); box-shadow: none; }
.wd-cv-bar trix-toolbar .trix-dialogs { position: absolute; left: 0; bottom: 100%; width: min(420px, 70vw); }
.wd-cv-bar trix-toolbar .trix-dialog { top: auto; bottom: 8px; border-radius: 12px; border: 1px solid var(--wd-hairline); box-shadow: var(--wd-shadow-lift); }
.wd-cv-attach { margin-left: 2px; }
.wd-cv-kbd { margin-left: auto; padding-right: 6px; font-size: 0.74rem; color: var(--ep-text-muted); white-space: nowrap; opacity: 0; transition: opacity 150ms var(--wd-ease); }
.wd-cv-compose:focus-within .wd-cv-kbd { opacity: 1; }
.wd-cv-send { flex: none; margin-left: auto; height: 36px; background: var(--wd-hairline-2); border-color: var(--wd-hairline-2); color: #fff; transition: background 200ms var(--wd-ease), border-color 200ms var(--wd-ease), transform 200ms var(--wd-ease); }
.wd-cv-kbd + .wd-cv-send { margin-left: 4px; }
.wd-cv-send .ms { font-size: 17px; transition: transform 300ms var(--wd-ease); }
.wd-cv-compose.is-ready .wd-cv-send, .wd-cv-compose .wd-cv-send:focus-visible { background: var(--wd-onyx); border-color: var(--wd-onyx); }
.wd-cv-compose.is-ready .wd-cv-send:hover { background: var(--wd-onyx); color: #fff; }
.wd-cv-compose.is-ready .wd-cv-send:hover .ms { transform: translateX(2px) rotate(-12deg); }
.wd-cv-compose.is-shake { animation: wd-cv-shake 380ms var(--wd-ease); }
.is-sending .wd-cv-send { pointer-events: none; }
.is-sending .wd-cv-send .ms { animation: wd-cv-fly 700ms ease-in infinite; }
@keyframes wd-cv-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes wd-cv-fly { 0% { transform: none; opacity: 1; } 60% { transform: translate(14px, -8px) rotate(-12deg); opacity: 0; } 61% { transform: translate(-10px, 4px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* Rédaction : À / Objet en lignes, comme un courrier */
.wd-cv-new { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 4px 22px 18px; }
.wd-cv-field { flex: none; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--wd-hairline); transition: border-color 150ms var(--wd-ease); }
.wd-cv-field:focus-within { border-bottom-color: var(--wd-onyx); }
.wd-cv-field label { margin: 0; font-size: 0.86rem; color: var(--ep-text-muted); }
.wd-cv-field:focus-within label { color: var(--wd-onyx); }
.wd-cv .wd-cv-field .form-control, .wd-cv .wd-cv-field .form-select { height: 50px; padding-left: 0; border: 0; border-radius: 0; box-shadow: none; background-color: transparent; font-size: 0.95rem; color: var(--wd-onyx); }
.wd-cv .wd-cv-field .form-select { background-position: right 4px center; }
.wd-cv .wd-cv-field .form-select:has(option[value=""]:checked) { color: var(--ep-text-muted); }
.wd-cv-new .wd-cv-compose { flex: 1; display: flex; flex-direction: column; margin-top: 18px; }
.wd-cv-new .wd-cv-compose trix-editor { flex: 1; min-height: 220px; max-height: none; }

/* Modale « Nouveau message » (menu Créer, fiche client) : la même rédaction */
.wd-cvm .modal-content { border: 0; border-radius: var(--wd-r-card); box-shadow: var(--wd-shadow-lift); overflow: clip; }
.wd-cvm-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 10px 22px; }
.wd-cvm-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }
.wd-cvm .modal-body { max-height: none; overflow: visible; padding: 0 22px 22px; }
.wd-cvm .ep-modal-errors { margin: 4px 0 8px; }
.wd-cvm-to { min-width: 0; }
.wd-cvm-recipient { height: 50px; display: flex; align-items: center; font-size: 0.95rem; font-weight: 500; color: var(--wd-onyx); }
.wd-cvm .wd-cv-compose { margin-top: 18px; }
.wd-cvm .wd-cv-compose trix-editor { min-height: 190px; max-height: 45vh; }

@media (max-width: 991.98px) {
    .wd-cv-box { display: block; height: auto; min-height: 0; }
    .wd-cv--thread .wd-cv-side, .wd-cv--new .wd-cv-side, .wd-cv--list .wd-cv-pane { display: none; }
    .wd-cv--thread .wd-cv-head, .wd-cv--new .wd-cv-head { display: none; }
    .wd-cv-side { border-right: 0; }
    .wd-cv-items, .wd-cv-flow, .wd-cv-new { overflow: visible; }
    .wd-cv-back { display: grid; margin-left: -6px; }
    .wd-cv-th { position: sticky; top: var(--wd-cv-sticky-top, 64px); z-index: 4; gap: 10px; padding: 12px 14px; border-radius: var(--wd-r-card) var(--wd-r-card) 0 0; }
    .wd-cv-th .acts .l { display: none; }
    .wd-cv-th .acts .wd-ev-btn { width: 38px; padding: 0; justify-content: center; }
    .wd-cv-flow { padding: 16px 14px 12px; }
    .wd-cv-reply { position: sticky; bottom: 0; z-index: 4; padding: 8px 10px 10px; border-radius: 0 0 var(--wd-r-card) var(--wd-r-card); }
    .wd-cv-new { padding: 4px 14px 14px; }
}
@media (max-width: 767.98px) {
    .wd-cv-head { margin-bottom: 14px; }
    .wd-cv-msg { max-width: 90%; }
    .wd-cv-msg .av { display: none; }
    .wd-cv-reply { bottom: calc(64px + env(safe-area-inset-bottom)); }
    .wd-cv-kbd { display: none; }
    .wd-cv-th .wd-cv-av { width: 38px; height: 38px; border-radius: 12px; }
    .wd-cv-th h2 { font-size: 1.02rem; }
    .wd-cv-th p { font-size: 0.8rem; }
    .wd-cv-th p .ev { display: none; }
    .wd-cv-new .wd-cv-compose trix-editor { min-height: 160px; }
}
@media (max-width: 575.98px) {
    .wd-cvm .modal-content { border-radius: 0; }
    .wd-cvm .modal-body { flex: 1; display: flex; flex-direction: column; }
    .wd-cvm form.wd-cv { flex: 1; display: flex; flex-direction: column; min-height: 0; }
    .wd-cvm .wd-cv-compose { flex: 1; display: flex; flex-direction: column; }
    .wd-cvm .wd-cv-compose trix-editor { flex: 1; max-height: none; }
}
@media (hover: none) { .wd-cv-kbd { display: none; } }
@media (prefers-reduced-motion: reduce) {
    .wd-cv-av, .wd-cv-send .ms, .wd-cv-msg .files a { transition: none; }
    .wd-cv-compose.is-shake, .is-sending .wd-cv-send .ms { animation: none; }
}

/* ============================================================
   FICHES DEVIS ET FACTURE — carte-titre noire (numéro, objet, statut cliquable,
   couple, événement, validité, total) ; à gauche le document
   (prestations, composeur, totaux, conditions), à droite les détails,
   la réponse du couple et la facturation (23/10/2026).
   Une ligne s'enregistre à l'ajout ; le reste par la barre noire
   « Modifications non enregistrées » (doc_sheet_controller).
   ============================================================ */
.wd-doc { padding-bottom: 88px; }

/* Carte-titre */
.wd-doc-cover { align-items: flex-start; margin-bottom: 24px; }
.wd-doc-cover .wd-ev-av .ms { font-size: 26px; }
.wd-doc-kicker { margin: 0 0 4px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums; }
.wd-doc-cover h1 { overflow-wrap: anywhere; }
.wd-doc-cover .wd-ev-meta { margin-top: 10px; }
.wd-doc-cover .wd-ev-meta li.is-late, .wd-doc-cover .wd-ev-meta li.is-late .ms { color: #F2A99E; }
.wd-doc-cover .wd-ev-meta li.is-soon, .wd-doc-cover .wd-ev-meta li.is-soon .ms { color: var(--wd-jaune); }
.wd-doc-cover .wd-ev-meta li.is-ok .ms { color: #9CCFAE; }
.wd-doc-j { margin-left: 8px; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 0.74rem; font-weight: 600; display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; }
.wd-doc-cover-side { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.wd-doc-cover-side .wd-ev-cover-right { margin-left: 0; flex-wrap: wrap; justify-content: flex-end; }
.wd-doc-cover-side form { margin: 0; }
.wd-doc-cover .wd-ev-cover-right .wd-ev-btn .ms { font-size: 18px; color: inherit; }
.wd-doc-amount { margin: 0; text-align: right; line-height: 1.2; }
.wd-doc-amount b { display: block; font-family: var(--wd-font-display); font-weight: 600; font-size: 1.75rem; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.wd-doc-amount span { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; }

/* Grille et cartes */
.wd-doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.wd-doc-main, .wd-doc-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.wd-doc-card {
    background: var(--wd-card-bg); border: 1px solid var(--wd-card-border);
    border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow);
    padding: 20px 24px; margin: 0; min-width: 0;
}
.wd-doc-card-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.wd-doc-card-h h2 { font-family: var(--wd-font-sans); font-size: 0.98rem; font-weight: 600; margin: 0; letter-spacing: 0; color: var(--wd-onyx); }
.wd-doc-card-h h2 .wd-reg-count { font-size: 0.9rem; margin-left: 2px; }
.wd-doc-card-h > :last-child:not(h2) { margin-left: auto; }
.wd-doc-hint { font-size: 0.78rem; color: var(--ep-text-muted); }
.wd-doc-empty { margin: 0; color: var(--ep-text-secondary); font-size: 0.9rem; }

/* Lignes du devis */
.wd-doc-table-wrap { overflow-x: auto; }
.wd-doc-lines { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.wd-doc-lines th { font-size: 0.76rem; font-weight: 500; color: var(--ep-text-muted); padding: 0 10px 10px; border-bottom: 1px solid var(--wd-hairline); text-align: left; white-space: nowrap; }
.wd-doc-lines td { padding: 14px 10px; border-bottom: 1px solid var(--wd-hairline); vertical-align: top; transition: background 150ms var(--wd-ease); }
.wd-doc-lines tbody tr:last-child td { border-bottom: 0; }
.wd-doc-lines th:first-child, .wd-doc-lines td:first-child { padding-left: 4px; }
.wd-doc-lines th:last-child, .wd-doc-lines td:last-child { padding-right: 4px; }
.wd-doc-lines .c-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* La poignée vit dans la marge de la carte : la désignation reste alignée sur le titre */
.wd-doc-doc--edit .wd-doc-table-wrap { margin-left: -22px; }
.wd-doc-lines .c-grip { width: 22px; padding-left: 0 !important; padding-right: 0; border-bottom-color: transparent !important; }
.wd-doc-lines td.c-grip { color: var(--ep-text-muted); cursor: grab; opacity: 0; transition: opacity 150ms var(--wd-ease); }
.wd-doc-lines .c-grip + th, .wd-doc-lines .c-grip + td { padding-left: 4px; }
.wd-doc-lines td.c-grip .ms { font-size: 18px; display: block; margin-top: 1px; }
.wd-doc-line:hover td.c-grip { opacity: 1; }
.wd-doc-lines .c-name { min-width: 200px; }
.wd-doc-lines .c-name b { display: block; font-weight: 600; color: var(--wd-onyx); }
.wd-doc-lines .c-name small { display: block; margin-top: 3px; color: var(--ep-text-secondary); font-size: 0.82rem; line-height: 1.45; max-width: 62ch; }
.wd-doc-lines .u, .wd-doc-lines .c-tva { color: var(--ep-text-secondary); }
.wd-doc-lines .c-total { font-weight: 600; color: var(--wd-onyx); }
.wd-doc-lines .c-total s { display: block; font-weight: 400; font-size: 0.78rem; color: var(--ep-text-muted); }
.wd-doc-lines .c-act { width: 76px; text-align: right; padding-top: 9px; padding-bottom: 9px; }
.wd-doc-line:hover td { background: #FBFAF7; }
.wd-doc-line.is-editing td { background: var(--wd-jaune-pale); }
.wd-doc-lines .ep-line-ghost td { background: var(--wd-papier); opacity: 0.6; }
.wd-doc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.wd-doc-tags span { height: 22px; padding: 0 8px; border-radius: 999px; background: var(--wd-st-mute-bg); color: var(--wd-st-mute); font-size: 0.74rem; font-weight: 500; display: inline-flex; align-items: center; }
.wd-doc-tags .is-disc { background: var(--wd-jaune-pale); color: #6B4F22; }
/* Devis à options : une option non cochée reste lisible, hors du total */
.wd-doc-tags .is-opt { background: var(--wd-st-info-bg); color: var(--wd-st-info); }
.wd-doc-line.is-out td:not(.c-act):not(.c-grip) { color: var(--ep-text-muted); }
.wd-doc-line.is-out .c-name b, .wd-doc-line.is-out .c-total { color: var(--ep-text-secondary); font-weight: 500; }
.wd-doc-lines .c-total .wd-doc-out { display: block; font-weight: 400; font-size: 0.74rem; color: var(--ep-text-muted); }
.wd-doc-optpick { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto; }
.wd-doc-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 0.8rem; font-weight: 500; color: var(--ep-text-secondary); cursor: pointer; }
.wd-doc-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--wd-onyx); }
.wd-doc-acts { display: inline-flex; gap: 2px; opacity: 0; transition: opacity 150ms var(--wd-ease); }
.wd-doc-line:hover .wd-doc-acts, .wd-doc-acts:focus-within, .wd-doc-line.is-editing .wd-doc-acts { opacity: 1; }
.wd-doc-acts form { margin: 0; }
.wd-doc-ico { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--ep-text-secondary); display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-doc-ico .ms { font-size: 18px; }
.wd-doc-ico:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-doc-ico.is-danger:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }

/* Composeur : la ligne suivante, en creux pointillé tant qu'on n'y écrit pas */
.wd-doc-add {
    margin-top: 8px; padding: 14px 16px 12px;
    border: 1px dashed var(--wd-hairline-2); border-radius: var(--wd-r-panel);
    background: #FCFBF9;
    transition: background 150ms var(--wd-ease), border-color 150ms var(--wd-ease), box-shadow 200ms var(--wd-ease);
}
.wd-doc-add.is-first { margin-top: 0; }
.wd-doc-add:focus-within { border-style: solid; background: #fff; box-shadow: 0 8px 24px -16px rgba(27, 24, 22, 0.35); }
.wd-doc-add.is-editing { border-style: solid; border-color: var(--wd-jaune); background: #fff; }
.wd-doc-add-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 0.82rem; font-weight: 600; color: var(--wd-onyx); }
.wd-doc-add-h .wd-doc-link { margin-left: auto; }
.wd-doc-add-search .form-control { height: 44px; font-size: 0.95rem; background: #fff; }
.wd-doc-add .ep-autocomplete-icon, .wd-doc-meta .ep-autocomplete-icon { font-size: 19px; left: 12px; }
.wd-doc-add .ep-autocomplete-input, .wd-doc-meta .ep-autocomplete-input { padding-left: 40px !important; }
.wd-doc-add-desc { margin-top: 8px; }
.wd-doc-add-desc textarea { min-height: 64px; font-size: 0.88rem; background: #fff; }
.wd-doc-add-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 12px; }
.wd-doc-add-row .f { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; }
.wd-doc-add-row .f > span:first-child { font-size: 0.74rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-doc-add-row .form-control, .wd-doc-add-row .form-select { height: 38px; font-size: 0.88rem; background-color: #fff; }
.wd-doc-add-row .f-qty { width: 72px; }
.wd-doc-add-row .f-unit { width: 120px; }
.wd-doc-add-row .f-price { width: 128px; }
.wd-doc-add-row .f-tva { width: 88px; }
.wd-doc-add-row .f-disc { width: 150px; }
.wd-doc-add-row .f-nature { width: 136px; }
.wd-doc-add-row .f-total { margin-left: auto; align-items: flex-end; }
.wd-doc-add-row .f-total output { height: 38px; display: inline-flex; align-items: center; font-weight: 600; font-size: 0.95rem; color: var(--wd-onyx); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-doc-money { position: relative; display: block; }
.wd-doc-money .form-control { padding-right: 28px; text-align: right; }
.wd-doc-money i { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ep-text-muted); font-size: 0.86rem; pointer-events: none; }
.wd-doc-disc { display: flex; gap: 4px; }
.wd-doc-disc .form-control { min-width: 0; }
.wd-doc-disc .form-select { width: 62px; flex: none; padding-right: 22px; }
.wd-doc-add-btn {
    height: 38px; padding: 0 14px 0 10px; border: 0; border-radius: var(--wd-r-ctl);
    background: var(--wd-onyx); color: #fff; font-size: 0.86rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
    transition: background 150ms var(--wd-ease), transform 200ms var(--wd-ease);
}
.wd-doc-add-btn:hover { background: #000; transform: translateY(-1px); }
.wd-doc-add-btn .ms { font-size: 18px; }
.wd-doc-add-opts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 12px; }
.wd-doc-link {
    border: 0; background: none; padding: 0; font-size: 0.8rem; font-weight: 500; color: var(--ep-text-secondary);
    text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--wd-hairline-2);
    transition: color 150ms var(--wd-ease), text-decoration-color 150ms var(--wd-ease);
}
.wd-doc-link:hover { color: var(--wd-onyx); text-decoration-color: var(--wd-jaune); text-decoration-thickness: 2px; }

/* Totaux : la TVA ventilée par taux, le TTC en grand */
.wd-doc-totals { width: min(100%, 360px); margin: 20px 4px 0 auto; font-size: 0.9rem; }
/* En édition, la colonne d'actions suit le total : les montants s'alignent sur la colonne Total HT */
.wd-doc-doc--edit .wd-doc-totals { margin-right: 86px; }
.wd-doc-totals .r { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 6px 0; }
.wd-doc-totals .r > span { color: var(--ep-text-secondary); }
.wd-doc-totals .r b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--wd-onyx); }
.wd-doc-totals .r small { color: var(--ep-text-muted); font-size: 0.78rem; margin-left: 4px; }
.wd-doc-totals .r-ht { border-top: 1px solid var(--wd-hairline); margin-top: 4px; padding-top: 10px; }
.wd-doc-totals .r-ht > span { color: var(--wd-onyx); font-weight: 500; }
.wd-doc-totals .r-ttc { border-top: 1px solid var(--wd-hairline-2); margin-top: 6px; padding-top: 12px; }
.wd-doc-totals .r-ttc > span { color: var(--wd-onyx); font-weight: 600; }
.wd-doc-totals .r-ttc b { font-family: var(--wd-font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.wd-doc-gdisc { display: inline-flex; align-items: center; gap: 6px; }
.wd-doc-gdisc .form-control { width: 76px; height: 32px; text-align: right; font-size: 0.86rem; }
.wd-doc-gdisc .form-select { width: 58px; height: 32px; font-size: 0.86rem; padding-right: 20px; }
.wd-doc-totals .wd-doc-add-gdisc { display: block; margin: 8px 0 0 auto; }
.wd-doc-mention { margin: 4px 0 0; font-size: 0.78rem; color: var(--ep-text-muted); text-align: right; }
/* Motif de la TVA à 0 % (assujetti) : sous le total, l'article seulement pour une autre exonération */
.wd-doc-vatex { display: grid; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--wd-hairline); }
.wd-doc-vatex label { font-size: 0.78rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-doc-vatex .form-select, .wd-doc-vatex .form-control { height: 34px; font-size: 0.86rem; }
.wd-doc-vatex .wd-doc-mention { margin-top: 0; }

/* Conditions */
.wd-doc-terms textarea { min-height: 104px; font-size: 0.9rem; }
.wd-doc-notes { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--wd-onyx); }

/* Détails */
.wd-doc-f { display: flex; flex-direction: column; gap: 5px; margin: 0 0 14px; min-width: 0; }
.wd-doc-f > label, .wd-doc-f > span { font-size: 0.78rem; font-weight: 500; color: var(--ep-text-secondary); margin: 0; }
.wd-doc-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wd-doc-f2 .wd-doc-f { margin-bottom: 0; }
.wd-doc-meta .form-control, .wd-doc-meta .form-select { height: 40px; font-size: 0.88rem; }
.wd-doc-meta input[type="date"] { padding-right: 8px; }

/* Réponse du couple */
.wd-doc-reply-by { margin: 0; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-doc-reply blockquote { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--wd-papier); font-size: 0.88rem; color: var(--wd-onyx); }

/* Facturation */
.wd-doc-pct { font-family: var(--wd-font-display); font-weight: 600; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.wd-doc-gauge { height: 6px; border-radius: 999px; background: var(--wd-fumee); overflow: hidden; }
.wd-doc-gauge i { display: block; height: 100%; border-radius: inherit; background: var(--wd-jaune); }
.wd-doc-bill-sum { margin: 10px 0 0; font-size: 0.86rem; color: var(--ep-text-secondary); line-height: 1.55; }
.wd-doc-bill-sum b { color: var(--wd-onyx); font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-doc-invoices { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--wd-hairline); }
.wd-doc-invoices a {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center;
    padding: 10px 8px; margin: 0 -8px; border-radius: 10px;
    text-decoration: none; color: var(--wd-onyx); transition: background 150ms var(--wd-ease);
}
.wd-doc-invoices li + li a { border-top: 1px solid var(--wd-hairline); border-radius: 0; }
.wd-doc-invoices a:hover { background: #FBFAF7; }
.wd-doc-invoices b { font-weight: 600; font-size: 0.88rem; }
.wd-doc-invoices .a { text-align: right; font-weight: 600; font-size: 0.88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-doc-invoices .a small { font-weight: 400; }
.wd-doc-invoices small { color: var(--ep-text-secondary); font-size: 0.78rem; }
.wd-doc-invoices .wd-st { justify-self: end; height: 22px; font-size: 0.72rem; }
.wd-doc-bill-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.wd-doc-bill-acts .wd-ev-btn { height: 34px; flex: 1 1 auto; justify-content: center; }

/* Barre d'enregistrement : noire, centrée sur le contenu, au-dessus de tout */
.wd-doc-savebar {
    position: fixed; z-index: 1040; left: calc(50% + var(--wd-side-w-rail) / 2); bottom: 24px;
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 16px;
    border-radius: 14px; background: var(--wd-onyx); color: #fff;
    box-shadow: 0 18px 40px -16px rgba(27, 24, 22, 0.55);
    font-size: 0.86rem;
    animation: wd-doc-bar-in 260ms var(--wd-ease) both;
}
.wd-doc-savebar[hidden] { display: none; }
.wd-doc-savebar > span { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; white-space: nowrap; }
.wd-doc-savebar > span i { width: 8px; height: 8px; border-radius: 50%; background: var(--wd-jaune); animation: wd-doc-breath 1.8s ease-in-out infinite; }
.wd-doc-savebar button { height: 34px; padding: 0 14px; border: 0; border-radius: var(--wd-r-ctl); font-size: 0.86rem; font-weight: 500; white-space: nowrap; }
.wd-doc-savebar-undo { background: transparent; color: rgba(255, 255, 255, 0.72); }
.wd-doc-savebar-undo:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.wd-doc-savebar-save { background: #fff; color: var(--wd-onyx); font-weight: 600 !important; }
@keyframes wd-doc-bar-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes wd-doc-breath { 50% { opacity: 0.4; } }

/* Modale de facturation (acompte, intermédiaire, solde) */
.wd-doc-modal .modal-content { border: 0; border-radius: var(--wd-r-card); box-shadow: 0 30px 60px -20px rgba(27, 24, 22, 0.35); }
.wd-doc-modal .modal-header { border: 0; padding: 22px 24px 6px; }
.wd-doc-modal .modal-title { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.2rem; }
.wd-doc-modal .modal-body { padding: 10px 24px 6px; }
.wd-doc-modal .modal-footer { border: 0; padding: 14px 24px 22px; gap: 8px; }
.wd-doc-modal .modal-footer > * { margin: 0; }
.wd-doc-modal-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 18px; border: 1px solid var(--wd-hairline); border-radius: 14px; }
.wd-doc-modal-sum > div { padding: 10px 14px; min-width: 0; }
.wd-doc-modal-sum > div + div { border-left: 1px solid var(--wd-hairline); }
.wd-doc-modal-sum dt { font-size: 0.74rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-doc-modal-sum dd { margin: 2px 0 0; font-size: 0.88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-doc-seg { display: inline-flex; background: var(--wd-papier); border-radius: 10px; padding: 3px; gap: 2px; margin-bottom: 14px; }
.wd-doc-seg label { height: 32px; padding: 0 14px; border-radius: 8px; display: inline-flex; align-items: center; font-size: 0.84rem; font-weight: 500; color: var(--ep-text-secondary); cursor: pointer; margin: 0; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-doc-seg .btn-check:checked + label { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(27, 24, 22, 0.08), 0 0 0 1px var(--wd-hairline); }
.wd-doc-seg .btn-check:focus-visible + label { outline: 2px solid var(--wd-jaune); outline-offset: 1px; }
.wd-doc-modal .wd-doc-money .form-control { height: 44px; font-size: 1rem; }
.wd-doc-modal-preview { margin: 10px 0 0; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-doc-modal-preview b { color: var(--wd-onyx); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
    .wd-doc-savebar, .wd-doc-savebar > span i { animation: none; }
}
/* Sous 1200 px, une colonne : le document d'abord, puis les détails sur deux colonnes */
@media (max-width: 1199.98px) {
    .wd-doc-grid { grid-template-columns: minmax(0, 1fr); }
    .wd-doc-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
    .wd-doc-meta > .wd-doc-card-h { grid-column: 1 / -1; }
    .wd-doc-meta > .wd-doc-f2 { grid-column: 2; }
}
@media (max-width: 991.98px) {
    .wd-doc-cover-side { width: 100%; align-items: flex-start; flex-direction: column-reverse; gap: 12px; }
    .wd-doc-cover-side .wd-ev-cover-right { justify-content: flex-start; }
    .wd-doc-amount { text-align: left; }
    .wd-doc-savebar { left: 50%; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
/* Téléphone : chaque ligne devient une fiche (désignation, puis
   « quantité × prix » et le total), les actions toujours visibles */
@media (max-width: 767.98px) {
    .wd-doc-card { padding: 16px; }
    .wd-doc-meta { display: block; }
    .wd-doc-hint { display: none; }
    .wd-doc-lines thead { display: none; }
    .wd-doc-lines, .wd-doc-lines tbody { display: block; }
    .wd-doc-lines tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: baseline; gap: 4px 6px; padding: 12px 0; border-bottom: 1px solid var(--wd-hairline); position: relative; }
    .wd-doc-lines tbody tr:last-child { border-bottom: 0; }
    .wd-doc-lines td { display: block; padding: 0 !important; border: 0; background: none !important; }
    .wd-doc-lines td.c-grip, .wd-doc-lines td.c-tva { display: none; }
    .wd-doc-lines td.c-name { grid-column: 1 / -1; min-width: 0; padding-right: 72px !important; }
    .wd-doc-lines td.c-num { text-align: left; font-size: 0.84rem; color: var(--ep-text-secondary); }
    .wd-doc-lines td.c-name + td.c-num::after { content: ' ×'; }
    .wd-doc-lines td.c-total { grid-column: 4; text-align: right; font-size: 0.9rem; color: var(--wd-onyx); }
    .wd-doc-lines td.c-act { position: absolute; top: 6px; right: 0; width: auto; }
    .wd-doc-acts { opacity: 1; }
    .wd-doc-add { padding: 12px; }
    .wd-doc-add-row .f-qty { width: 64px; }
    .wd-doc-add-row .f-price { flex: 1 1 110px; width: auto; }
    .wd-doc-add-row .f-unit, .wd-doc-add-row .f-disc, .wd-doc-add-row .f-nature { flex: 1 1 130px; width: auto; }
    .wd-doc-add-row .f-total { margin-left: 0; flex: 1 1 auto; align-items: flex-start; }
    .wd-doc-add-btn { flex: 1 1 100%; justify-content: center; height: 42px; }
    .wd-doc-totals, .wd-doc-doc--edit .wd-doc-totals { width: 100%; margin-right: 0; }
    .wd-doc-doc--edit .wd-doc-table-wrap { margin-left: 0; }
    .wd-doc-savebar { width: calc(100% - 24px); justify-content: flex-end; }
    .wd-doc-savebar > span { margin-right: auto; }
}
.wd-doc-add.is-editing .wd-doc-add-btn .ms { display: none; }
.wd-doc-add.is-editing .wd-doc-add-btn { padding-left: 14px; }
/* Ligne tout juste modifiée : un voile or qui s'efface */
.wd-doc-line.is-saved td { animation: wd-doc-saved 1.6s var(--wd-ease); }
@keyframes wd-doc-saved { from { background: var(--wd-jaune-pale); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .wd-doc-line.is-saved td { animation: none; } }

/* ── Fiche facture : ce qui s'ajoute à la grammaire du devis ── */
.wd-cl-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.wd-doc-hint--lock { display: inline-flex; align-items: center; gap: 5px; }
.wd-doc-hint--lock .ms { font-size: 15px; }
.wd-doc-gauge.is-done i { background: var(--wd-st-ok); }
.wd-doc-bill-sum .is-warn { color: var(--wd-st-warn); }
.wd-doc-bill-sum .is-warn b { color: var(--wd-st-warn); }
.wd-doc-payments { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--wd-hairline); max-height: 268px; overflow-y: auto; }
.wd-doc-payments li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--wd-hairline); }
.wd-doc-payments li:last-child { border-bottom: 0; }
.wd-doc-payments b { font-weight: 500; font-size: 0.86rem; }
.wd-doc-payments .a { text-align: right; font-weight: 600; font-size: 0.88rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--wd-st-ok); }
.wd-doc-payments small { grid-column: 1 / -1; color: var(--ep-text-secondary); font-size: 0.78rem; overflow-wrap: anywhere; }
.wd-doc-bank-rows { list-style: none; margin: 0; padding: 0; }
.wd-doc-bank-rows li { display: grid; grid-template-columns: 76px minmax(0, 1fr) 32px; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--wd-hairline); }
.wd-doc-bank-rows li:last-child { border-bottom: 0; }
.wd-doc-bank-rows span { font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-doc-bank-rows b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 500; font-size: 0.82rem; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.wd-doc-bank-note { margin: 10px 0 0; font-size: 0.78rem; color: var(--ep-text-muted); }
/* Relances automatiques de la facture : celles parties, puis la prochaine */
.wd-doc-remind { list-style: none; margin: 0; padding: 0; }
.wd-doc-remind li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--wd-hairline); }
.wd-doc-remind b { font-weight: 500; font-size: 0.86rem; }
.wd-doc-remind span { font-size: 0.82rem; color: var(--ep-text-secondary); white-space: nowrap; }
.wd-doc-remind a { color: inherit; text-decoration: underline; text-decoration-color: var(--wd-hairline); text-underline-offset: 3px; }
.wd-doc-remind-note { margin: 10px 0 0; font-size: 0.82rem; color: var(--ep-text-secondary); line-height: 1.5; }
.wd-doc-remind + .wd-doc-remind-note { margin-top: 10px; }
.wd-doc-remind-act { margin: 0 0 0 auto; }
.wd-doc-remind-act button { background: none; border: 0; padding: 2px 0; font-size: 0.8rem; color: var(--ep-text-secondary); text-decoration: underline; text-decoration-color: var(--wd-hairline); text-underline-offset: 3px; }
.wd-doc-remind-act button:hover { color: var(--wd-onyx); }
/* Facture électronique : étapes chez la plateforme agréée */
.wd-doc-einv .wd-doc-card-h .wd-st { margin-left: auto; }
.wd-doc-einv-steps { list-style: none; margin: 0; padding: 0; }
.wd-doc-einv-steps li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--wd-hairline); }
.wd-doc-einv-steps li:last-child { border-bottom: 0; }
.wd-doc-einv-steps b { font-weight: 500; font-size: 0.86rem; }
.wd-doc-einv-steps span { font-size: 0.82rem; color: var(--ep-text-secondary); white-space: nowrap; }
.wd-doc-einv-steps small { grid-column: 1 / -1; font-size: 0.78rem; color: var(--ep-text-secondary); overflow-wrap: anywhere; }
.wd-doc-einv-steps li.is-failed b, .wd-doc-einv-steps li.is-failed small { color: var(--wd-st-danger); }
.wd-doc-einv-note { margin: 0; font-size: 0.84rem; color: var(--ep-text-secondary); line-height: 1.5; }
.wd-doc-einv-block { margin: 10px 0 0; padding-left: 18px; font-size: 0.82rem; color: var(--wd-st-danger); line-height: 1.5; }
.wd-doc-einv form { display: contents; }
/* Paramètres › Devis et factures : plateforme agréée reliée */
.wd-set-einv { margin-top: 16px; }
.wd-set-einv .wd-st + .wd-st { margin-left: 6px; }
.wd-set-einv-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wd-set-einv .is-warn { color: var(--wd-st-danger); }
.wd-set-einv-vat { margin-top: 14px; }
.wd-set-einv-vat-row { display: flex; gap: 8px; }
.wd-set-einv-vat-row .form-select { flex: 1 1 auto; min-width: 0; }
.wd-set-einv-debits { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.84rem; color: var(--ep-text-secondary); }
/* Échéancier du devis : versements prévus, puis facturés */
.wd-doc-plan .wd-doc-card-h .wd-doc-link { margin-left: auto; }
.wd-doc-plan-lede { margin: 0; font-size: 0.84rem; color: var(--ep-text-secondary); line-height: 1.5; }
.wd-doc-plan-rows + .wd-doc-plan-lede { margin-top: 10px; }
.wd-doc-plan .wd-doc-bill-acts form { display: contents; }
.wd-doc-plan-rows { list-style: none; margin: 0; padding: 0; counter-reset: plan; }
.wd-doc-plan-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--wd-hairline); }
.wd-doc-plan-rows li:last-child { border-bottom: 0; }
.wd-doc-plan-t b { display: block; font-weight: 500; font-size: 0.88rem; }
.wd-doc-plan-t small { color: var(--ep-text-secondary); font-size: 0.78rem; }
.wd-doc-plan-rows .a { font-weight: 600; font-size: 0.88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-doc-plan-rows .a small { font-weight: 400; color: var(--ep-text-muted); }
.wd-doc-plan-inv { grid-column: 1 / -1; font-size: 0.8rem; color: var(--ep-text-secondary); margin: 0; }
.wd-doc-plan-rows li.is-done .wd-doc-plan-t b::after { content: 'check'; font-family: 'Material Symbols Rounded'; font-size: 16px; margin-left: 6px; color: var(--wd-st-ok); vertical-align: -3px; }
.wd-doc-plan-edit { display: grid; gap: 8px; margin: 14px 0 0; }
.wd-doc-plan-line { display: grid; grid-template-columns: minmax(0, 1.4fr) 92px minmax(0, 1.1fr) 120px 32px; gap: 8px; align-items: center; }
.wd-doc-plan-line .form-control, .wd-doc-plan-line .form-select { height: 40px; }
.wd-doc-plan-when > [hidden] { display: none !important; }
.wd-doc-plan-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-doc-plan-foot .is-off { color: var(--wd-st-danger); font-weight: 600; }
@media (max-width: 575.98px) {
    .wd-doc-plan-line { grid-template-columns: minmax(0, 1fr) 92px 32px; padding-bottom: 8px; border-bottom: 1px solid var(--wd-hairline); }
    .wd-doc-plan-line > .form-select, .wd-doc-plan-line > .wd-doc-plan-when { grid-column: span 1; }
    .wd-doc-plan-line > .wd-doc-plan-when { grid-column: 2 / 4; }
}
/* Lien de paiement en ligne, à copier pour le client */
.wd-doc-paylink { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 8px 8px 12px; border: 1px solid var(--wd-hairline); border-radius: 10px; font-size: 0.84rem; }
.wd-doc-paylink > .ms { font-size: 18px; color: var(--ep-text-secondary); }
.wd-doc-paylink > span:not(.ms) { flex: 1; min-width: 0; }
.wd-doc-seg--wrap { flex-wrap: wrap; }
.wd-doc-modal .wd-doc-f > span small, .wd-doc-modal .wd-doc-f > label small { font-weight: 400; color: var(--ep-text-muted); }
.wd-doc-modal .wd-doc-f2 { align-items: end; margin-bottom: 14px; }
.wd-doc-modal .wd-doc-f .form-control { height: 42px; }
@media (max-width: 767.98px) {
    /* La mention « Finalisée » passe sous le titre de la carte */
    .wd-doc-card-h { flex-wrap: wrap; }
    .wd-doc-card-h > .wd-doc-hint--lock { flex-basis: 100%; margin-left: 0; }
}
/* Date d'émission d'un brouillon : posée à la finalisation, pas saisie */
.wd-doc-static { height: 40px; margin: 0; display: flex; align-items: center; font-size: 0.86rem; color: var(--ep-text-secondary); }

/* ============================================================
   GALERIES — registre en cartes photo, fiche à onglets (Photos,
   Partage, Invités, Activité, Réglages ; Design ouvre le studio),
   chapitre Galeries du dossier événement (23/10/2026).
   Carte-titre noire du dossier, cartes RELIEF, une action principale.
   Les tuiles photo, l'import et les ghosts restent ceux de studio.css
   (.wd-studio) ; on n'en reprend ici que la présentation.
   ============================================================ */

/* ── Carte-titre : la couverture en vignette carrée, comme l'avatar du dossier ── */
.wd-gal-cover { align-items: center; }
.wd-gal-thumb {
    width: 56px; height: 56px; flex: none; border-radius: 18px; overflow: hidden;
    background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.6);
    display: grid; place-items: center;
}
.wd-gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-gal-thumb .ms { font-size: 24px; }
.wd-gal-cover .wd-ev-meta .wd-st { height: 22px; }
.wd-gal-live { color: #fff; font-weight: 500; }
.wd-gal-live i, .wd-glc-live i {
    width: 8px; height: 8px; border-radius: 50%; background: #E5484D; flex: none;
    animation: wd-gal-pulse 1.8s var(--wd-ease) infinite;
}
@keyframes wd-gal-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.55); }
    50% { box-shadow: 0 0 0 5px rgba(229, 72, 77, 0); }
}
.wd-gal-cover .wd-ev-cover-right form { margin: 0; }
.wd-gal-cover .wd-ev-cover-right .wd-ev-btn .ms { font-size: 18px; color: inherit; }
.wd-gal-cover label.wd-cl-primary { margin: 0; cursor: pointer; }
.wd-cl-primary.is-copied { background: var(--wd-st-ok-bg); color: var(--wd-st-ok); }

/* ── Onglets : pastille d'état du lien sur « Partage » ── */
.wd-gal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wd-hairline-2); display: inline-block; margin-left: 2px; }
.wd-gal-dot.is-on { background: #3FA66B; }

/* ── Mise en page des onglets ── */
.wd-gal .wd-rp-head + :not(.wd-gal-lede) { margin-top: 22px; }
.wd-gal-lede { margin: 8px 0 22px; max-width: 72ch; font-size: 0.9rem; color: var(--ep-text-secondary); }
.wd-gal-lede a, .wd-gal-p a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-gal-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.wd-gal-main, .wd-gal-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.wd-gal-card {
    background: var(--wd-card-bg); border: 1px solid var(--wd-card-border);
    border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow);
    padding: 20px 24px; margin: 0; min-width: 0;
}
.wd-gal-main > .wd-gal-card + .wd-gal-card, .wd-gal--activite .wd-gal-card + .wd-gal-card { margin-top: 0; }
.wd-gal--activite .wd-gal-card { margin-bottom: 24px; }
.wd-gal-card-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.wd-gal-card-h h2 { font-family: var(--wd-font-sans); font-size: 0.98rem; font-weight: 600; margin: 0; letter-spacing: 0; color: var(--wd-onyx); }
.wd-gal-card-h .wd-st { margin-left: auto; }
.wd-gal-p { margin: 0 0 14px; font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-gal-note { margin: 10px 0 0; font-size: 0.8rem; color: var(--ep-text-muted); }

/* État fermé (lien, accès invités) : une carte, une phrase, un bouton */
.wd-gal-off { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 24px; }
.wd-gal-off-ico { width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--wd-papier); color: var(--ep-text-secondary); display: grid; place-items: center; }
.wd-gal-off-body { flex: 1 1 320px; min-width: 0; }
.wd-gal-off-body h2 { font-family: var(--wd-font-sans); font-size: 1rem; font-weight: 600; margin: 0 0 4px; letter-spacing: 0; }
.wd-gal-off-body p { margin: 0; font-size: 0.88rem; color: var(--ep-text-secondary); max-width: 64ch; }
.wd-gal-off form { margin: 0 0 0 auto; }

/* Boutons de la galerie : la famille de la fiche (36 px, rayon 10) */
.wd-gal .wd-ev-submit, .wd-gal .wd-ev-btn, .ep-new-gallery-modal .wd-ev-submit, .ep-new-gallery-modal .wd-ev-btn {
    height: 36px; padding: 0 14px; border-radius: var(--wd-r-ctl);
    font-size: 0.86rem; font-weight: 500; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    white-space: nowrap; text-decoration: none; cursor: pointer;
}
.wd-gal .wd-ev-btn, .ep-new-gallery-modal .wd-ev-btn { border: 1px solid var(--wd-hairline-2); background: #fff; color: var(--wd-onyx); }
.wd-gal .wd-gal-cover .wd-ev-btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.wd-gal .wd-gal-cover .wd-ev-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.wd-gal .wd-ev-submit .ms, .wd-gal .wd-ev-btn .ms { font-size: 18px; }
.wd-gal .wd-ev-submit:disabled { opacity: 0.45; cursor: not-allowed; }
.wd-gal-danger {
    height: 36px; padding: 0 14px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl);
    background: #fff; color: var(--wd-st-danger); font-size: 0.86rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    transition: background 150ms var(--wd-ease), border-color 150ms var(--wd-ease);
}
.wd-gal-danger .ms { font-size: 18px; }
.wd-gal-danger:hover { background: var(--wd-st-danger-bg); border-color: var(--wd-st-danger-bg); }
.wd-gal-close { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 4px; margin: 0; }
.wd-gal-close small { font-size: 0.78rem; color: var(--ep-text-muted); }

/* ── Formulaires ── */
.wd-gal-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.wd-gal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.wd-gal-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wd-gal-field > label, .wd-gal-label { margin: 0; font-size: 0.82rem; font-weight: 500; color: var(--wd-onyx); display: flex; align-items: baseline; gap: 6px; }
.wd-gal-field > label span, .wd-gal-field > label output { font-weight: 400; color: var(--ep-text-muted); font-size: 0.78rem; }
.wd-gal-field small { font-size: 0.78rem; color: var(--ep-text-muted); line-height: 1.4; display: flex; align-items: center; gap: 4px; }
.wd-gal-field small.is-ok { color: var(--wd-st-ok); }
.wd-gal-field small.is-ok .ms { font-size: 16px; }
.wd-gal-form .form-control, .wd-gal-form .form-select {
    min-height: 40px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl);
    font-size: 0.9rem; background-color: #fff; box-shadow: none;
}
.wd-gal-form .form-select { padding-right: 2.4rem; text-overflow: ellipsis; }
.wd-gal-form textarea.form-control { min-height: 64px; }
.wd-gal-form .form-control:focus, .wd-gal-form .form-select:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-gal-form .form-range { accent-color: var(--wd-onyx); height: 40px; }
.wd-gal-form .invalid-feedback, .wd-gal-form .form-error-message { font-size: 0.8rem; }
.wd-gal-code { text-transform: uppercase; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; font-weight: 500; }
.wd-gal-code::placeholder { letter-spacing: 0.04em; text-transform: none; }
.wd-gal-form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: 0; }
.wd-gal-check { margin: 0 auto 0 0; display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--wd-onyx); cursor: pointer; }
.wd-gal-check .form-check-input { margin: 0; }
.wd-gal .form-check-input:checked:not(.wd-ptile-check), .ep-new-gallery-modal .form-check-input:checked { background-color: var(--wd-onyx); border-color: var(--wd-onyx); }
.wd-gal .form-check-input:focus { box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.1); border-color: var(--wd-onyx); }
.wd-gal .form-switch .form-check-input { width: 2.4em; height: 1.35em; cursor: pointer; }
.wd-gal .form-switch .form-check-input:focus:not(:checked) { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%2827,24,22,0.25%29'/%3e%3c/svg%3e"); }

/* Réglage : libellé + explication à gauche, interrupteur à droite */
.wd-gal-rows { display: flex; flex-direction: column; }
.wd-gal-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0; padding: 12px 0; cursor: pointer; }
.wd-gal-rows .wd-gal-row + .wd-gal-row { border-top: 1px solid var(--wd-hairline); }
form.wd-gal-row { cursor: default; padding-top: 0; }
.wd-gal-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wd-gal-row-text strong { font-size: 0.9rem; font-weight: 600; color: var(--wd-onyx); }
.wd-gal-row-text small { font-size: 0.8rem; color: var(--ep-text-secondary); line-height: 1.4; }
.wd-gal-sub { border-top: 1px solid var(--wd-hairline); margin: 10px 0 12px; padding-top: 16px; }
.wd-gal-sub h3 { font-family: var(--wd-font-sans); font-size: 0.92rem; font-weight: 600; margin: 0 0 4px; letter-spacing: 0; }
.wd-gal-sub p { margin: 0; font-size: 0.84rem; color: var(--ep-text-secondary); max-width: 70ch; }

/* Choix unique : segment (poses) et cartes (pellicule) */
.wd-gal-seg { display: inline-flex; background: var(--wd-papier); border-radius: 10px; padding: 3px; gap: 2px; align-self: flex-start; }
.wd-gal-seg label { height: 34px; min-width: 52px; padding: 0 14px; border-radius: 8px; font-size: 0.86rem; font-weight: 500; color: var(--ep-text-secondary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-variant-numeric: tabular-nums; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-gal-seg label:has(input:checked) { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.wd-gal-seg label:has(input:focus-visible) { outline: 2px solid var(--wd-onyx); outline-offset: 1px; }
.wd-gal-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wd-gal-choice { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--wd-hairline-2); border-radius: 12px; cursor: pointer; margin: 0; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-gal-choice:hover { border-color: var(--wd-onyx); }
.wd-gal-choice:has(input:checked) { border-color: var(--wd-onyx); box-shadow: inset 0 0 0 1px var(--wd-onyx); }
.wd-gal-choice:has(input:focus-visible) { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-gal-choice strong { font-size: 0.86rem; font-weight: 600; }
.wd-gal-choice small { font-size: 0.76rem; color: var(--ep-text-secondary); line-height: 1.35; }
.wd-gal-film { width: 100%; aspect-ratio: 1; max-height: 54px; max-width: 54px; border-radius: 8px; margin-bottom: 8px; }
.wd-gal-film--vintage { background: radial-gradient(circle at 50% 45%, #E9C79A, #A3734B 70%, #5A3A26); }
.wd-gal-film--bw { background: radial-gradient(circle at 50% 45%, #E6E6E6, #7A7A7A 70%, #2B2B2B); }
.wd-gal-film--color { background: linear-gradient(135deg, #7FB7D8, #F2C46D 55%, #E58B6B); }

/* Avertissement (données biométriques) */
.wd-gal-warn { display: flex; gap: 10px; padding: 12px 14px; margin: 0 0 14px; border-radius: 12px; background: var(--wd-st-warn-bg); color: #6B4F22; }
.wd-gal-warn .ms { font-size: 20px; color: var(--wd-st-warn); flex: none; }
.wd-gal-warn p { margin: 0; font-size: 0.82rem; line-height: 1.45; }
.wd-gal-warn b { font-weight: 600; }

/* Lien et QR */
.wd-gal-link { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 5px 0 12px; border: 1px solid var(--wd-hairline-2); border-radius: 12px; background: #FDFCFA; }
.wd-gal-link > .ms { color: var(--ep-text-muted); font-size: 20px; }
.wd-gal-link input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 0.88rem; color: var(--wd-onyx); outline: none; text-overflow: ellipsis; }
.wd-gal .wd-gal-link .wd-ev-btn { height: 34px; }
.wd-gal .wd-gal-link .wd-ev-btn.is-copied { background: var(--wd-st-ok-bg); border-color: var(--wd-st-ok-bg); color: var(--wd-st-ok); }
.wd-gal-facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-gal-facts li { display: inline-flex; align-items: center; gap: 6px; }
.wd-gal-facts .ms { font-size: 18px; color: var(--ep-text-muted); }
.wd-gal-qr { text-align: center; }
.wd-gal-qr .wd-gal-card-h { justify-content: center; }
.wd-gal-qr img { width: 180px; height: 180px; image-rendering: pixelated; border-radius: 12px; border: 1px solid var(--wd-hairline); padding: 6px; background: #fff; }
.wd-gal-qr-acts { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.wd-gal .wd-gal-qr-acts .wd-ev-btn.is-copied { background: var(--wd-st-ok-bg); border-color: var(--wd-st-ok-bg); color: var(--wd-st-ok); }

/* Repères (Invités, Activité) */
.wd-gal-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); background: #fff; margin: 0 0 24px; overflow: hidden; }
.wd-gal-stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wd-gal-stat { display: flex; flex-direction: column; gap: 3px; padding: 16px 20px; min-width: 0; }
.wd-gal-stat + .wd-gal-stat { border-left: 1px solid var(--wd-hairline); }
.wd-gal-stat .l { font-size: 0.8rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-gal-stat .v { font-family: var(--wd-font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--wd-onyx); }
.wd-gal-stat .v small { font-family: var(--wd-font-sans); font-size: 0.9rem; font-weight: 500; color: var(--ep-text-muted); letter-spacing: 0; margin-left: 5px; }
.wd-gal-stat .v--off { font-size: 1.1rem; color: var(--ep-text-muted); padding: 5px 0 3px; }
.wd-gal-stat .w { font-size: 0.8rem; color: var(--ep-text-muted); }

/* Photos qui comptent (Activité) */
.wd-gal-top { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; counter-reset: wd-top; }
.wd-gal-top li { position: relative; display: flex; flex-direction: column; gap: 6px; counter-increment: wd-top; }
.wd-gal-top a { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--wd-papier); }
.wd-gal-top img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms var(--wd-ease); }
.wd-gal-top a:hover img { transform: scale(1.04); }
.wd-gal-top li::before { content: counter(wd-top); position: absolute; top: 6px; left: 6px; z-index: 1; width: 22px; height: 22px; border-radius: 7px; background: rgba(27, 24, 22, 0.72); color: #fff; font-size: 0.72rem; font-weight: 600; display: grid; place-items: center; }
.wd-gal-top li > span { display: inline-flex; align-items: center; gap: 4px; font-size: 0.84rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-gal-top li > span .ms { font-size: 16px; color: var(--wd-jaune); }
.wd-gal-kv { padding: 0 4px; }

/* ── Onglet Photos ── */
.wd-gal-import { margin: 0; }
.wd-gal .wd-dropzone { border: 1.5px dashed var(--wd-hairline-2); border-radius: var(--wd-r-card); background: #FDFCFA; padding: 14px 16px; min-height: 68px; }
.wd-gal .wd-dropzone:hover { background: #fff; border-color: var(--wd-onyx); box-shadow: none; }
.wd-gal .wd-dropzone.ep-upload-zone-active { background: var(--wd-jaune-pale); border-color: var(--wd-jaune); border-style: solid; box-shadow: none; }
.wd-gal .wd-dropzone-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--wd-papier); color: var(--wd-onyx); }
.wd-gal .wd-dropzone-ico .ms { font-size: 22px; }
.wd-gal .wd-dropzone-text strong { font-size: 0.92rem; font-weight: 600; }
.wd-gal .wd-dropzone-text small { font-size: 0.78rem; }
.wd-gal .wd-dropzone-cta { height: 36px; padding: 0 14px; border-radius: var(--wd-r-ctl); background: var(--wd-onyx); color: #fff; font-size: 0.86rem; font-weight: 500; display: inline-flex; align-items: center; }
.wd-gal .wd-dropzone-hero { padding: 56px 24px; min-height: 280px; justify-content: center; }
.wd-gal .wd-dropzone-hero .wd-dropzone-ico { width: 64px; height: 64px; border-radius: 20px; }
.wd-gal .wd-dropzone-hero .wd-dropzone-ico .ms { font-size: 30px; }
.wd-gal .wd-dropzone-hero .wd-dropzone-text strong { font-size: 1.15rem; font-family: var(--wd-font-display); letter-spacing: -0.01em; }
.wd-gal .wd-dropzone-hero .wd-dropzone-cta { margin-top: 8px; height: 40px; padding: 0 18px; }
.wd-gal .wd-quota { margin: 10px 4px 0; font-size: 0.78rem; }
.wd-gal .wd-quota-track { height: 3px; background: var(--wd-papier); }
.wd-gal .wd-quota-fill { background: var(--wd-onyx); }
.wd-gal .wd-quota-fill.is-warn { background: var(--wd-jaune); }
.wd-gal .wd-quota-fill.is-over { background: var(--wd-st-danger); }
.wd-quota-block { margin-top: 6px; color: var(--wd-st-danger); }
.wd-gal .wd-studio-empty { padding: 26px 16px 10px; }
.wd-gal .wd-studio-empty p { font-size: 0.9rem; }
.wd-gal .wd-studio-empty small { font-size: 0.82rem; }

.wd-gal-bar { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin: 22px 0 14px; }
.wd-gal-all { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 0.86rem; font-weight: 500; color: var(--wd-onyx); cursor: pointer; user-select: none; }
.wd-gal-all .form-check-input { margin: 0; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--wd-hairline-2); }
.wd-gal-sum { margin: 0; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-gal-sum b { color: var(--wd-onyx); font-weight: 600; }
.wd-gal-bar > .wd-gal-pop { margin-left: auto; }

/* Petit panneau qui se déplie (nouvelle section, renommer) */
.wd-gal-pop { position: relative; }
.wd-gal-pop > summary { list-style: none; }
.wd-gal-pop > summary::-webkit-details-marker { display: none; }
.wd-gal-pop[open] > summary.wd-ev-btn { background: var(--wd-onyx); color: #fff; border-color: var(--wd-onyx); }
.wd-gal-pop-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; gap: 8px; width: 340px; padding: 10px; background: #fff; border: 1px solid var(--wd-hairline); border-radius: 14px; box-shadow: var(--wd-shadow-lift); }
.wd-gal-pop-form input[type="text"] { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font-size: 0.88rem; outline: none; }
.wd-gal-pop-form input[type="text"]:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }

/* Grille : 5 colonnes sur grand écran, carrés, sans Bootstrap */
.wd-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px; margin-bottom: 10px; }
/* Les ghosts d'import portent encore des classes col-* : neutralisées ici
   (une col-* dans une grille CSS prend 25 % DE SA CELLULE) */
.wd-gal-grid > [class*="col-"], .wd-gal-grid > .wd-gal-cell { width: auto; max-width: none; flex: none; padding: 0; margin: 0; }
.wd-gal-grid:empty { display: none; }
.wd-gal .wd-ptile, .wd-gal .ep-ghost-card { border-radius: 12px; }
.wd-gal .wd-ptile-act { border-radius: 9px; width: 32px; height: 32px; }
.wd-gal .wd-ptile-act .ms { font-size: 18px; }
.wd-gal .wd-ptile-chip { border-radius: 7px; height: 22px; font-size: 0.68rem; gap: 3px; }
.wd-gal .wd-ptile-chip .ms { font-size: 14px; }
.wd-gal .ep-video-play-overlay .ms { font-size: 30px; }
.wd-ptile-cover { position: absolute; left: 8px; top: 8px; z-index: 2; height: 24px; padding: 0 8px 0 6px; border-radius: 8px; background: var(--wd-jaune-pale); color: #6B4F22; font-size: 0.72rem; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; pointer-events: none; transition: opacity 200ms var(--wd-ease); }
.wd-ptile-cover .ms { font-size: 15px; color: var(--wd-jaune); }
.wd-ptile:hover .wd-ptile-cover, .ep-bulk-selected .wd-ptile-cover { opacity: 0; }
.wd-gal .ep-bulk-selected .wd-ptile { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }

.wd-gal-sect { display: flex; align-items: center; gap: 8px; margin: 30px 0 12px; padding-top: 18px; border-top: 1px solid var(--wd-hairline); }
.wd-gal-sect h2 { font-family: var(--wd-font-sans); font-size: 1rem; font-weight: 600; margin: 0; letter-spacing: 0; }
.wd-gal-sect .wd-reg-count { font-size: 0.9rem; }
.wd-gal-sect-acts { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.wd-gal-sect-acts form { margin: 0; }
.wd-gal-icon { width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--ep-text-muted); display: inline-grid; place-items: center; cursor: pointer; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-gal-icon .ms { font-size: 19px; }
.wd-gal-icon:hover, .wd-gal-pop[open] > .wd-gal-icon { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-gal-icon--danger:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-gal-sect-empty { grid-column: 1 / -1; margin: 0; padding: 18px; border: 1px dashed var(--wd-hairline-2); border-radius: 12px; text-align: center; font-size: 0.86rem; color: var(--ep-text-muted); }

/* Sélection groupée : îlot noir, boutons rectangulaires (pas de pilules) */
.wd-gal .ep-bulk-bar.wd-gal-bulk { border-radius: 16px; padding: 8px 8px 8px 18px; background: rgba(27, 24, 22, 0.96); }
.wd-gal .wd-gal-bulk > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.wd-gal .wd-gal-bulk strong { margin-right: 8px; font-size: 0.84rem; }
.wd-gal .wd-gal-bulk .btn { border-radius: 10px !important; height: 36px; padding: 0 12px; font-size: 0.82rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.1); }
.wd-gal .wd-gal-bulk .btn .ms { font-size: 18px; }
.wd-gal .wd-gal-bulk .btn-danger { color: #F2A99E; background: transparent; }
.wd-gal-bulk-move { display: inline-flex; gap: 4px; align-items: center; }
.wd-gal .wd-gal-bulk-move .form-select { height: 36px; width: auto; max-width: 180px; border-radius: 10px; border: 0; background-color: rgba(255, 255, 255, 0.92); font-size: 0.82rem; }

/* ── Registre et chapitre : cartes photo ── */
.wd-gal-filters { margin: 0; }
.wd-reg-head .wd-gal-filters .seg a { height: 30px; }
.wd-glc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.wd-glc {
    position: relative; display: flex; flex-direction: column; min-width: 0;
    background: var(--wd-card-bg); border: 1px solid var(--wd-card-border);
    border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); overflow: hidden;
    transition: transform 250ms var(--wd-ease), box-shadow 250ms var(--wd-ease);
}
.wd-glc:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(27, 24, 22, 0.05), 0 20px 36px -18px rgba(27, 24, 22, 0.3); }
.wd-glc-media { position: relative; aspect-ratio: 3 / 2; background: var(--wd-papier); overflow: hidden; }
.wd-glc-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms var(--wd-ease); }
.wd-glc:hover .wd-glc-media img { transform: scale(1.03); }
.wd-glc-blank { position: absolute; inset: 10px; border: 1.5px dashed var(--wd-hairline-2); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 0.82rem; color: var(--ep-text-muted); }
.wd-glc-blank .ms { font-size: 28px; }
.wd-glc-live { position: absolute; left: 10px; top: 10px; height: 24px; padding: 0 9px; border-radius: 8px; background: rgba(27, 24, 22, 0.78); color: #fff; font-size: 0.74rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.wd-glc-body { padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wd-glc-body h3 { margin: 0; padding-right: 30px; font-family: var(--wd-font-sans); font-size: 0.98rem; font-weight: 600; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-glc-link { color: var(--wd-onyx); text-decoration: none; }
.wd-glc-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.wd-glc-link:focus-visible { outline: none; }
.wd-glc:has(.wd-glc-link:focus-visible) { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-glc-sub { margin: 0; font-size: 0.84rem; color: var(--ep-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-glc-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 0.8rem; color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; }
.wd-glc-share { display: inline-flex; align-items: center; gap: 3px; }
.wd-glc-share .ms { font-size: 16px; color: var(--ep-text-muted); }
.wd-glc-foot .wd-st { margin-left: auto; }
/* Le menu ⋯ s'aligne sur le titre, sous la photo 3:2 (2/3 de la largeur de la carte) */
.wd-glc { container-type: inline-size; }
.wd-glc-menu { position: absolute; right: 8px; top: calc(66.667cqw + 10px); z-index: 2; }
.wd-glc-menu > button { width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--ep-text-muted); display: grid; place-items: center; }
.wd-glc-menu > button:hover, .wd-glc-menu > button[aria-expanded="true"] { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-glc.is-archived .wd-glc-media img { filter: grayscale(0.85); opacity: 0.8; }
.wd-gal-first { padding: 48px 24px; }
.wd-gal-first p { max-width: 52ch; margin: 0 auto 16px; }
.wd-gal-first .wd-ev-submit { display: inline-flex; height: 38px; padding: 0 16px; align-items: center; color: #fff; text-decoration: none; }

/* Chapitre Galeries du dossier : le bouton d'ajout de l'en-tête */
.wd-rp-head .acts .wd-ev-submit { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: #fff; }
.wd-glc-grid--chapter { margin-top: 16px; }

/* ── Page de repli du formulaire et modale ── */
.wd-gal-page { max-width: 720px; }
.wd-gal-page h1 { font-size: 1.75rem; margin: 0 0 20px; }
.ep-new-gallery-modal .modal-content { border: 0; border-radius: 18px; box-shadow: var(--wd-shadow-lift); }
.ep-new-gallery-modal .modal-header { border: 0; padding: 20px 24px 4px; }
.ep-new-gallery-modal .modal-title { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }
.ep-new-gallery-modal .modal-title i { display: none; }
.ep-new-gallery-modal .modal-body { padding: 12px 24px 8px; display: flex; flex-direction: column; gap: 14px; }
.ep-new-gallery-modal .modal-footer { border: 0; padding: 8px 24px 20px; gap: 8px; }
.ep-new-gallery-modal .modal-footer > * { margin: 0; }
.ep-new-gallery-modal .wd-ev-submit { border: 0; background: var(--wd-onyx); color: #fff; }
.ep-new-gallery-modal .wd-ev-btn:hover { background: var(--wd-papier); }
.ep-new-gallery-modal .modal-dialog { max-width: 560px; }
.ep-new-gallery-modal .wd-gal-fields { grid-template-columns: 1fr; }

@media (max-width: 1199.98px) {
    .wd-gal-cols { grid-template-columns: 1fr; }
    .wd-gal-top { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .wd-gal-stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wd-gal-stats--4 .wd-gal-stat:nth-child(3) { border-left: 0; }
    .wd-gal-stats--4 .wd-gal-stat:nth-child(n+3) { border-top: 1px solid var(--wd-hairline); }
}
@media (max-width: 767.98px) {
    .wd-gal-thumb { width: 48px; height: 48px; border-radius: 16px; }
    .wd-gal-cover .wd-ev-cover-right { flex-wrap: wrap; }
    .wd-gal-cover .wd-cl-primary { flex: 1 1 auto; justify-content: center; }
    .wd-gal-card { padding: 16px 18px; }
    .wd-gal-fields, .wd-gal-choices { grid-template-columns: 1fr; }
    .wd-gal-choice { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
    .wd-gal-film { margin: 0; width: 36px; flex: none; }
    .wd-gal-choice small { flex-basis: 100%; padding-left: 48px; margin-top: -6px; }
    .wd-gal-stats { grid-template-columns: 1fr; }
    .wd-gal-stat + .wd-gal-stat { border-left: 0; border-top: 1px solid var(--wd-hairline); }
    .wd-gal-stats--4 .wd-gal-stat:nth-child(3) { border-left: 0; }
    .wd-gal-stats--4 .wd-gal-stat:nth-child(even) { border-left: 1px solid var(--wd-hairline); border-top: 0; }
    .wd-gal-stats--4 .wd-gal-stat:nth-child(n+3) { border-top: 1px solid var(--wd-hairline); }
    .wd-gal-stats--4 .wd-gal-stat .v { font-size: 1.35rem; }
    .wd-gal-top { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .wd-gal-off form { margin: 0; width: 100%; }
    .wd-gal-off form .wd-ev-submit { width: 100%; }
    .wd-gal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .wd-gal .wd-ptile, .wd-gal .ep-ghost-card { border-radius: 8px; }
    .wd-gal .wd-dropzone:not(.wd-dropzone-hero) .wd-dropzone-ico { display: none; }
    .wd-gal .wd-dropzone-hero { min-height: 220px; padding: 36px 18px; }
    .wd-gal-bar > .wd-gal-pop { margin-left: 0; }
    .wd-gal-pop-form { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; }
    .wd-gal-sum { flex-basis: 100%; order: 3; }
    .wd-glc-grid { grid-template-columns: 1fr; gap: 16px; }
    .wd-reg-head .wd-gal-filters { order: 3; width: 100%; }
    .wd-reg-head .wd-gal-filters .seg { overflow-x: auto; max-width: 100%; }
    .wd-gal-link { height: auto; flex-wrap: wrap; padding: 8px 8px 8px 12px; }
    .wd-gal-link input { flex-basis: calc(100% - 32px); }
}
@media (max-width: 420px) {
    .wd-gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Tactile : pas de glisser-déposer, la case de sélection reste visible en
   haut à gauche → l'étoile de couverture se pousse à côté, sans libellé */
.wd-dz-touch { display: none; }
.wd-ptile-cover em { font-style: normal; }
@media (hover: none) {
    .wd-dz-desk { display: none; }
    .wd-dz-touch { display: inline; }
    .wd-ptile-cover { left: 34px; padding: 0 5px; }
    .wd-ptile-cover em { display: none; }
}
@media (max-width: 575.98px) {
    .wd-reg-head .board-toolbar:has(.wd-gal-filters) { width: 100%; margin-left: 0; flex-wrap: wrap; }
    .wd-reg-head .wd-gal-filters { order: 0; width: auto; flex: 1 1 auto; min-width: 0; }
    /* La recherche passe sous les statuts, sur toute la largeur : à côté, elle les écrase */
    .wd-reg-head .board-toolbar-search.wd-gal-search { order: 11; flex: 1 1 100%; } /* après le ＋ (order: 10) */
    .wd-reg-head .wd-gal-search input, .wd-reg-head .wd-gal-search input:focus { width: 100%; }
    .wd-reg-head .board-toolbar:has(.wd-gal-filters) .board-toolbar-add { width: 36px; padding: 0; justify-content: center; flex: none; }
    .wd-reg-head .board-toolbar:has(.wd-gal-filters) .wd-gal-add-l { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-gal-live i, .wd-glc-live i { animation: none; }
    .wd-glc, .wd-glc-media img { transition: none; }
}

/* ============================================================
   STUDIO DE DESIGN DES GALERIES — plein écran (refonte Rail après revue
   UX, 23/10/2026). Barre du haut blanche, réglages en cinq onglets à
   gauche (360 px), aperçu en carte à droite ; sur mobile, aperçu plein
   écran et réglages dans une feuille au-dessus de la barre d'onglets.
   Les polices serif n'apparaissent que dans les échantillons de police.
   ============================================================ */
body:has(.wd-ds) { overflow: hidden; background: #fff; padding: 0 !important; } /* app.css réserve la topbar mobile de l'app (padding-top 56 px) */
.wd-ds { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #fff; font-family: var(--wd-font-sans); color: var(--wd-onyx); }

/* Barre du haut */
.wd-ds-top { position: relative; flex: none; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 12px; border-bottom: 1px solid var(--wd-hairline); background: #fff; }
.wd-ds-back { width: 36px; height: 36px; border-radius: var(--wd-r-ctl); display: grid; place-items: center; color: var(--wd-onyx); text-decoration: none; transition: background 150ms var(--wd-ease); }
.wd-ds-back:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-ds-back .ms { font-size: 22px; transition: transform 200ms var(--wd-ease); }
.wd-ds-back:hover .ms { transform: translateX(-2px); }
.wd-ds-title { min-width: 0; line-height: 1.15; }
.wd-ds-title h1 { font-size: 1rem; margin: 0; letter-spacing: -0.01em; }
.wd-ds-title small { display: block; max-width: 220px; font-size: 0.78rem; color: var(--ep-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-ds-device { position: absolute; left: calc(360px + (100% - 360px) / 2); top: 50%; transform: translate(-50%, -50%); display: inline-flex; background: var(--wd-papier); border-radius: 10px; padding: 3px; gap: 2px; }
.wd-ds-device button { width: 40px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--ep-text-secondary); display: grid; place-items: center; cursor: pointer; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-ds-device button .ms { font-size: 19px; }
.wd-ds-device button.on { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.wd-ds-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wd-ds-state { font-size: 0.82rem; color: var(--ep-text-secondary); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.wd-ds-state:empty { display: none; }
.wd-ds-state.is-dirty::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--wd-jaune); animation: wd-ds-breathe 2.4s var(--wd-ease) infinite; }
.wd-ds-state.is-saved { color: var(--wd-st-ok); }
.wd-ds-state.is-saved::before { content: 'check'; font-family: 'Material Symbols Rounded'; font-size: 17px; line-height: 1; }
.wd-ds-state.is-error { color: var(--wd-st-danger); }
@keyframes wd-ds-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.wd-ds-btn, .wd-ds-save {
    height: 36px; padding: 0 14px; border-radius: var(--wd-r-ctl); font-family: var(--wd-font-sans);
    font-size: 0.86rem; font-weight: 500; line-height: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    white-space: nowrap; cursor: pointer; text-decoration: none; margin: 0;
    transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease), border-color 150ms var(--wd-ease), opacity 150ms var(--wd-ease), transform 200ms var(--wd-ease);
}
.wd-ds-btn { border: 1px solid var(--wd-hairline-2); background: #fff; color: var(--wd-onyx); }
.wd-ds-btn:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-ds-btn--icon { width: 36px; padding: 0; }
.wd-ds-btn--icon .ms { font-size: 20px; }
.wd-ds-btn--danger { color: var(--wd-st-danger); }
.wd-ds-btn--danger:hover, .wd-ds-btn--danger.is-confirm { background: var(--wd-st-danger-bg); border-color: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-ds-save { border: 1px solid var(--wd-onyx); background: var(--wd-onyx); color: #fff; }
.wd-ds-save:hover:not(:disabled) { background: #000; transform: translateY(-1px); }
.wd-ds-save:disabled { opacity: 0.35; cursor: default; }
.wd-ds-save .ms { font-size: 18px; animation: wd-ds-spin 900ms linear infinite; }
@keyframes wd-ds-spin { to { transform: rotate(360deg); } }

/* Corps : réglages | aperçu */
.wd-ds-body { flex: 1; min-height: 0; display: flex; }
.wd-ds-side { width: 360px; flex: none; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--wd-hairline); background: #fff; }
.wd-ds-tabs { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--wd-hairline); padding: 0 6px; }
.wd-ds-tab { height: 62px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 0.74rem; font-weight: 500; color: var(--ep-text-secondary); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; transition: color 150ms var(--wd-ease), border-color 150ms var(--wd-ease); }
.wd-ds-tab .ms { font-size: 21px; transition: transform 250ms var(--wd-ease); }
.wd-ds-tab:hover { color: var(--wd-onyx); }
.wd-ds-tab:hover .ms { transform: translateY(-1px); }
.wd-ds-tab.on { color: var(--wd-onyx); font-weight: 600; border-bottom-color: var(--wd-onyx); }
.wd-ds-tab.on .ms { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.wd-ds-panel { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 22px 48px; margin: 0; }
.wd-ds-grip { display: none; }
.wd-ds-pane { display: flex; flex-direction: column; gap: 22px; }
.wd-ds-pane[hidden] { display: none; }
.wd-ds-sep { padding-top: 22px; border-top: 1px solid var(--wd-hairline); }
.wd-ds-field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.wd-ds-field[hidden], .wd-ds-switch[hidden] { display: none; }
.wd-ds-label { margin: 0; font-size: 0.84rem; font-weight: 600; color: var(--wd-onyx); display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wd-ds-label output { font-weight: 500; font-size: 0.8rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-ds-hint { font-size: 0.78rem; color: var(--ep-text-muted); line-height: 1.4; }
.wd-ds-empty { margin: 0; padding: 14px; border: 1px dashed var(--wd-hairline-2); border-radius: 12px; font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-ds-empty a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-ds-input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; font: inherit; font-size: 0.9rem; color: var(--wd-onyx); outline: none; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-ds-input:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-ds-input::placeholder { color: var(--ep-text-muted); }
.wd-ds-textarea { height: auto; min-height: 104px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.wd-ds-range { width: 100%; accent-color: var(--wd-onyx); margin: 0; }
.wd-ds-row { display: grid; grid-template-columns: auto 1fr; gap: 18px; }
.wd-ds-row:has(> [hidden]) { grid-template-columns: 1fr; }

/* Mise en page de la couverture : vignettes avec la vraie photo */
.wd-ds-layouts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wd-ds-layout { display: flex; flex-direction: column; gap: 6px; margin: 0; cursor: pointer; }
.wd-ds-layout b { font-size: 0.8rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-ds-layout:has(input:checked) b { color: var(--wd-onyx); font-weight: 600; }
.wd-ds-mini { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--wd-hairline); transition: box-shadow 150ms var(--wd-ease), transform 200ms var(--wd-ease); }
.wd-ds-layout:hover .wd-ds-mini { transform: translateY(-1px); }
.wd-ds-layout:has(input:checked) .wd-ds-mini { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wd-onyx); }
.wd-ds-layout:has(input:focus-visible) .wd-ds-mini { outline: 2px solid var(--wd-jaune); outline-offset: 4px; }
.wd-ds-mini i { position: absolute; height: 4px; width: 42%; border-radius: 2px; background: #fff; box-shadow: 0 7px 0 -1px rgba(255, 255, 255, 0.6); }
.wd-ds-mini--full, .wd-ds-mini--frame { background: linear-gradient(rgba(14, 14, 18, 0.12), rgba(14, 14, 18, 0.5)), var(--ph, linear-gradient(135deg, #D9D2C7, #A69C8E)) center / cover; }
.wd-ds-mini--full i { left: 29%; bottom: 22%; }
.wd-ds-mini--frame::before { content: ''; position: absolute; inset: 7px; border: 1.5px solid rgba(255, 255, 255, 0.85); }
.wd-ds-mini--frame i { left: 29%; top: 44%; }
.wd-ds-mini--split::before { content: ''; position: absolute; inset: 0 50% 0 0; background: var(--ph, linear-gradient(135deg, #D9D2C7, #A69C8E)) center / cover; }
.wd-ds-mini--split i, .wd-ds-mini--minimal i { background: var(--wd-onyx); box-shadow: 0 7px 0 -1px rgba(27, 24, 22, 0.35); }
.wd-ds-mini--split i { left: 58%; width: 32%; top: 42%; }
.wd-ds-mini--minimal i { left: 29%; top: 42%; }

/* Cadrage : le point se pose sur la photo */
.wd-ds-focal { display: flex; justify-content: center; padding: 8px; border-radius: 12px; background: var(--wd-papier); cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; }
.wd-ds-focal-in { position: relative; display: block; line-height: 0; }
.wd-ds-focal-in img { display: block; max-width: 100%; max-height: 240px; border-radius: 6px; pointer-events: none; }
.wd-ds-focal-dot { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; background: var(--wd-jaune); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 3px 10px rgba(0, 0, 0, 0.35); transform: translate(-50%, -50%); pointer-events: none; transition: transform 150ms var(--wd-ease); }
.wd-ds-focal.is-dragging .wd-ds-focal-dot { transform: translate(-50%, -50%) scale(1.18); }

/* Titre : interrupteurs, polices, position */
.wd-ds-switches { display: flex; flex-direction: column; gap: 0; }
.wd-ds-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 0; font-size: 0.9rem; cursor: pointer; }
.wd-ds .form-switch .form-check-input { width: 2.4em; height: 1.35em; cursor: pointer; }
.wd-ds .form-check-input:checked { background-color: var(--wd-onyx); border-color: var(--wd-onyx); }
.wd-ds .form-check-input:focus { box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.1); border-color: var(--wd-onyx); }
.wd-ds-fonts { display: flex; flex-direction: column; gap: 8px; }
.wd-ds-font { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 14px; border: 1px solid var(--wd-hairline-2); border-radius: 12px; cursor: pointer; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-ds-font:hover { border-color: var(--wd-onyx); }
.wd-ds-font:has(input:checked) { border-color: var(--wd-onyx); box-shadow: inset 0 0 0 1px var(--wd-onyx); }
.wd-ds-font:has(input:focus-visible) { outline: 2px solid var(--wd-jaune); outline-offset: 2px; }
.wd-ds-font-s { min-width: 0; font-size: 1.35rem; line-height: 1.25; color: var(--wd-onyx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-ds-font small { flex: none; font-size: 0.76rem; color: var(--ep-text-muted); }
.wd-ds .wd-gal-seg { display: inline-flex; background: var(--wd-papier); border-radius: 10px; padding: 3px; gap: 2px; }
.wd-ds .wd-gal-seg label { height: 34px; padding: 0 12px; border-radius: 8px; font-size: 0.84rem; font-weight: 500; color: var(--ep-text-secondary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin: 0; white-space: nowrap; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-ds .wd-gal-seg label:has(input:checked) { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.wd-ds .wd-gal-seg label:has(input:focus-visible) { outline: 2px solid var(--wd-onyx); outline-offset: 1px; }
.wd-ds-seg { display: flex !important; }
.wd-ds-seg label { flex: 1 1 0; min-width: 0; }
.wd-ds-seg--icons label { width: 42px; padding: 0; }
.wd-ds-seg--icons .ms { font-size: 20px; }

/* Couleurs */
.wd-ds-moods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wd-ds-mood { display: flex; flex-direction: column; align-items: center; gap: 7px; margin: 0; padding: 12px 8px 10px; border: 1px solid var(--wd-hairline-2); border-radius: 12px; cursor: pointer; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-ds-mood:hover { border-color: var(--wd-onyx); }
.wd-ds-mood:has(input:checked) { border-color: var(--wd-onyx); box-shadow: inset 0 0 0 1px var(--wd-onyx); }
.wd-ds-mood:has(input:focus-visible) { outline: 2px solid var(--wd-jaune); outline-offset: 2px; }
.wd-ds-mood b { font-size: 0.8rem; font-weight: 500; }
.wd-ds-aa { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-family: var(--wd-font-display); font-weight: 600; font-size: 1rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.wd-ds-swatches { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-ds-sw { position: relative; width: 30px; height: 30px; border: 0; border-radius: 50%; padding: 0; margin: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); transition: box-shadow 150ms var(--wd-ease), transform 200ms var(--wd-ease); }
.wd-ds-sw:hover { transform: scale(1.08); }
.wd-ds-sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wd-onyx); }
.wd-ds-sw--pick { overflow: hidden; display: grid; place-items: center; }
.wd-ds-sw--pick input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.wd-ds-sw--custom { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-ds-sw--custom .ms { font-size: 18px; pointer-events: none; }
.wd-ds-sw--custom.on .ms { color: #fff; mix-blend-mode: difference; }
.wd-ds-color { display: flex; align-items: center; gap: 10px; }
.wd-ds-hex { width: 112px; height: 34px; font-variant-numeric: tabular-nums; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.84rem; }

/* Marque */
.wd-ds-drop { display: flex; align-items: center; gap: 12px; margin: 0; padding: 16px; border: 1.5px dashed var(--wd-hairline-2); border-radius: 12px; cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: border-color 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-ds-drop[hidden], .wd-ds-logo[hidden] { display: none; }
.wd-ds-drop:hover { border-color: var(--wd-onyx); background: #FDFCFA; }
.wd-ds-drop > .ms { width: 40px; height: 40px; border-radius: 12px; background: var(--wd-papier); display: grid; place-items: center; font-size: 22px; }
.wd-ds-drop small { display: block; font-size: 0.78rem; font-weight: 400; color: var(--ep-text-muted); }
.wd-ds-logo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wd-ds-logo img { height: 44px; max-width: 140px; object-fit: contain; padding: 4px; border: 1px solid var(--wd-hairline); border-radius: 8px; background: repeating-conic-gradient(#EFEBE4 0% 25%, #fff 0% 50%) 0 0 / 12px 12px; margin-right: auto; }
.wd-ds-logo label.wd-ds-btn { position: relative; }

/* Aperçu */
.wd-ds-canvas { flex: 1; min-width: 0; min-height: 0; padding: 24px; display: flex; justify-content: center; align-items: flex-start; overflow: hidden; background: #fff; }
.wd-ds-frame { position: relative; flex: none; overflow: hidden; border-radius: 12px; background: #fff; border: 1px solid var(--wd-card-border); box-shadow: var(--wd-card-shadow); }
.wd-ds-frame.is-mobile { border-radius: 28px; box-shadow: 0 0 0 6px var(--wd-onyx), 0 24px 50px -20px rgba(0, 0, 0, 0.45); border: 0; }
.wd-ds-frame iframe { display: block; border: 0; transform-origin: 0 0; background: #fff; }

/* Sortie avec des modifications */
.wd-ds-btn:focus-visible, .wd-ds-save:focus-visible, .wd-ds-back:focus-visible, .wd-ds-tab:focus-visible { outline: 2px solid var(--wd-jaune); outline-offset: 2px; }
.wd-ds-leave { width: min(540px, calc(100vw - 32px)); border: 0; border-radius: 18px; padding: 24px; box-shadow: var(--wd-shadow-lift); color: var(--wd-onyx); }
.wd-ds-leave::backdrop { background: rgba(27, 24, 22, 0.42); backdrop-filter: blur(3px); }
.wd-ds-leave h2 { font-size: 1.1rem; margin: 0 0 6px; }
.wd-ds-leave p { margin: 0 0 20px; font-size: 0.9rem; color: var(--ep-text-secondary); }
.wd-ds-leave-acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* Design par défaut de l'organisation : mention à la création, reprise du logo */
.wd-gal-house { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--wd-jaune-pale); color: #6B4F22; font-size: 0.84rem; }
.wd-gal-house .ms { font-size: 18px; color: var(--wd-jaune); }
.wd-ds-house-logo { align-self: flex-start; }
.wd-ds-house-logo .ms { font-size: 18px; color: var(--wd-jaune); }
.wd-ds-make-default:disabled { opacity: 1; color: var(--wd-st-ok); }
.wd-ds-make-default:disabled .ms { color: var(--wd-st-ok); }

/* Mobile : aperçu plein écran, réglages en feuille au-dessus des onglets */
@media (max-width: 899.98px) {
    .wd-ds-top { height: 52px; padding: 0 10px 0 6px; gap: 6px; }
    .wd-ds-title small, .wd-ds-device, .wd-ds-btn[data-design-studio-target="cancelBtn"] { display: none !important; }
    .wd-ds-state { font-size: 0; gap: 0; }
    .wd-ds-state.is-saved::before { font-size: 20px; }
    .wd-ds-state.is-error { font-size: 0.78rem; }
    .wd-ds-body { flex-direction: column; }
    .wd-ds-canvas { order: 1; padding: 0; }
    .wd-ds-frame, .wd-ds-frame.is-mobile { border: 0; border-radius: 0; box-shadow: none; }
    .wd-ds-side { order: 2; width: 100%; border-right: 0; border-top: 1px solid var(--wd-hairline); box-shadow: 0 -12px 30px -18px rgba(0, 0, 0, 0.25); }
    .wd-ds-tabs { order: 2; padding: 0 4px env(safe-area-inset-bottom); border-bottom: 0; border-top: 1px solid var(--wd-hairline); }
    .wd-ds-side:not(.is-open) .wd-ds-tabs { border-top: 0; }
    .wd-ds-tab { height: 58px; border-bottom: 0; border-top: 2px solid transparent; margin: -1px 0 0; }
    .wd-ds-tab.on { border-top-color: var(--wd-onyx); }
    .wd-ds-panel { order: 1; flex: none; max-height: 0; padding: 0 18px; overflow: hidden; transition: max-height 280ms var(--wd-ease), padding 280ms var(--wd-ease); }
    .wd-ds-side.is-open .wd-ds-panel { max-height: 50dvh; padding: 0 18px 24px; overflow-y: auto; }
    .wd-ds-grip { display: block; position: sticky; top: 0; z-index: 1; height: 22px; margin: 0 -18px 6px; background: #fff; touch-action: none; cursor: grab; }
    .wd-ds-grip::after { content: ''; position: absolute; left: 50%; top: 9px; width: 36px; height: 4px; border-radius: 2px; background: var(--wd-hairline-2); transform: translateX(-50%); }
    .wd-ds-focal-in img { max-height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-ds-state.is-dirty::before, .wd-ds-save .ms { animation: none; }
    .wd-ds-panel { transition: none; }
}

/* ============================================================
   PRESTATAIRES — registre (photo ou icône de catégorie, prochaine
   mission, note), fiche dans la grammaire de la fiche client (carte-titre
   noire, notation en étoiles cliquables, onglets Vue d'ensemble · Missions
   · Photos), mission = ligne datée au statut modifiable sur place,
   formulaire en sections à plat (.wd-clf).
   ============================================================ */
/* A. Registre */
.wd-vd-catbtn .ms { font-size: 18px; margin-right: -4px; }
.wd-vd-catbtn.is-on { border-color: var(--wd-onyx); color: var(--wd-onyx); }
.wd-vd-catmenu { max-height: min(420px, 60vh); overflow-y: auto; min-width: 230px; }
.wd-vd-catmenu .dropdown-item { display: flex; align-items: center; gap: 10px; }
.wd-vd-catmenu .dropdown-item i { width: 16px; font-size: 15px; color: var(--ep-text-muted); }
.wd-vd-catmenu .dropdown-item small { margin-left: auto; padding-left: 12px; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-vd-catmenu .dropdown-item.active { background: var(--wd-papier); color: var(--wd-onyx); font-weight: 600; }
.wd-vd-av { background: var(--wd-papier); color: var(--wd-fumee-fonce); }
.wd-vd-av i { font-size: 16px; line-height: 1; }
.wd-vd-pending { color: #8A6A33; font-weight: 500; }
.wd-vd-stars { display: inline-flex; gap: 0; color: var(--wd-hairline-2); }
.wd-vd-stars .ms { font-size: 17px; }
.wd-vd-stars .ms.on { color: var(--wd-jaune); font-variation-settings: 'FILL' 1; }
.wd-vd-first { padding: 48px 24px; }
.wd-vd-first p { max-width: 56ch; margin: 0 auto 16px; }

/* B. Carte-titre : avatar = photo principale, sinon l'icône de la catégorie */
.wd-vd-cover-av i { font-size: 22px; line-height: 1; }
.wd-vd-cover-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-vd-cat { height: 26px; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.12); color: #fff; display: inline-flex; align-items: center; font-size: 0.8rem; font-weight: 500; }
/* Note : cinq étoiles, celles d'avant celle qu'on survole s'allument */
.wd-vd-rate { display: inline-flex; align-items: center; gap: 0; margin: 0; }
.wd-vd-rate .ms { width: 24px; height: 26px; padding: 0; border: 0; background: none; font-size: 19px; color: rgba(255, 255, 255, 0.28) !important; display: inline-grid; place-items: center; transition: color 120ms var(--wd-ease), transform 160ms var(--wd-ease); }
.wd-vd-rate button.ms { cursor: pointer; }
/* Au repos, la note posée ; au survol, la note qu'on s'apprête à poser */
.wd-vd-rate:not(:has(button:hover)) .ms.on, .wd-vd-rate button.ms:hover, .wd-vd-rate button.ms:has(~ button:hover) { color: var(--wd-jaune) !important; font-variation-settings: 'FILL' 1; }
.wd-vd-rate button.ms:hover { transform: scale(1.18); }
.wd-vd-rate button.ms:focus-visible { outline: 2px solid var(--wd-jaune); outline-offset: 1px; border-radius: 6px; }
.wd-vd-rate-hint { margin-left: 6px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.55); }
.wd-vd-rate:has(button:hover) .wd-vd-rate-hint { color: #fff; }
.wd-vd .wd-cl-primary .ms { font-size: 18px; }

/* C. Vue d'ensemble et missions */
.wd-vd .wd-rp-sum + .wd-ev-panel, .wd-vd .wd-rp-sum + .wd-rp-blank { margin-top: 18px; }
.wd-vd .wd-rp-head + .wd-ev-panel, .wd-vd .wd-rp-head + .wd-rp-blank { margin-top: 18px; }
.wd-vd-notes { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--wd-onyx); overflow-wrap: anywhere; }
.wd-vd-muted { margin: 0 0 6px; font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-vd-people .wd-cl-kv a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wd-hairline-2); }
.wd-vd-people .wd-cl-kv a:hover { text-decoration-color: var(--wd-jaune); }
.wd-vd-people .wd-cl-kv b { text-align: right; overflow-wrap: anywhere; }
.wd-vd-route { display: inline-block; margin-top: 4px; font-size: 0.82rem; }
/* Icône en inline-block : le soulignement du lien ne la traverse pas (un élément flex, lui, en hérite) */
.wd-vd-route .ms { display: inline-block; font-size: 16px; vertical-align: -3px; margin-right: 3px; text-decoration: none; }
.wd-vd-missions .wd-ev-h small { margin-left: 4px; font-family: var(--wd-font-sans); font-size: 0.82rem; font-weight: 500; color: var(--ep-text-muted); }
.wd-vd-past-h { margin-top: 24px !important; }
.wd-cl-row.wd-vd-mission { grid-template-columns: 52px minmax(0, 1fr) 96px auto 32px; margin: 0 -12px; }
.wd-cl-row.wd-vd-mission--event { grid-template-columns: 36px minmax(0, 1fr) 96px auto 32px; }
.wd-cl-row.wd-vd-mission--event.has-rights { grid-template-columns: 36px minmax(0, 1fr) auto 96px auto 32px; }
.wd-vd-mission-av { width: 36px; height: 36px; }
.wd-vd-rights:empty { display: none; }
.wd-vd-lic { gap: 4px; padding: 0 9px 0 7px; text-decoration: none; }
.wd-vd-lic .ms { font-size: 15px; }
.wd-vd-lic.is-unknown { --st: #8E867C; }
.wd-vd-lic.is-credited { --st: #6B8E6F; }
.wd-vd-lic.is-missing { --st: #B25A4A; }
.wd-vd-lic:hover { filter: brightness(0.96) saturate(1.2); }
.wd-vendors .wd-cl-hollow { border: 0; padding: 4px 0; }
.wd-vd-date { width: 52px; min-height: 52px; padding: 6px 0; border-radius: 14px; background: var(--wd-papier); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; text-align: center; }
.wd-vd-date b { font-family: var(--wd-font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; overflow: visible; }
.wd-vd-date small { margin-top: 3px; font-size: 0.68rem; font-weight: 500; color: var(--ep-text-secondary); white-space: normal; }
.wd-vd-date i { margin-top: 2px; font-style: normal; font-size: 0.64rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-vd-mission .main { gap: 2px; }
.wd-vd-mission-t { font-weight: 600; font-size: 0.92rem; color: var(--wd-onyx); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-vd-mission-t:hover { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-vd-mission.is-off .wd-vd-mission-t, .wd-vd-mission.is-off .amount b { color: var(--ep-text-muted); text-decoration: line-through; }
.wd-vd-mission.is-off .wd-vd-date { opacity: 0.55; }
.wd-vd-st.is-pending, .wd-vd-dot.is-pending { --st: #5C5A56; }
.wd-vd-st.is-contacted, .wd-vd-dot.is-contacted { --st: #4A5D8A; }
.wd-vd-st.is-quote_sent, .wd-vd-dot.is-quote_sent { --st: #C9A063; }
.wd-vd-st.is-confirmed, .wd-vd-dot.is-confirmed { --st: #6B8E6F; }
.wd-vd-st.is-cancelled, .wd-vd-dot.is-cancelled { --st: #B25A4A; }
button.wd-vd-st { border: 0; gap: 2px; padding: 0 6px 0 10px; cursor: pointer; transition: filter 150ms var(--wd-ease); }
button.wd-vd-st .ms { font-size: 16px; opacity: 0.7; }
button.wd-vd-st:hover { filter: brightness(0.96) saturate(1.2); }
.wd-vd-st-wrap { justify-self: end; }
.wd-vd-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--st); }
.wd-vd-mission .wd-row-menu-btn { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; display: grid; place-items: center; color: var(--ep-text-secondary); }
.wd-vd-mission .wd-row-menu-btn .ms { font-size: 19px; }
.wd-vd-mission .wd-row-menu-btn:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-vd .wd-cl-hollow .wd-cl-textbtn { font-size: inherit; }

/* D. Photos */
.wd-vd-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.wd-vd-photo { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--wd-papier); }
.wd-vd-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms var(--wd-ease); }
.wd-vd-photo:hover img { transform: scale(1.03); }
.wd-vd-photo.is-primary { box-shadow: 0 0 0 2px var(--wd-onyx); }
.wd-vd-photo-badge { position: absolute; left: 8px; top: 8px; height: 24px; padding: 0 8px; border-radius: 7px; background: rgba(27, 24, 22, 0.78); color: #fff; font-size: 0.74rem; font-weight: 500; display: inline-flex; align-items: center; }
.wd-vd-photo-acts { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; opacity: 0; transform: translateY(-4px); transition: opacity 160ms var(--wd-ease), transform 160ms var(--wd-ease); }
.wd-vd-photo:hover .wd-vd-photo-acts, .wd-vd-photo:focus-within .wd-vd-photo-acts { opacity: 1; transform: none; }
.wd-vd-photo-acts form { margin: 0; }
.wd-vd-photo-acts button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #fff; color: var(--wd-onyx); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16); }
.wd-vd-photo-acts button .ms { font-size: 18px; }
.wd-vd-photo-acts button:hover { background: var(--wd-papier); }
@media (hover: none) { .wd-vd-photo-acts { opacity: 1; transform: none; } }
.wd-vd-drop.ep-file-dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border: 1.5px dashed var(--wd-hairline-2); border-radius: var(--wd-r-card); background: #fff; color: var(--ep-text-secondary); font-size: 0.9rem; cursor: pointer; transition: border-color 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-vd-drop .ms { font-size: 24px; color: var(--wd-fumee-fonce); }
.wd-vd-drop b { color: var(--wd-onyx); font-weight: 600; }
.wd-vd-drop small { font-size: 0.78rem; color: var(--ep-text-muted); }
.wd-vd-drop:hover, .wd-vd-drop.ep-file-dropzone--active { border-color: var(--wd-onyx); background: #FBF9F6; }
.wd-vd-upload-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.wd-vd-upload:has(.ep-file-list:empty) .wd-vd-upload-foot { display: none; }

/* E. Formulaire : contacts en cartes, note en étoiles */
.ep-new-vendor-modal .modal-header, .ep-edit-vendor-modal .modal-header, .wd-vd-modal .modal-header { padding: 18px 24px 14px; border-bottom: 1px solid var(--wd-hairline); background: #fff; }
.ep-new-vendor-modal .modal-title, .ep-edit-vendor-modal .modal-title, .wd-vd-modal .modal-title { font-family: var(--wd-font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.ep-new-vendor-modal .modal-content, .ep-edit-vendor-modal .modal-content, .wd-vd-modal .modal-content { border: 0; border-radius: var(--wd-r-card); overflow: hidden; }
.wd-vdf-row--id { grid-template-columns: 1.6fr 1fr; }
.wd-vdf-contacts:empty { display: none; }
.wd-vdf-contacts { display: flex; flex-direction: column; gap: 8px; }
.wd-vdf-contact { padding: 10px; border: 1px solid var(--wd-hairline); border-radius: 14px; background: #FBF9F6; animation: wd-rise-soft 200ms var(--wd-ease); }
.wd-vdf-contact-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.wd-vdf-contact-row + .wd-vdf-contact-row { margin-top: 8px; grid-template-columns: 1fr 1fr auto 36px; align-items: center; }
.wd-clf .wd-vdf-contact .form-control { height: 38px; font-size: 0.88rem; }
.wd-vdf-primary { margin: 0; cursor: pointer; }
.wd-vdf-primary input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-vdf-primary span { height: 38px; padding: 0 12px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 500; color: var(--ep-text-secondary); transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease), border-color 150ms var(--wd-ease); }
.wd-vdf-primary span::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--wd-hairline-2); transition: inherit; }
.wd-vdf-primary input:checked + span { border-color: var(--wd-onyx); color: var(--wd-onyx); }
.wd-vdf-primary input:checked + span::before { border: 4px solid var(--wd-onyx); }
.wd-vdf-primary input:focus-visible + span { outline: 2px solid var(--wd-onyx); outline-offset: 1px; }
.wd-vdf-remove { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--ep-text-muted); display: grid; place-items: center; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-vdf-remove .ms { font-size: 19px; }
.wd-vdf-remove:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-vdf-contacts + .wd-clf-add { margin-top: 10px; }
.wd-vdf-contacts:empty + .wd-clf-add { margin-top: 0; }
.wd-vdf-stars { display: flex; align-items: center; gap: 2px; margin-bottom: 14px; }
.wd-vdf-stars label { margin: 0; cursor: pointer; }
.wd-vdf-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-vdf-stars .ms { width: 36px; height: 36px; display: grid; place-items: center; font-size: 28px; color: var(--wd-hairline-2); transition: color 120ms var(--wd-ease), transform 160ms var(--wd-ease); }
/* Au repos, la note cochée ; au survol, celle qu'on s'apprête à poser */
.wd-vdf-stars:not(:has(label:not(.wd-vdf-norate):hover)):has(input[value="1"]:checked) label:nth-of-type(-n+1) .ms,
.wd-vdf-stars:not(:has(label:not(.wd-vdf-norate):hover)):has(input[value="2"]:checked) label:nth-of-type(-n+2) .ms,
.wd-vdf-stars:not(:has(label:not(.wd-vdf-norate):hover)):has(input[value="3"]:checked) label:nth-of-type(-n+3) .ms,
.wd-vdf-stars:not(:has(label:not(.wd-vdf-norate):hover)):has(input[value="4"]:checked) label:nth-of-type(-n+4) .ms,
.wd-vdf-stars:not(:has(label:not(.wd-vdf-norate):hover)):has(input[value="5"]:checked) label:nth-of-type(-n+5) .ms,
.wd-vdf-stars label:not(.wd-vdf-norate):hover .ms, .wd-vdf-stars label:has(~ label:not(.wd-vdf-norate):hover) .ms { color: var(--wd-jaune); font-variation-settings: 'FILL' 1; }
.wd-vdf-stars label:hover .ms { transform: scale(1.12); }
.wd-vdf-stars input:focus-visible + .ms { outline: 2px solid var(--wd-onyx); outline-offset: -2px; border-radius: 8px; }
.wd-vdf-norate { margin-left: 10px !important; }
.wd-vdf-norate span { height: 30px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; font-size: 0.82rem; color: var(--ep-text-muted); }
.wd-vdf-norate:hover span { color: var(--wd-onyx); }
.wd-vdf-norate input:checked + span { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-clf .wd-vdf-notes textarea.form-control { min-height: 96px; resize: vertical; line-height: 1.5; padding-top: 10px; }
.wd-vd-eur { position: relative; }
.wd-vd-eur .form-control { padding-right: 32px; }
.wd-vd-eur span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ep-text-muted); pointer-events: none; }
.wd-vd-link-row { margin: 12px 0 0; }
.wd-vd-seg label { flex: 1 1 auto; }
.wd-vd-seg input[value="confirmed"]:checked + span { background: var(--wd-st-ok-bg); color: var(--wd-st-ok); box-shadow: none; }
.wd-vd-seg input[value="quote_sent"]:checked + span { background: var(--wd-jaune-pale); color: #6B4F22; box-shadow: none; }

@media (max-width: 767.98px) {
    .wd-cl-row.wd-vd-mission, .wd-cl-row.wd-vd-mission--event, .wd-cl-row.wd-vd-mission--event.has-rights { grid-template-columns: 44px minmax(0, 1fr) auto 32px; gap: 10px; row-gap: 6px; }
    .wd-vd-mission-av { width: 44px; height: 44px; }
    .wd-vd-rights { grid-column: 2 / 4; grid-row: 3; }
    .wd-vd-date { width: 44px; min-height: 44px; border-radius: 12px; }
    .wd-vd-date b { font-size: 1.05rem; }
    /* Ligne 1 : repère · titre · ⋯ ; ligne 2 : statut à gauche, prix à droite */
    .wd-vd-mission > .wd-vd-date, .wd-vd-mission > .wd-vd-mission-av { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
    .wd-vd-mission > .main { grid-column: 2 / 4; grid-row: 1; }
    .wd-vd-mission .amount { grid-column: 3; grid-row: 2; text-align: right; }
    .wd-vd-st-wrap, .wd-vd-mission > .wd-vd-st { grid-column: 2; grid-row: 2; justify-self: start; }
    .wd-vd-mission > .dropdown:last-child { grid-column: 4; grid-row: 1; }
    .wd-vd-mission-t { white-space: normal; }
}
@media (max-width: 575.98px) {
    .wd-vdf-row--id { grid-template-columns: 1fr; }
    .wd-vdf-contact-row { grid-template-columns: 1fr 1fr; }
    .wd-vdf-contact-row > :nth-child(3) { grid-column: 1 / -1; }
    .wd-vdf-contact-row + .wd-vdf-contact-row { grid-template-columns: 1fr 1fr; }
    .wd-vdf-contact-row + .wd-vdf-contact-row > .wd-vdf-primary { grid-column: 1; }
    .wd-vdf-contact-row + .wd-vdf-contact-row > .wd-vdf-remove { grid-column: 2; justify-self: end; }
    .wd-vd-seg { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-vd-rate .ms, .wd-vdf-stars .ms, .wd-vd-photo img { transition: none; transform: none !important; }
    .wd-vdf-contact { animation: none; }
}

/* ============================================================
   PRODUITS — registre du catalogue (photo ou icône, catégorie principale,
   nature, prix HT avec l'unité, TTC avec la TVA), fiche sans onglets
   (carte-titre noire avec le prix en grand, description, devis où le
   produit figure, photos | tarif et catégories), formulaire en sections
   à plat (.wd-clf) : nature, TVA et tarification en segments, catégories
   en pastilles avec l'étoile de la principale.
   ============================================================ */
/* A. Registre */
.wd-pd-catmenu .dropdown-item.is-child { padding-left: 30px; color: var(--ep-text-secondary); }
.wd-pd-catmenu .dropdown-item.is-child.active { color: var(--wd-onyx); }
.wd-pd-catmenu .wd-pd-catmenu-manage { color: var(--ep-text-secondary); font-size: 0.84rem; }
.wd-vd-av .ms { font-size: 18px; line-height: 1; }
.wd-pd-kind { height: 24px; padding: 0 9px; border-radius: 7px; background: var(--wd-papier); color: var(--ep-text-secondary); display: inline-flex; align-items: center; font-size: 0.78rem; font-weight: 500; }
.wd-pd-kind.is-goods { background: var(--wd-jaune-pale); color: #6B4F22; }
.wd-pd-perguest { display: inline-flex; align-items: center; gap: 3px; }
.wd-pd-perguest .ms { font-size: 15px; }
.wd-pd-reg .board-header-cell.wd-cell-num { justify-content: flex-end; text-align: right; padding-right: 12px; }
.wd-pd-reg .board-cell.wd-cell-num { justify-content: flex-end; text-align: right; }
.wd-pd-reg .board-cell.wd-cell-num .wd-cell-stack { align-items: flex-end; }
.wd-pd-first-acts { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.wd-pd-first-acts .wd-ev-btn { height: 42px; padding: 0 16px; }

/* B. Carte-titre : la vignette (ouvre les photos), le prix en grand (ouvre la modale sur le prix) */
.wd-vd-cover-av .ms { font-size: 24px; line-height: 1; }
.wd-pd-cover { margin-bottom: 24px; }
.wd-pd-cover .wd-ev-meta li { gap: 5px; }
a.wd-pd-cat { text-decoration: none; transition: background 150ms var(--wd-ease); }
a.wd-pd-cat:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.wd-pd-more { height: 26px; padding: 0 8px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.22); display: inline-flex; align-items: center; font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); cursor: help; }
button.wd-pd-av { position: relative; padding: 0; border: 0; overflow: hidden; cursor: pointer; }
.wd-pd-av-hint { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(27, 24, 22, 0.62); color: #fff; font-family: var(--wd-font-sans); font-size: 0.72rem; font-weight: 600; opacity: 0; transition: opacity 160ms var(--wd-ease); }
button.wd-pd-av:hover .wd-pd-av-hint, button.wd-pd-av:focus-visible .wd-pd-av-hint { opacity: 1; }
.wd-pd-cover-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; padding: 4px 8px; border: 0; border-radius: 12px; background: none; color: #fff; text-align: right; line-height: 1; white-space: nowrap; }
button.wd-pd-cover-price { cursor: pointer; transition: background 150ms var(--wd-ease); }
button.wd-pd-cover-price:hover { background: rgba(255, 255, 255, 0.08); }
button.wd-pd-cover-price:focus-visible { outline: 2px solid var(--wd-jaune); outline-offset: 2px; }
.wd-pd-cover-price b { font-family: var(--wd-font-display); font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.wd-pd-cover-price b i { font-style: normal; font-size: 0.95rem; font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, 0.6); }
.wd-pd-cover-price small { font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); }
.wd-pd-cover .wd-ev-cover-right { margin-left: 8px; }
.wd-pd .wd-cl-primary .ms { font-size: 18px; }
.wd-pd-menu .dropdown-item small { margin-left: auto; padding-left: 12px; color: var(--ep-text-muted); }
.wd-pd-menu .wd-pd-stamp { padding: 2px 16px 4px; font-size: 0.76rem; line-height: 1.5; color: var(--ep-text-muted); }

/* C. Dans un devis : la ligne dans la grammaire du devis, sans poignée ni actions */
.wd-pd-line .wd-doc-lines td { padding-top: 16px; padding-bottom: 16px; }
.wd-pd-line .wd-doc-line:hover td { background: none; }
.wd-pd-line .wd-doc-lines .c-name small { font-size: 0.86rem; }
.wd-pd-nodetail { margin-top: 12px; padding: 12px 16px; }
.wd-pd-note { margin: 10px 0 0; font-size: 0.8rem; color: var(--ep-text-muted); }

/* D. Ventes : une phrase de chiffres, puis les derniers devis */
.wd-pd-figures { margin: 0 0 12px; font-size: 0.88rem; line-height: 1.6; color: var(--ep-text-secondary); }
.wd-pd-figures b { font-weight: 600; color: var(--wd-onyx); font-variant-numeric: tabular-nums; }
.wd-pd-gap { color: var(--ep-text-secondary); white-space: nowrap; }
.wd-pd-gap.is-below { color: #8A6A33; }
.wd-cl-row.wd-pd-sale { grid-template-columns: minmax(0, 1fr) auto; }
.wd-pd-sale .amount { align-items: flex-end; gap: 4px; }
.wd-pd-sale .amount .wd-cal-st { font-size: 0.72rem; }
.wd-pd-photos .modal-title small { margin-left: 6px; font-family: var(--wd-font-sans); font-size: 0.8rem; font-weight: 400; letter-spacing: 0; color: var(--ep-text-muted); }
.wd-pd-photos .modal-body { padding: 20px 24px; }
.wd-pd-photos .wd-vd-photos { margin-bottom: 14px; }

/* E. Formulaire : le nom, le prix en une phrase avec l'aperçu de la ligne,
   TVA et nature côte à côte, description repliée, catégorie en pastilles */
.ep-edit-product-modal .modal-header { padding: 18px 24px 14px; border-bottom: 1px solid var(--wd-hairline); background: #fff; }
.ep-edit-product-modal .modal-title { font-family: var(--wd-font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.ep-edit-product-modal .modal-content { border: 0; border-radius: var(--wd-r-card); overflow: hidden; }
.wd-pdf fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.wd-pdf legend { float: none; width: auto; }
.wd-pdf-sec > .wd-clf-f { margin-bottom: 18px; }
.wd-pdf-sec > .wd-clf-f:last-child, .wd-pdf-sec > .wd-clf-f:has(+ [hidden]:last-child) { margin-bottom: 0; }
.wd-pdf-hint { margin: 6px 0 0; font-size: 0.78rem; color: var(--ep-text-muted); }
.wd-pdf-warn { margin: 6px 0 0; font-size: 0.8rem; color: #8A6A33; }
.wd-pdf-name .form-control { height: 46px; font-size: 1rem; font-weight: 500; }
/* Prix : [montant €] [HT|TTC] par [unité] */
.wd-pdf-price { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wd-pdf-amount { flex: 0 1 190px; }
.wd-clf .wd-pdf-amount .form-control { height: 46px; text-align: right; font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-pdf-basis span { height: 38px; padding: 0 12px; }
.wd-pdf-unitwrap { display: inline-flex; align-items: center; gap: 10px; }
.wd-pdf-per { margin: 0; font-size: 0.9rem; color: var(--ep-text-secondary); }
.wd-clf .wd-pdf-unit { flex: 0 0 auto; width: auto; min-width: 216px; height: 46px; }
.wd-pdf-preview { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; background: #FBF9F6; font-size: 0.84rem; color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; }
.wd-pdf-preview:empty { display: none; }
.wd-pdf-row--tax { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 18px; }
.wd-pdf-row--tax .form-label { margin-bottom: 6px; }
.wd-pdf-desc[hidden], .wd-pdf-descbtn[hidden] { display: none !important; }
.wd-pdf-desc .form-label small { margin-left: 4px; font-weight: 400; font-size: 0.78rem; color: var(--ep-text-muted); }
.wd-clf .wd-pdf-desc textarea.form-control { height: auto; min-height: 84px; resize: vertical; line-height: 1.5; padding-top: 10px; }
.wd-pdf-descbtn { margin-top: 0; }
/* Catégorie : une ligne par famille, l'étoile dès deux cochées */
.wd-pdf-sec > legend.wd-clf-h { margin-bottom: 12px; }
.wd-pdf-cats { display: flex; flex-direction: column; gap: 8px; }
.wd-pdf-catrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wd-pdf-chip { position: relative; display: inline-flex; align-items: center; height: 32px; border: 1px solid var(--wd-hairline-2); border-radius: 999px; background: #fff; transition: background 150ms var(--wd-ease), border-color 150ms var(--wd-ease); }
.wd-pdf-chip label { margin: 0; height: 100%; padding: 0 12px; display: inline-flex; align-items: center; cursor: pointer; font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-pdf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-pdf-chip.is-child label { font-size: 0.82rem; }
.wd-pdf-catrow > .wd-pdf-chip:first-child:not(:last-child) { margin-right: 6px; }
.wd-pdf-chip:hover { border-color: var(--wd-onyx); }
.wd-pdf-chip:hover label { color: var(--wd-onyx); }
.wd-pdf-chip:has(input:focus-visible) { outline: 2px solid var(--wd-onyx); outline-offset: 1px; }
.wd-pdf-chip.is-on { background: var(--wd-onyx); border-color: var(--wd-onyx); }
.wd-pdf-chip.is-on label { color: #fff; }
.wd-pdf-chip.is-new { animation: wd-rise-soft 220ms var(--wd-ease); }
.wd-pdf-star { display: none; width: 26px; height: 26px; margin-right: 3px; padding: 0; border: 0; border-radius: 50%; background: none; place-items: center; color: rgba(255, 255, 255, 0.4); transition: color 150ms var(--wd-ease), transform 160ms var(--wd-ease); }
.wd-pdf-star .ms { font-size: 17px; }
.wd-pdf-cats.is-multi .wd-pdf-chip.is-on label { padding-right: 4px; }
.wd-pdf-cats.is-multi .wd-pdf-chip.is-on .wd-pdf-star { display: inline-grid; }
.wd-pdf-star:hover { color: var(--wd-jaune); transform: scale(1.12); }
.wd-pdf-chip.is-default .wd-pdf-star { color: var(--wd-jaune); }
.wd-pdf-chip.is-default .wd-pdf-star .ms { font-variation-settings: 'FILL' 1; }
.wd-pdf-star:focus-visible { outline: 2px solid var(--wd-jaune); outline-offset: -2px; }
.wd-pdf-newcat { height: 32px; padding: 0 12px 0 8px; border: 1px dashed var(--wd-hairline-2); border-radius: 999px; background: #fff; display: inline-flex; align-items: center; gap: 2px; font-size: 0.84rem; color: var(--ep-text-secondary); transition: border-color 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-pdf-newcat .ms { font-size: 17px; }
.wd-pdf-newcat:hover { border-color: var(--wd-onyx); color: var(--wd-onyx); }
.wd-pdf-newcat[hidden], .wd-pdf-newinput[hidden] { display: none !important; }
.wd-clf .wd-pdf-newinput { width: 240px; height: 34px; font-size: 0.86rem; border-radius: 999px; padding: 0 14px; }
.wd-pdf-starhint { display: inline-flex; align-items: center; gap: 3px; margin: 0; }
.wd-pdf-starhint .ms { font-size: 15px; color: var(--wd-jaune); font-variation-settings: 'FILL' 1; }
.wd-pdf-starhint[hidden], .wd-pdf-warn[hidden] { display: none !important; }
/* Pied : « Créer à la suite » à gauche, la confirmation en or */
.wd-pdf-continue { margin: 0 auto 0 0 !important; display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--ep-text-secondary); cursor: pointer; }
.wd-pdf-continue input { width: 16px; height: 16px; accent-color: var(--wd-onyx); }
.wd-pdf-done { margin: 0 8px 0 0 !important; font-size: 0.82rem; color: #6B4F22; animation: wd-rise-soft 220ms var(--wd-ease); }
.wd-pdf-done[hidden] { display: none; }

.wd-pd-m { display: none; }

/* F. Catégories : une carte, une famille par bloc */
.wd-pc-sum { max-width: 70ch; margin: -6px 0 18px; }
.wd-pc { padding: 6px 24px; }
.wd-pc-family { padding: 8px 0; }
.wd-pc-family + .wd-pc-family { border-top: 1px solid var(--wd-hairline); }
.wd-pc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 32px; align-items: center; gap: 14px; min-height: 44px; }
.wd-pc-name { font-weight: 600; font-size: 0.95rem; color: var(--wd-onyx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-pc-row.is-child { min-height: 38px; padding-left: 22px; position: relative; }
.wd-pc-row.is-child::before { content: ''; position: absolute; left: 6px; top: -4px; bottom: 50%; width: 9px; border-left: 1px solid var(--wd-hairline-2); border-bottom: 1px solid var(--wd-hairline-2); border-bottom-left-radius: 6px; }
.wd-pc-row.is-child .wd-pc-name { font-weight: 500; font-size: 0.9rem; }
.wd-pc-count { font-size: 0.84rem; color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wd-hairline-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-pc-count:hover { color: var(--wd-onyx); text-decoration-color: var(--wd-jaune); text-decoration-thickness: 2px; }
.wd-pc-count.is-empty { text-decoration: none; color: var(--ep-text-muted); }
.wd-pc-menu { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; display: grid; place-items: center; color: var(--ep-text-secondary); }
.wd-pc-menu .ms { font-size: 19px; }
.wd-pc-menu:hover, .wd-pc-menu[aria-expanded="true"] { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-pc-modal .modal-header { padding: 18px 24px 14px; border-bottom: 1px solid var(--wd-hairline); background: #fff; }
.wd-pc-modal .modal-title { font-family: var(--wd-font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.wd-pc-modal .modal-content { border: 0; border-radius: var(--wd-r-card); overflow: hidden; }

@media (max-width: 767.98px) {
    /* Téléphone : lists.css ne garde que le nom et le menu ; le prix passe sous le nom */
    .wd-pd-reg .wd-pd-d { display: none; }
    .wd-pd-reg .wd-pd-m { display: block; }
    .wd-pd-cover-price { order: 3; flex-basis: 100%; flex-direction: row; align-items: baseline; gap: 8px; margin: 4px 0 0; padding: 0; }
    .wd-pd-cover-price b { font-size: 1.35rem; }
    .wd-pd-cover .wd-ev-cover-right { order: 4; margin-left: 0; }
    .wd-pdf-amount { flex: 1 1 140px; }
    .wd-pdf-unitwrap { flex: 1 1 100%; }
    .wd-clf .wd-pdf-unit { flex: 1 1 auto; min-width: 0; }
    .wd-pdf-continue { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-pdf-star { transition: none; transform: none !important; }
}

/* ============================================================
   LIVRE DES RECETTES — trois repères (encaissé et rythme mensuel,
   déclaration et échéance, seuil le plus proche), factures réglées
   sans paiement saisi, registre rangé par trimestre de déclaration.
   ============================================================ */
.wd-rb .wd-rp-head { margin-bottom: 22px; }
.wd-rb .wd-rb-years { margin: 0; }

/* Exporter : le format et à quoi il sert */
.wd-rb-menu .dropdown-item { align-items: flex-start; }
.wd-rb-menu .dropdown-item > span:last-child { display: flex; flex-direction: column; font-weight: 500; }
.wd-rb-menu .dropdown-item small { font-size: 0.76rem; font-weight: 400; color: var(--ep-text-secondary); }

/* Repères : cartes soulevées ; deux cartes se partagent la largeur */
.wd-rb .wd-health-card { border-color: var(--wd-card-border); box-shadow: var(--wd-card-shadow); }
.wd-rb .wd-health-card:hover { box-shadow: 0 1px 2px rgba(27, 24, 22, 0.06), 0 24px 40px -20px rgba(27, 24, 22, 0.32); }
.wd-rb-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wd-rb .wd-health-g .is-time { background: var(--wd-onyx); }
.wd-rb .wd-health-g .is-ok { background: #7FA07C; }
.wd-rb .wd-health-g .is-warn { background: var(--wd-jaune); }
.wd-rb .wd-health-g .is-over { background: var(--wd-st-danger); }
/* Forme juridique à préciser : un creux en pointillés, sans ombre */
.wd-rb .wd-health-card.is-blank { border: 1px dashed var(--wd-hairline-2); background: #FDFCFA; box-shadow: none; display: flex; flex-direction: column; }
.wd-rb .wd-health-card.is-blank:hover { transform: none; box-shadow: none; border-color: var(--wd-onyx); }
.wd-rb .wd-health-card.is-blank .wd-health-verdict { color: var(--ep-text-secondary); min-height: 0; }
.wd-rb-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 0.86rem; font-weight: 500; }
/* Seul le libellé est souligné, jamais l'icône */
.wd-rb-cta > span:first-child { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-rb-cta .ms { font-size: 16px; transition: transform 200ms var(--wd-ease); }
.wd-health-card.is-blank:hover .wd-rb-cta .ms { transform: translateX(3px); }

/* Rythme de l'année : un trait par mois, le mois courant en or, les mois à venir en creux */
.wd-rb-spark { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; height: 46px; }
.wd-rb-spark span { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.wd-rb-spark i { display: block; width: min(100%, 9px); height: calc(30px * var(--p)); min-height: 3px; border-radius: 3px; background: var(--wd-onyx); transition: height 600ms var(--wd-ease); }
.wd-rb-spark em { font-style: normal; font-size: 0.64rem; line-height: 1; text-align: center; color: var(--ep-text-muted); margin-top: 5px; }
.wd-rb-spark .is-now i { background: var(--wd-jaune); }
.wd-rb-spark .is-now em { color: var(--wd-onyx); font-weight: 600; }
.wd-rb-spark .is-future i { background: var(--wd-papier); }

/* Factures réglées sans paiement : le lien d'action en bout de ligne */
.wd-rb-missing .t span { font-weight: 400; color: var(--ep-text-secondary); }
.wd-rb-missing li { gap: 16px; }

/* Registre */
.wd-rb-reg { border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); background: #fff; overflow: hidden; }
.wd-rb-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; table-layout: fixed; }
.wd-rb-table th, .wd-rb-table td { padding: 12px 14px; vertical-align: middle; }
.wd-rb-table thead th { font-size: 0.78rem; font-weight: 500; color: var(--ep-text-secondary); border-bottom: 1px solid var(--wd-hairline); padding-top: 14px; padding-bottom: 12px; white-space: nowrap; }
.wd-rb-table .c-no { width: 58px; padding-left: 22px; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-rb-table .c-date { width: 98px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wd-rb-table .c-piece { width: 128px; white-space: nowrap; }
.wd-rb-table .c-how { width: 172px; white-space: nowrap; color: var(--ep-text-secondary); }
.wd-rb-table .c-num { width: 128px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 22px; }
.wd-rb-table .c-who { min-width: 0; }
.wd-rb-table .c-piece a { color: var(--wd-onyx); font-weight: 500; text-decoration: none; }
.wd-rb-table .c-piece a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-rb-table .c-piece .wd-st { height: 20px; padding: 0 7px; font-size: 0.7rem; margin-left: 6px; }

/* Tête de trimestre : le sous-total est le montant à déclarer */
.wd-rb-q th, .wd-rb-q td { background: var(--wd-papier); border-top: 1px solid var(--wd-hairline); }
.wd-rb-group:first-of-type .wd-rb-q th, .wd-rb-group:first-of-type .wd-rb-q td { border-top: 0; }
.wd-rb-q th { padding-left: 22px; font-weight: 400; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-rb-q th > * { vertical-align: middle; }
.wd-rb-q-t { color: var(--wd-onyx); margin-right: 8px; }
.wd-rb-q-t b { font-family: var(--wd-font-display); font-weight: 600; margin-right: 4px; }
.wd-rb-q th small { font-size: 0.8rem; margin-right: 10px; }
.wd-rb-q th .wd-st { height: 22px; font-size: 0.74rem; }
.wd-rb-q-nat { display: block; margin-top: 3px; font-size: 0.8rem; }
.wd-rb-q td.c-num { font-weight: 600; color: var(--wd-onyx); }
.wd-rb-group.is-due .wd-rb-q th, .wd-rb-group.is-due .wd-rb-q td { background: #FBF6EC; }
.wd-rb-group { scroll-margin-top: 90px; }

.wd-rb-row { border-top: 1px solid var(--wd-hairline); transition: background 150ms var(--wd-ease); }
.wd-rb-q + .wd-rb-row { border-top: 0; }
.wd-rb-row:hover { background: #FDFCFA; }
.wd-rb-row .c-num { color: var(--wd-onyx); }
.wd-rb-row.is-refund .c-num { color: var(--wd-st-danger); }
.wd-rb-none td { padding: 12px 22px; font-size: 0.84rem; color: var(--ep-text-muted); }

.wd-rb-table tfoot th, .wd-rb-table tfoot td { border-top: 2px solid var(--wd-onyx); font-weight: 600; padding-top: 14px; padding-bottom: 14px; }
.wd-rb-table tfoot th { padding-left: 22px; text-align: left; }
.wd-rb-table tfoot th small { color: var(--ep-text-secondary); font-weight: 400; margin-left: 6px; font-size: 0.82rem; }

/* Notes de pied : répartitions, barème, conservation */
.wd-rb-notes { margin: 18px 4px 0; max-width: 78ch; font-size: 0.82rem; line-height: 1.5; color: var(--ep-text-secondary); }
.wd-rb-notes p { margin: 0 0 6px; }
.wd-rb-notes b { color: var(--wd-onyx); font-weight: 600; margin-right: 6px; }
.wd-rb-notes a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wd-jaune); }
#seuils { scroll-margin-top: 90px; }

.wd-rb .wd-rp-blank--empty p { max-width: 56ch; margin: 0 auto 14px; }

/* Tablette et téléphone : le registre devient une pile — client et montant,
   nature, puis n° · date · pièce. Pas de colonnes masquées : elles casseraient
   les colspan des têtes de trimestre. */
.wd-rb-m { display: none; }
@media (max-width: 991.98px) {
    .wd-rb-cards--3 { grid-template-columns: 1fr 1fr; }
    .wd-rb-cards--3 > :first-child { grid-column: 1 / -1; }
    .wd-rb-table, .wd-rb-table tbody, .wd-rb-table tfoot, .wd-rb-table tr, .wd-rb-table th, .wd-rb-table td { display: block; width: auto; }
    .wd-rb-table thead { display: none; }
    .wd-rb-table tr.wd-rb-q, .wd-rb-table tr.wd-rb-row, .wd-rb-table tfoot tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
    .wd-rb-table tr.wd-rb-q { background: var(--wd-papier); }
    .wd-rb-group.is-due tr.wd-rb-q { background: #FBF6EC; }
    .wd-rb-group + .wd-rb-group tr.wd-rb-q { border-top: 1px solid var(--wd-hairline); }
    .wd-rb-q th, .wd-rb-q td { background: transparent !important; border-top: 0 !important; padding: 12px 18px; }
    .wd-rb-q td.c-num { padding: 12px 18px 12px 0; }
    .wd-rb-table tr.wd-rb-row { padding: 12px 18px; }
    .wd-rb-row td { padding: 0; }
    .wd-rb-row .c-no, .wd-rb-row .c-date, .wd-rb-row .c-piece, .wd-rb-row .c-how { display: none; }
    .wd-rb-row .c-num { font-weight: 600; padding: 0; }
    .wd-rb-m { display: block; margin-top: 3px; font-size: 0.78rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
    .wd-rb-m a { color: var(--ep-text-secondary); }
    .wd-rb-none td { padding: 10px 18px; }
    .wd-rb-table tfoot tr { padding: 14px 18px; border-top: 2px solid var(--wd-onyx); }
    .wd-rb-table tfoot th, .wd-rb-table tfoot td, .wd-rb-table tfoot .c-num { padding: 0; border-top: 0; }
}
@media (max-width: 767.98px) {
    .wd-rb .wd-rp-head { gap: 10px; }
    .wd-rb .wd-rp-head h1 { width: 100%; }
    .wd-rb .wd-rp-head .acts { width: auto; margin-left: auto; }
    .wd-rb-cards--2, .wd-rb-cards--3 { grid-template-columns: 1fr; }
    .wd-rb-cards--3 > :first-child { grid-column: auto; }
    .wd-rb-q th { padding: 12px 16px; }
    .wd-rb-q td.c-num { padding-right: 16px; }
    .wd-rb-q th small, .wd-rb-table tfoot th small { display: none; }
    .wd-rb-q th .wd-st { display: table; margin-top: 6px; }
    .wd-rb-table tr.wd-rb-row { padding: 12px 16px; }
    .wd-rb-none td { padding: 10px 16px; }
    .wd-rb-table tfoot tr { padding: 14px 16px; }
    .wd-rb-notes { margin: 16px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-rb-spark i, .wd-rb-cta .ms { transition: none; }
}

/* ============================================================
   TÂCHES — la liste de l'agence rangée par échéance (même grammaire que
   le rétroplanning : groupes repliables, lignes de 44 px, état lu par la
   case et le barré), le tableau par statut (colonnes en creux, cartes
   soulevées), la fiche d'une tâche (modale et page) et son formulaire.
   ============================================================ */

/* ── Filtres : segments, « Les miennes », menu Événement ── */
.wd-tk-filters .seg em.late { color: var(--wd-st-danger); }
.wd-tk-filters .dropdown { display: inline-flex; }
.wd-tk-evbtn { height: 36px; max-width: 280px; padding: 0 8px 0 12px; border: 1px solid var(--wd-hairline); border-radius: 10px; background: #fff; font-size: 0.84rem; font-weight: 500; color: var(--ep-text-secondary); display: inline-flex; align-items: center; gap: 4px; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-tk-evbtn > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-tk-evbtn .ms { font-size: 18px; transition: transform 200ms var(--wd-ease); }
.wd-tk-evbtn[aria-expanded="true"] .ms { transform: rotate(180deg); }
.wd-tk-evbtn:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-tk-evbtn.is-on { background: var(--wd-onyx); border-color: var(--wd-onyx); color: #fff; }
.wd-tk-evmenu { min-width: 300px; max-height: min(420px, 70vh); overflow-y: auto; }
.wd-tk-evmenu .dropdown-item { gap: 10px; }
.wd-tk-evmenu .dropdown-item.active, .wd-tk-evmenu .dropdown-item:active { background: var(--wd-papier); color: var(--wd-onyx); font-weight: 600; }
.wd-tk-evmenu .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.wd-tk-evmenu .nm i { font-style: normal; font-size: 0.76rem; font-weight: 400; color: var(--ep-text-muted); }
.wd-tk-evmenu small { margin-left: auto; font-size: 0.76rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-tk-retro { display: inline-flex; align-items: center; gap: 4px; font-size: 0.84rem; font-weight: 500; color: var(--wd-onyx); text-decoration: none; }
.wd-tk-retro > span:first-child { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-tk-retro .ms { font-size: 16px; transition: transform 200ms var(--wd-ease); }
.wd-tk-retro:hover .ms { transform: translateX(2px); }

/* Avatar d'événement en petit (liste, menu, carte, fiche) */
.wd-tk-evav { width: 22px; height: 22px; border-radius: 7px; flex: none; overflow: hidden; display: inline-grid; place-items: center; background: var(--wd-jaune-pale); color: var(--wd-onyx); font-family: var(--wd-font-display); font-weight: 600; font-size: 0.56rem; }
.wd-tk-evav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-tk-evmenu .wd-tk-evav { width: 28px; height: 28px; border-radius: 9px; font-size: 0.64rem; }

/* ── Liste ── */
.wd-rp-phase.is-late { color: var(--wd-st-danger); }
.wd-tk-rows .t { flex: 1 1 auto; }
.wd-tk-rows li.is-cancelled .t { color: var(--ep-text-muted); text-decoration: line-through; font-weight: 400; }
.wd-tk-rows li.is-cancelled .when { color: var(--ep-text-muted); }
.wd-tk-rows li.is-today .when b { color: var(--wd-onyx); }
.wd-tk-rows .when .jx { margin-left: -4px; }
/* « En cours » : la case garde un point or, sans étiquette */
.wd-tk-row.is-progress .wd-retro-box { border-color: var(--wd-jaune); }
.wd-tk-row.is-progress .wd-retro-box::before { content: ''; position: absolute; inset: 4px; border-radius: 3px; background: var(--wd-jaune); }
.wd-tk-rows .cl, .wd-kb-meta .cl { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 0.78rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-tk-rows .cl .ms, .wd-kb-meta .cl .ms { font-size: 16px; }
.wd-tk-rows .cl.text-success, .wd-kb-meta .cl.text-success { color: var(--wd-st-ok) !important; }
.wd-tk-rows .pr.is-urgent { background: var(--wd-st-danger); }
.wd-tk-rows .ev { flex: none; width: 210px; min-width: 0; font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-tk-rows .ev a { display: flex; align-items: center; gap: 8px; min-width: 0; color: inherit; text-decoration: none; }
.wd-tk-rows .ev a > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-tk-rows .ev a:hover { color: var(--wd-onyx); }
.wd-tk-rows .ev a:hover > span:last-child { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-tk-rows .ag, .wd-kb-ev .ag { color: var(--ep-text-muted); }
.wd-tk-rows .ag { padding-left: 30px; }
.wd-tk-rows .av--none { background: transparent; }
.wd-tk-note { margin: 12px 0 0; text-align: center; font-size: 0.82rem; color: var(--ep-text-muted); }

/* ── Tableau ── */
.wd-kb { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.wd-kb-col { display: flex; flex-direction: column; min-height: 240px; padding: 4px 8px 10px; border-radius: var(--wd-r-card); background: #FAF8F5; }
.wd-kb-head { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px; }
.wd-kb-head h2 { margin: 0; font-family: var(--wd-font-sans); font-size: 0.9rem; font-weight: 600; letter-spacing: 0; color: var(--wd-onyx); }
.wd-kb-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #8E867C; flex: none; }
.wd-kb-col.is-in_progress .dot { background: var(--wd-jaune); }
.wd-kb-col.is-completed .dot { background: var(--wd-st-ok); }
.wd-kb-col.is-cancelled .dot { background: var(--wd-hairline-2); }
.wd-kb-count { font-size: 0.78rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-kb-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.wd-kb-card { padding: 12px 14px 10px; border: 1px solid var(--wd-card-border); border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(27, 24, 22, 0.05), 0 10px 20px -16px rgba(27, 24, 22, 0.28); cursor: grab; transition: transform 200ms var(--wd-ease), box-shadow 200ms var(--wd-ease); }
.wd-kb-card:hover { transform: translateY(-1px); box-shadow: 0 1px 2px rgba(27, 24, 22, 0.06), 0 14px 26px -16px rgba(27, 24, 22, 0.34); }
.wd-kb-title { display: block; margin: 0 0 8px; font-size: 0.9rem; font-weight: 600; line-height: 1.35; color: var(--wd-onyx); text-decoration: none; overflow-wrap: anywhere; }
.wd-kb-title:hover { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-kb-meta { display: flex; align-items: center; gap: 10px; min-height: 22px; font-size: 0.78rem; color: var(--ep-text-secondary); }
.wd-kb-meta .d { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.wd-kb-card.is-late .wd-kb-meta .d { color: var(--wd-st-danger); font-weight: 600; }
.wd-kb-meta .pr-t { font-weight: 500; color: #6B4F22; }
.wd-kb-meta .pr-t.is-urgent { color: var(--wd-st-danger); }
.wd-kb-meta .av { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--wd-onyx); color: #fff; font-size: 0.56rem; font-weight: 600; }
.wd-kb-ev { display: flex; align-items: center; gap: 7px; min-width: 0; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--wd-hairline); font-size: 0.78rem; color: var(--ep-text-secondary); }
.wd-kb-ev > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-kb-card.is-done .wd-kb-title { color: var(--ep-text-muted); font-weight: 500; text-decoration: line-through; }
.wd-kb-card.is-done .wd-kb-meta .d { color: var(--ep-text-muted); font-weight: 400; }
.wd-kb-empty { margin: 0; padding: 26px 8px; border: 1px dashed var(--wd-hairline-2); border-radius: 14px; text-align: center; font-size: 0.82rem; color: var(--ep-text-muted); }
.wd-kb-more { display: block; margin-top: 10px; text-align: center; font-size: 0.82rem; font-weight: 500; color: var(--ep-text-secondary); text-decoration: none; }
.wd-kb-more:hover { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wd-jaune); }
.wd-kb .kanban-ghost { opacity: 0.35; background: #fff; border: 1px dashed var(--wd-hairline-2); box-shadow: none; }
.wd-kb .kanban-drag { transform: rotate(1.5deg); box-shadow: var(--wd-shadow-lift); }

/* ── Modale : la fiche défile, la croix flotte ; en modification l'en-tête
   « Modifier la tâche » apparaît. Le corps est injecté en AJAX dans
   .wd-tk-mslot (puis un <form>) : la chaîne flex doit rester continue
   pour que .modal-body défile (piège vécu sur la modale d'étape). ── */
.wd-tk-modal .modal-content { border: 0; border-radius: var(--wd-r-card); overflow: hidden; background: #fff; }
.wd-tk-modal .modal-header { position: absolute; top: 14px; right: 14px; z-index: 3; padding: 0; border: 0; background: transparent; }
.wd-tk-modal .btn-close { width: 32px; height: 32px; margin: 0; padding: 0; border-radius: 10px; background-size: 12px; opacity: 0.55; }
.wd-tk-modal .btn-close:hover { opacity: 1; background-color: var(--wd-papier); }
.wd-tk-modal.is-editing .modal-header, .wd-tk-modal--form .modal-header { position: static; display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 14px; border-bottom: 1px solid var(--wd-hairline); }
.wd-tk-modal .modal-title { font-family: var(--wd-font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.wd-tk-modal--form .modal-dialog, .wd-tk-modal.is-editing .modal-dialog { max-width: 680px; }
.wd-tk-modal .wd-tk-mslot, .wd-tk-modal .wd-tk-mslot > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.wd-tk-modal .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.wd-tk-modal .modal-footer { flex: none; }
.wd-tk-mbody { padding: 26px 32px 6px; }
.wd-tk-mfoot { display: block; padding: 12px 24px 14px; border-top: 1px solid var(--wd-hairline); }
.wd-tk-mfoot > * { margin: 0; }

/* ── Fiche ── */
.wd-tk-head { margin: 0 44px 18px 0; }
.wd-tk-ctx { margin: 0 0 8px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-tk-ctx a { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.wd-tk-ctx a:hover { color: var(--wd-onyx); }
.wd-tk-ctx a:hover > span:last-child { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-tk-ctx .ag { display: inline-flex; align-items: center; gap: 6px; }
.wd-tk-ctx .ag .ms { font-size: 18px; color: var(--ep-text-muted); }
.wd-tk-title { margin: 0; font-size: 1.55rem; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
.wd-tk-title.is-done { color: var(--ep-text-muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.wd-tk-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 6px; border: 1px solid var(--wd-hairline); border-radius: 14px; }
.wd-tk-facts > div { min-width: 0; padding: 12px 14px; border-left: 1px solid var(--wd-hairline); }
.wd-tk-facts > div:first-child { border-left: 0; }
.wd-tk-facts dt { margin: 0 0 5px; font-size: 0.76rem; font-weight: 500; color: var(--ep-text-muted); }
.wd-tk-facts dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; min-width: 0; font-size: 0.88rem; }
.wd-tk-facts dd b { font-weight: 600; color: var(--wd-onyx); min-width: 0; overflow-wrap: anywhere; }
.wd-tk-facts dd small { width: 100%; font-size: 0.78rem; color: var(--ep-text-secondary); }
.wd-tk-facts dd small.late { color: var(--wd-st-danger); font-weight: 500; }
.wd-tk-facts .m { color: var(--ep-text-muted); }
.wd-tk-facts .av, .wd-tk-composer > .av, .wd-tk-comments .av { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--wd-onyx); color: #fff; font-size: 0.6rem; font-weight: 600; }
.wd-tk-facts .pr { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #8E867C; }
.wd-tk-facts .pr.is-low { background: var(--wd-hairline-2); }
.wd-tk-facts .pr.is-high { background: var(--wd-jaune); }
.wd-tk-facts .pr.is-urgent { background: var(--wd-st-danger); }
.wd-tk-sec { padding: 18px 0; border-top: 1px solid var(--wd-hairline); }
.wd-tk-facts + .wd-tk-sec { border-top: 0; }
.wd-tk-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-family: var(--wd-font-sans); font-size: 0.9rem; font-weight: 600; letter-spacing: 0; color: var(--wd-onyx); }
.wd-tk-sec h3 small { font-size: 0.78rem; font-weight: 500; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-tk-desc { font-size: 0.92rem; line-height: 1.6; color: var(--wd-onyx); overflow-wrap: anywhere; }
.wd-tk-desc > :last-child { margin-bottom: 0; }
.wd-tk-empty { margin: 0; font-size: 0.86rem; color: var(--ep-text-muted); }
/* Checklist */
.wd-tk-gauge { height: 3px; margin: -2px 0 8px; border-radius: 2px; background: var(--wd-papier); overflow: hidden; }
.wd-tk-gauge i { display: block; height: 100%; background: var(--wd-jaune); transition: width 300ms var(--wd-ease); }
.wd-tk-gauge i.is-complete { background: var(--wd-st-ok); }
.wd-tk-cl { list-style: none; margin: 0; padding: 0; }
.wd-tk .tcl-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; margin: 0 -8px; padding: 0 8px; border-radius: 8px; background: transparent; border: 0; }
.wd-tk .tcl-item:hover { background: #F9F7F3; }
.wd-tk .tcl-item.is-dragging { opacity: 0.4; }
.wd-tk .tcl-grip { position: absolute; left: -16px; font-size: 18px; color: var(--ep-text-muted); cursor: grab; opacity: 0; transition: opacity 150ms var(--wd-ease); }
.wd-tk .tcl-item:hover .tcl-grip { opacity: 1; }
.wd-tk .tcl-check { appearance: none; -webkit-appearance: none; position: relative; width: 18px; height: 18px; margin: 0; flex: none; border: 1.5px solid var(--wd-hairline-2); border-radius: 6px; background: #fff; cursor: pointer; transition: background 150ms var(--wd-ease), border-color 150ms var(--wd-ease); }
.wd-tk .tcl-check:hover { border-color: var(--wd-onyx); }
.wd-tk .tcl-check:checked { background: var(--wd-onyx) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5l3 3 6-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 12px no-repeat; border-color: var(--wd-onyx); }
.wd-tk .tcl-check:focus-visible { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-tk .tcl-check:disabled { cursor: default; }
.wd-tk .tcl-label { flex: 1; min-width: 0; font-size: 0.9rem; line-height: 1.4; color: var(--wd-onyx); overflow-wrap: anywhere; }
.wd-tk .tcl-item.is-done .tcl-label { color: var(--ep-text-muted); text-decoration: line-through; }
.wd-tk .tcl-delete { width: 28px; height: 28px; flex: none; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ep-text-muted); display: grid; place-items: center; opacity: 0; transition: opacity 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-tk .tcl-delete .ms { font-size: 18px; }
.wd-tk .tcl-item:hover .tcl-delete, .wd-tk .tcl-delete:focus-visible { opacity: 1; }
.wd-tk .tcl-delete:hover { color: var(--wd-st-danger); }
.wd-tk-cl-add { display: flex; align-items: center; gap: 10px; height: 38px; margin: 2px -8px 0; padding: 0 8px; border-radius: 8px; color: var(--ep-text-muted); }
.wd-tk-cl-add .ms { width: 18px; font-size: 18px; text-align: center; }
.wd-tk-cl-add input { flex: 1; min-width: 0; height: 36px; border: 0; outline: 0; background: transparent; font-size: 0.9rem; color: var(--wd-onyx); }
.wd-tk-cl-add input::placeholder { color: var(--ep-text-muted); }
.wd-tk-cl-add:focus-within { background: #F9F7F3; color: var(--wd-onyx); }
/* Pièces jointes */
.wd-tk-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wd-tk-files a { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border: 1px solid var(--wd-hairline); border-radius: 12px; color: var(--wd-onyx); text-decoration: none; font-size: 0.88rem; transition: background 150ms var(--wd-ease); }
.wd-tk-files a:hover { background: #F9F7F3; color: var(--wd-onyx); }
.wd-tk-files .ms { font-size: 20px; color: var(--ep-text-secondary); }
.wd-tk-files .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.wd-tk-files small { font-size: 0.78rem; color: var(--ep-text-muted); }
.wd-tk-files .dl { opacity: 0; transition: opacity 150ms var(--wd-ease); }
.wd-tk-files a:hover .dl { opacity: 1; }
/* Commentaires */
.wd-tk-composer { position: relative; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.wd-tk-composer > .av, .wd-tk-comments .av { width: 30px; height: 30px; font-size: 0.66rem; margin-top: 2px; }
.wd-tk-composer-body { position: relative; flex: 1; min-width: 0; padding: 10px 12px 8px; border: 1px solid var(--wd-hairline-2); border-radius: 12px; background: #fff; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-tk-composer-body:focus-within { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-tk-input { min-height: 42px; outline: 0; font-size: 0.9rem; line-height: 1.5; color: var(--wd-onyx); white-space: pre-wrap; overflow-wrap: anywhere; }
.wd-tk-input:empty::before { content: attr(data-placeholder); color: var(--ep-text-muted); pointer-events: none; }
.wd-tk-composer-acts { display: flex; justify-content: flex-end; margin-top: 6px; }
.wd-tk-composer-acts .wd-ev-btn { height: 32px; padding: 0 12px; font-size: 0.82rem; }
.wd-tk-err { margin-top: 8px; font-size: 0.82rem; color: var(--wd-st-danger); }
.wd-tk .wd-task-mention-menu { left: 0; right: auto; }
.wd-tk-comments { list-style: none; margin: 0; padding: 0; }
.wd-tk-comments li { display: flex; gap: 12px; padding: 12px 0 4px; }
.wd-tk-comments .b { flex: 1; min-width: 0; }
.wd-tk-comments .h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 2px; font-size: 0.84rem; }
.wd-tk-comments .h b { font-weight: 600; color: var(--wd-onyx); }
.wd-tk-comments time { font-size: 0.78rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-tk-comments .del { margin: 0 0 0 auto; align-self: center; }
.wd-tk-comments .del button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ep-text-muted); display: grid; place-items: center; opacity: 0; transition: opacity 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-tk-comments .del .ms { font-size: 18px; }
.wd-tk-comments li:hover .del button, .wd-tk-comments .del button:focus-visible { opacity: 1; }
.wd-tk-comments .del button:hover { color: var(--wd-st-danger); }
.wd-tk-comments .x { font-size: 0.9rem; line-height: 1.5; color: var(--wd-onyx); overflow-wrap: anywhere; }
/* Actions */
.wd-tk-acts { display: flex; align-items: center; gap: 8px; width: 100%; }
.wd-tk-acts form { margin: 0; }
.wd-tk-acts .sp { flex: 1; }
.wd-tk-acts .wd-ev-btn--primary .ms { font-size: 18px; }
.wd-tk-del { height: 38px; padding: 0 6px; border: 0; border-radius: 8px; background: none; font-size: 0.86rem; font-weight: 500; color: var(--wd-st-danger); }
.wd-tk-del:hover { background: var(--wd-st-danger-bg); }
/* En page */
.wd-tk-page { max-width: 820px; }
.wd-tk-card { padding: 26px 32px 20px; }
.wd-tk-card .wd-tk-head { margin-right: 0; }
.wd-tk-card .wd-tk-acts { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--wd-hairline); }

/* ── Formulaire ── */
.wd-tkf .wd-clf-sec:first-of-type { padding-top: 18px; }
.wd-tkf-title { margin-bottom: 12px; }
.wd-tkf-title .form-control { height: 46px; font-size: 1rem; font-weight: 500; }
.wd-tkf-when { grid-template-columns: 190px minmax(0, 1fr); align-items: end; }
.wd-tkf .form-label small { margin-left: 4px; font-weight: 400; color: var(--ep-text-muted); }
.wd-tkf-seg span { padding: 0 12px; }
.wd-tkf-seg input[value="high"]:checked + span, .wd-tkf-seg input[value="in_progress"]:checked + span { background: var(--wd-jaune-pale); color: #6B4F22; box-shadow: none; }
.wd-tkf-seg input[value="urgent"]:checked + span { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); box-shadow: none; }
.wd-tkf-seg input[value="completed"]:checked + span { background: var(--wd-st-ok-bg); color: var(--wd-st-ok); box-shadow: none; }
.wd-tkf-more > summary { display: flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--wd-onyx); }
.wd-tkf-more > summary::-webkit-details-marker { display: none; }
.wd-tkf-more > summary .ms { font-size: 20px; color: var(--ep-text-muted); transition: transform 200ms var(--wd-ease); }
.wd-tkf-more:not([open]) > summary .ms { transform: rotate(-90deg); }
.wd-tkf-more[open] > summary { margin-bottom: 14px; }
.wd-tkf-desc { margin-bottom: 16px; }
.wd-tkf trix-editor { min-height: 110px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font-size: 0.92rem; }
.wd-tkf trix-editor:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); outline: 0; }
/* Barre Trix à plat, comme le composeur de la fiche client : pas de groupes en pilule */
.wd-tkf trix-toolbar .trix-button-row { gap: 0; }
.wd-tkf trix-toolbar .trix-button-group { margin: 0 0 6px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.wd-tkf trix-toolbar .trix-button-group + .trix-button-group { margin-left: 4px; padding-left: 4px; border-left: 1px solid var(--wd-hairline); }
.wd-tkf trix-toolbar .trix-button-group--file-tools, .wd-tkf trix-toolbar .trix-button--icon-code, .wd-tkf trix-toolbar .trix-button--icon-heading-1, .wd-tkf trix-toolbar .trix-button--icon-decrease-nesting-level, .wd-tkf trix-toolbar .trix-button--icon-increase-nesting-level { display: none; }
.wd-tkf trix-toolbar .trix-button, .wd-tkf trix-toolbar .trix-button--icon { width: 30px; height: 30px; border: 0; border-radius: 8px; }
.wd-tkf trix-toolbar .trix-button:hover { background: var(--wd-papier); }
.wd-tkf trix-toolbar .trix-button.trix-active { background: var(--wd-papier); box-shadow: none; }
.wd-tkf .ep-file-dropzone.wd-tkf-drop { flex-direction: row; justify-content: flex-start; gap: 10px; height: 46px; padding: 0 14px; border: 1px dashed var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; text-align: left; }
.wd-tkf .ep-file-dropzone.wd-tkf-drop:hover, .wd-tkf .ep-file-dropzone--active.wd-tkf-drop { border-color: var(--wd-onyx); background: #fff; box-shadow: none; }
.wd-tkf-drop .ms { font-size: 18px; color: var(--ep-text-secondary); }
.wd-tkf-drop .ep-file-dropzone-text, .wd-tkf-drop .ep-file-dropzone-text strong { font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-tkf-drop .ep-file-dropzone-text strong { color: var(--wd-onyx); font-weight: 600; }
.wd-tkf-files { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.wd-tkf-files li { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border: 1px solid var(--wd-hairline); border-radius: 10px; font-size: 0.86rem; }
.wd-tkf-files .ms { font-size: 18px; color: var(--ep-text-secondary); }
.wd-tkf-files .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.wd-tkf-files small { color: var(--ep-text-muted); }
.wd-tkf-files .rm { margin: 0; cursor: pointer; }
.wd-tkf-files .rm input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-tkf-files .rm span { font-size: 0.82rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-tkf-files .rm:hover span { color: var(--wd-st-danger); }
.wd-tkf-files .rm input:checked + span { color: var(--wd-st-danger); }
.wd-tkf-files .rm input:focus-visible + span { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-tkf-files li:has(.rm input:checked) .n { color: var(--ep-text-muted); text-decoration: line-through; }

@media (max-width: 991.98px) {
    .wd-tk-rows .ev { width: 160px; }
    .wd-kb { grid-template-columns: repeat(4, minmax(240px, 82vw)); scroll-snap-type: x mandatory; }
    .wd-kb-col { scroll-snap-align: start; }
}
@media (max-width: 767.98px) {
    .wd-tk-filters .dropdown { max-width: 100%; }
    /* Ligne sur deux étages : case | titre · priorité / échéance · événement */
    .wd-tk-rows li { display: grid; grid-template-columns: 18px auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; padding: 9px 10px; align-items: center; }
    .wd-tk-rows .wd-retro-tick, .wd-tk-rows > li > .wd-retro-box { grid-column: 1; grid-row: 1 / span 2; align-self: start; margin-top: 1px; }
    .wd-tk-rows .t { grid-column: 2 / 4; grid-row: 1; white-space: normal; }
    .wd-tk-rows .pr { grid-column: 4; grid-row: 1; }
    .wd-tk-rows .when { grid-column: 2; grid-row: 2; width: auto; font-size: 0.78rem; }
    .wd-tk-rows .ev { grid-column: 3 / 5; grid-row: 2; width: auto; font-size: 0.78rem; }
    .wd-tk-rows .ev .wd-tk-evav { display: none; }
    .wd-tk-rows .ev::before { content: '·'; margin-right: 6px; color: var(--ep-text-muted); }
    .wd-tk-rows .ev, .wd-tk-rows .ev a { display: flex; align-items: center; }
    .wd-tk-rows .ag { padding-left: 0; }
    .wd-tk-rows .cl, .wd-tk-rows .av { display: none; }
    .wd-tk-mbody { padding: 20px 16px 4px; }
    .wd-tk-mfoot { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
    .wd-tk-head { margin-bottom: 14px; }
    .wd-tk-title { font-size: 1.3rem; }
    .wd-tk-facts { grid-template-columns: 1fr 1fr; }
    .wd-tk-facts > div:nth-child(3) { border-left: 0; }
    .wd-tk-facts > div:nth-child(n + 3) { border-top: 1px solid var(--wd-hairline); }
    .wd-tk-acts { flex-wrap: wrap; }
    .wd-tk-acts .sp { display: none; }
    .wd-tk-acts > form:first-child { order: 3; width: 100%; text-align: center; }
    .wd-tk-acts > .wd-ev-btn, .wd-tk-acts > form:not(:first-child) { flex: 1 1 0; }
    .wd-tk-acts > form:not(:first-child) .wd-ev-btn, .wd-tk-acts > .wd-ev-btn { width: 100%; justify-content: center; white-space: nowrap; }
    .wd-tk-acts > form:last-child:not(:first-child) { flex-grow: 1.8; }
    .wd-tk-card { padding: 20px 16px 16px; }
    .wd-tkf-when { grid-template-columns: 1fr; }
}
@media (hover: none) {
    .wd-tk .tcl-grip { display: none; }
    .wd-tk .tcl-delete, .wd-tk-comments .del button { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-kb-card, .wd-tk-gauge i, .wd-tk-evbtn .ms, .wd-tk-retro .ms { transition: none; }
}

/* ============================================================
   QUESTIONNAIRES — registre (pour qui, questions, réponses déjà
   remplies, statut ; ceux qu'on peut remplir d'abord), création en
   modale (nom + pour qui), constructeur réorganisé d'après la revue UX
   du 23/10 (cartes éditées sur place, sections reliées par un filet,
   creux d'ajout, menus flottants, suppression annulable), formulaire de
   remplissage et lecture d'une réponse dans la même grammaire.
   ============================================================ */
/* A. Registre */
.wd-qn-av .ms { font-size: 18px; line-height: 1; }
.wd-qn-av.is-off { background: var(--wd-papier); color: var(--ep-text-muted); }
.wd-qn-none { color: var(--ep-text-muted); font-weight: 400; }
.wd-qn-reg .cell-name .wd-cell-sub { font-weight: 400; }
.wd-qn-m { display: none; }
.wd-qn-first .wd-ev-submit { display: inline-flex; margin-top: 10px; text-decoration: none; }
@media (max-width: 767.98px) {
    /* Téléphone : lists.css ne garde que le nom, le statut et le menu */
    .wd-qn-reg .wd-qn-d { display: none; }
    .wd-qn-reg .wd-qn-m { display: block; }
}

/* B. Nom et destinataire (modale du registre, du constructeur, pages de repli) */
.wd-qn-modal .modal-content { border: 0; border-radius: var(--wd-r-card); box-shadow: var(--wd-shadow-lift); }
.wd-qn-modal .modal-header { border-bottom: 0; padding: 20px 24px 4px; }
.wd-qn-modal .modal-title { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.wd-qn-body { padding: 12px 24px 8px; }
.wd-qn-f { margin: 0 0 18px; }
.wd-qn-f:last-child { margin-bottom: 8px; }
.wd-qn-for { border: 0; padding: 0; min-width: 0; }
.wd-qn-for legend { float: none; width: auto; margin-bottom: 6px; padding: 0; }
.wd-qn-for input:disabled + span { cursor: not-allowed; }
.wd-qn-for-help { margin: 8px 0 0; font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-qn-for:has(input[value="vendor"]:checked) .wd-qn-for-help[data-for="client"],
.wd-qn-for:has(input[value="client"]:checked) .wd-qn-for-help[data-for="vendor"] { display: none; }
.wd-qn-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 24px 18px; border-top: 0; }
.wd-qn-foot > * { margin: 0; }
.wd-qn-foot .wd-ev-submit, .wd-qn-foot .wd-ev-btn { height: 40px; padding: 0 16px; }
.wd-qn-hint { margin: 0; font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-qn-hint.is-error { color: var(--wd-st-danger); }
.wd-qn-page { max-width: 560px; }
.wd-qn-page-title { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.02em; margin: 6px 0 18px; }
.wd-qn-card { background: #fff; border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); padding: 22px 24px 10px; }
.wd-qn-page .wd-qn-foot { padding: 16px 0 0; }

/* C. Constructeur — en-tête */
.wd-qb-crumb { margin-bottom: 18px; }
.wd-qb-save { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--ep-text-muted); min-height: 20px; }
.wd-qb-save .ms { font-size: 16px; }
.wd-qb-save.is-saving .ms { animation: wd-qb-spin 900ms linear infinite; }
.wd-qb-save.is-saved { color: var(--wd-st-ok); }
.wd-qb-save.is-error { color: var(--wd-st-danger); background: var(--wd-st-danger-bg); padding: 2px 10px 2px 8px; border-radius: 8px; }
.wd-qb-save.is-error button { border: 0; background: none; padding: 0; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@keyframes wd-qb-spin { to { transform: rotate(360deg); } }
.wd-qb-cover { margin-bottom: 28px; }
.wd-qb-cover .wd-qb-consequence { color: rgba(255, 255, 255, 0.62); }
.wd-qb-cover .wd-cl-primary:disabled { cursor: not-allowed; transform: none; box-shadow: none; }
.wd-qb-cover .wd-cl-status-menu .dropdown-item:disabled { opacity: 0.45; }
.wd-qb-activate { display: inline-flex; }
.wd-qb-activate-phone, .wd-qb-menu-phone { display: none; }
.wd-qb-menu-note { color: var(--ep-text-secondary); font-size: 0.8rem; white-space: normal; max-width: 240px; }

/* La colonne */
.wd-qb-doc { max-width: 720px; margin: 0 auto 80px; }
.wd-qb-intro { display: block; width: 100%; resize: none; overflow: hidden; margin: 0 0 22px; padding: 12px 16px; border: 1px solid transparent; border-radius: var(--wd-r-panel); background: transparent; font-size: 0.95rem; line-height: 1.55; color: var(--ep-text-secondary); transition: border-color 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-qb-intro:placeholder-shown { border: 1px dashed var(--wd-hairline-2); }
.wd-qb-intro:hover { background: #FAF8F5; }
.wd-qb-intro:focus { outline: 0; background: #fff; border: 1px solid var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); color: var(--wd-onyx); }
.wd-qb-intro::placeholder, .wd-qb-sec-desc::placeholder { color: var(--ep-text-muted); }
.wd-qb-list { display: flex; flex-direction: column; gap: 12px; }
.wd-qb-list:empty { display: none; }

/* Une question */
.wd-qb-q { position: relative; padding: 16px 20px 18px 36px; background: #fff; border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-panel); box-shadow: 0 1px 2px rgba(27, 24, 22, 0.05); cursor: pointer; transition: box-shadow 200ms var(--wd-ease), border-color 200ms var(--wd-ease), transform 200ms var(--wd-ease); }
.wd-qb-q:hover { box-shadow: var(--wd-card-shadow); }
.wd-qb-q:focus-visible { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-qb-q.is-editing { cursor: default; border-color: var(--wd-hairline-2); box-shadow: inset 3px 0 0 var(--wd-jaune), var(--wd-card-shadow); }
.wd-qb-q.is-retired { cursor: default; border-style: dashed; box-shadow: none; opacity: 0.75; }
.wd-qb-grip { position: absolute; left: 8px; top: 15px; width: 22px; height: 26px; display: grid; place-items: center; border-radius: 6px; color: var(--ep-text-muted); cursor: grab; opacity: 0; transition: opacity 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-qb-grip .ms { font-size: 18px; }
.wd-qb-grip:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-qb-item:hover > .wd-qb-grip, .wd-qb-item:focus-within > .wd-qb-grip, .wd-qb-sec-head:hover > .wd-qb-grip, .wd-qb-sec-head:focus-within > .wd-qb-grip { opacity: 1; }
.wd-qb-more { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ep-text-secondary); opacity: 0; transition: opacity 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-qb-more .ms { font-size: 20px; }
.wd-qb-more:hover, .wd-qb-more[aria-expanded="true"] { background: var(--wd-papier); color: var(--wd-onyx); opacity: 1; }
.wd-qb-q:hover > .wd-qb-more, .wd-qb-q:focus-within > .wd-qb-more, .wd-qb-q.is-editing > .wd-qb-more, .wd-qb-more:focus-visible { opacity: 1; }
.wd-qb-q-top { display: flex; align-items: flex-start; gap: 12px; padding-right: 30px; }
.wd-qb-q-label { flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--wd-font-display); font-weight: 600; font-size: 1rem; line-height: 1.35; color: var(--wd-onyx); overflow-wrap: anywhere; }
.wd-qb-req { margin-left: 3px; color: var(--wd-jaune); font-weight: 600; }
.wd-qb-q-type { flex: none; display: inline-flex; align-items: center; gap: 5px; margin-top: 1px; font-size: 0.78rem; color: var(--ep-text-muted); white-space: nowrap; }
.wd-qb-q-type .ms { font-size: 16px; }
.wd-qb-q-help { margin: 4px 0 0; font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-qb-q-ctl { margin-top: 12px; pointer-events: none; }

/* Une question en édition */
.wd-qb-q-edit .wd-qb-q-top { align-items: center; }
.wd-qb-q-input { flex: 1 1 auto; min-width: 0; height: 40px; margin: -4px 0 -4px -10px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--wd-r-ctl); background: #FAF8F5; font-family: var(--wd-font-display); font-weight: 600; font-size: 1rem; color: var(--wd-onyx); }
.wd-qb-q-input:focus { outline: 0; background: #fff; border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-qb-typemenu { flex: none; }
.wd-qb-typebtn { height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 10px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; font-size: 0.84rem; font-weight: 500; color: var(--wd-onyx); white-space: nowrap; }
.wd-qb-typebtn .ms { font-size: 18px; color: var(--ep-text-secondary); }
.wd-qb-typebtn .wd-qb-caret { font-size: 18px; }
.wd-qb-typebtn:hover { background: var(--wd-papier); }
.wd-qb-typelist .dropdown-item.active { background: var(--wd-papier); color: var(--wd-onyx); font-weight: 600; }
.wd-qb-help-input { display: block; width: 100%; height: 34px; margin: 8px 0 0 -10px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-qb-help-input[hidden] { display: none; }
.wd-qb-help-input:hover { background: #FAF8F5; }
.wd-qb-help-input:focus { outline: 0; background: #fff; border-color: var(--wd-hairline-2); color: var(--wd-onyx); }
.wd-qb-opts { list-style: none; margin: 14px 0 6px; padding: 0; counter-reset: wd-qb-opt; }
.wd-qb-opt { display: flex; align-items: center; gap: 10px; min-height: 38px; counter-increment: wd-qb-opt; }
.wd-qb-opt-mark { flex: none; width: 18px; height: 18px; display: grid; place-items: center; border: 1.5px solid var(--wd-hairline-2); border-radius: 50%; cursor: grab; font-size: 0.72rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-qb-opts[data-shape="checkbox"] .wd-qb-opt-mark { border-radius: 5px; }
.wd-qb-opts[data-shape="select"] .wd-qb-opt-mark { border: 0; }
.wd-qb-opts[data-shape="select"] .wd-qb-opt-mark::before { content: counter(wd-qb-opt) "."; }
.wd-qb-opt.is-ghost .wd-qb-opt-mark { border-style: dashed; cursor: default; }
.wd-qb-opts[data-shape="select"] .wd-qb-opt.is-ghost .wd-qb-opt-mark::before { content: '+'; }
.wd-qb-opt input { flex: 1 1 auto; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 0.9rem; color: var(--wd-onyx); }
.wd-qb-opt input:hover { background: #FAF8F5; }
.wd-qb-opt input:focus { outline: 0; background: #fff; border-color: var(--wd-hairline-2); }
.wd-qb-opt.is-ghost input::placeholder { color: var(--ep-text-muted); }
.wd-qb-opt-del { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ep-text-muted); opacity: 0; transition: opacity 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-qb-opt-del .ms { font-size: 18px; }
.wd-qb-opt:hover .wd-qb-opt-del, .wd-qb-opt:focus-within .wd-qb-opt-del { opacity: 1; }
.wd-qb-opt-del:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-qb-opt.sortable-ghost { opacity: 0.4; }
.wd-qb-switch { display: inline-flex; align-items: center; gap: 9px; margin: 6px 0 0; font-size: 0.86rem; color: var(--wd-onyx); cursor: pointer; user-select: none; }
.wd-qb-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-qb-switch-ui { position: relative; flex: none; width: 32px; height: 19px; border-radius: 999px; background: var(--wd-hairline-2); transition: background 180ms var(--wd-ease); }
.wd-qb-switch-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 180ms var(--wd-ease); }
.wd-qb-switch input:checked + .wd-qb-switch-ui { background: var(--wd-onyx); }
.wd-qb-switch input:checked + .wd-qb-switch-ui::after { transform: translateX(13px); }
.wd-qb-switch input:focus-visible + .wd-qb-switch-ui { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-qb-accept { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 4px; }
.wd-qb-accept-l { width: 100%; font-size: 0.84rem; font-weight: 500; color: var(--wd-onyx); margin-bottom: 2px; }
.wd-qb-chip { margin: 0; cursor: pointer; }
.wd-qb-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-qb-chip span { height: 30px; padding: 0 11px; display: inline-flex; align-items: center; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-chip); font-size: 0.82rem; font-weight: 500; color: var(--ep-text-secondary); transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease), border-color 150ms var(--wd-ease); }
.wd-qb-chip input:checked + span { background: var(--wd-onyx); border-color: var(--wd-onyx); color: #fff; }
.wd-qb-chip input:focus-visible + span { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-qb-q-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--wd-hairline); }
.wd-qb-q-foot .wd-qb-switch { margin: 0 0 0 auto; }
.wd-qb-link { border: 0; background: none; padding: 0; font-size: 0.84rem; font-weight: 500; color: var(--ep-text-secondary); text-decoration: underline; text-decoration-color: var(--wd-hairline-2); text-underline-offset: 3px; }
.wd-qb-link:hover { color: var(--wd-onyx); text-decoration-color: var(--wd-jaune); text-decoration-thickness: 2px; }
.wd-qb-link + .wd-qb-link { margin-left: 14px; }

/* Une section : un plateau numéroté ; son en-tête reste collé en haut pendant
   qu'on parcourt ses questions (titre et actions toujours sous la main) */
.wd-qb-list { counter-reset: wd-qb-sec; }
.wd-qb-sec { position: relative; margin: 10px 0 6px; padding: 0 14px 14px; background: #F8F6F2; border: 1px solid #EEE9E1; border-radius: var(--wd-r-card); counter-increment: wd-qb-sec; }
.wd-qb-sec.is-removing { counter-increment: none; }
.wd-qb-list > .wd-qb-sec:first-child { margin-top: 0; }
.wd-qb-sec-head { position: sticky; top: var(--wd-qb-top, 64px); z-index: 4; display: flex; align-items: flex-start; gap: 8px; margin: 0 -14px; padding: 14px 12px 12px 40px; background: #F8F6F2; border-radius: var(--wd-r-card) var(--wd-r-card) 0 0; }
.wd-qb-sec.is-collapsed { padding-bottom: 0; }
.wd-qb-sec.is-collapsed .wd-qb-sec-head { border-radius: var(--wd-r-card); }
.wd-qb-sec-head > .wd-qb-grip { left: 10px; top: 17px; }
.wd-qb-sec-head > .wd-qb-more { position: static; flex: none; opacity: 1; margin-top: 2px; }
.wd-qb-sec-num { flex: none; width: 30px; height: 30px; margin-top: 3px; display: grid; place-items: center; border-radius: 9px; background: var(--wd-jaune-pale); color: #6B4F22; font-family: var(--wd-font-display); font-weight: 600; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.wd-qb-sec-num::before { content: counter(wd-qb-sec); }
.wd-qb-sec-toggle { flex: none; width: 32px; height: 32px; display: grid; place-items: center; margin-top: 2px; border: 0; border-radius: 8px; background: transparent; color: var(--ep-text-secondary); }
.wd-qb-sec-toggle .ms { font-size: 22px; transition: transform 200ms var(--wd-ease); }
.wd-qb-sec-toggle:hover { background: rgba(27, 24, 22, 0.06); color: var(--wd-onyx); }
.wd-qb-sec.is-collapsed .wd-qb-sec-toggle .ms { transform: rotate(-90deg); }
.wd-qb-sec-titles { flex: 1 1 auto; min-width: 0; }
.wd-qb-sec-title { display: block; width: 100%; height: 36px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--wd-r-ctl); background: transparent; font-family: var(--wd-font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.015em; color: var(--wd-onyx); }
.wd-qb-sec-desc { display: block; width: 100%; resize: none; overflow: hidden; min-height: 28px; padding: 3px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 0.86rem; line-height: 1.45; color: var(--ep-text-secondary); }
.wd-qb-sec-desc:placeholder-shown { opacity: 0; transition: opacity 150ms var(--wd-ease); }
.wd-qb-sec-head:hover .wd-qb-sec-desc:placeholder-shown, .wd-qb-sec-desc:focus { opacity: 1; }
.wd-qb-sec-title:hover, .wd-qb-sec-desc:hover { background: rgba(255, 255, 255, 0.7); }
.wd-qb-sec-title:focus, .wd-qb-sec-desc:focus { outline: 0; background: #fff; border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-qb-sec-count { flex: none; margin-top: 9px; font-size: 0.8rem; color: var(--ep-text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wd-qb-sec-body { padding: 2px 0 0; }
.wd-qb-sec.is-collapsed .wd-qb-sec-body, .wd-qb-list.is-moving-sections .wd-qb-sec-body { display: none; }
.wd-qb-sec-list { display: flex; flex-direction: column; gap: 10px; min-height: 8px; }
.wd-qb-sec-body { position: relative; }
/* Section vide : la zone de dépôt a la taille du message, pour qu'on puisse y lâcher une question */
.wd-qb-sec.is-empty .wd-qb-sec-list { min-height: 52px; border: 1px dashed var(--wd-hairline-2); border-radius: var(--wd-r-panel); background: rgba(255, 255, 255, 0.5); }
.wd-qb-sec-empty { display: none; position: absolute; top: 2px; left: 0; right: 0; height: 52px; margin: 0; align-items: center; justify-content: center; font-size: 0.84rem; color: var(--ep-text-secondary); pointer-events: none; }
.wd-qb-sec.is-empty .wd-qb-sec-empty { display: flex; }
.wd-qb-sec.is-empty .wd-qb-sec-list:has(> .wd-qb-item) + .wd-qb-sec-empty { display: none; }
.wd-qb-sec-adds { display: flex; gap: 10px; margin-top: 10px; }
.wd-qb-sec-adds .wd-qb-add { flex: 1 1 0; min-width: 0; background: rgba(255, 255, 255, 0.6); }
/* Deux niveaux au plus : une sous-section ne propose pas d'en ajouter une autre */
.wd-qb-sec-list .wd-qb-add-sub { display: none; }

/* Une sous-section : la même carte rangée dans une section, en plus léger —
   plateau blanc voilé, numéro 1.1 sans pastille, en-tête qui ne colle pas
   (celui de la section le fait déjà) */
.wd-qb-sec-list { counter-reset: wd-qb-sub; }
.wd-qb-sec-list > .wd-qb-sec { margin: 4px 0; padding: 0 12px 12px; background: rgba(255, 255, 255, 0.55); border-color: #EAE4DA; border-radius: var(--wd-r-panel); counter-increment: wd-qb-sub; }
.wd-qb-sec-list > .wd-qb-sec.is-removing { counter-increment: none; }
.wd-qb-sec-list > .wd-qb-sec > .wd-qb-sec-head { position: relative; top: auto; z-index: auto; margin: 0 -12px; padding: 10px 10px 8px 36px; background: transparent; }
.wd-qb-sec-list > .wd-qb-sec > .wd-qb-sec-head > .wd-qb-grip { left: 8px; top: 12px; }
.wd-qb-sec-list > .wd-qb-sec .wd-qb-sec-num { width: auto; min-width: 30px; height: 26px; margin-top: 4px; padding: 0 4px; background: transparent; border: 1px solid var(--wd-jaune-pale); border-radius: 8px; font-size: 0.8rem; }
.wd-qb-sec-list > .wd-qb-sec .wd-qb-sec-num::before { content: counter(wd-qb-sec) "." counter(wd-qb-sub); }
.wd-qb-sec-list > .wd-qb-sec .wd-qb-sec-title { height: 32px; font-size: 1.02rem; }
.wd-qb-sec-list > .wd-qb-sec .wd-qb-sec-count { margin-top: 7px; }
.wd-qb-sec-list > .wd-qb-sec .wd-qb-sec-toggle, .wd-qb-sec-list > .wd-qb-sec > .wd-qb-sec-head > .wd-qb-more { margin-top: 1px; }
.wd-qb-sec-list > .wd-qb-sec .wd-qb-add { height: 40px; }

/* La barre d'ajout : en face du point d'insertion (bureau), bouton flottant (téléphone) */
.wd-qb-doc { position: relative; }
.wd-qb-tools { position: absolute; top: 0; right: -66px; z-index: 6; display: flex; flex-direction: column; gap: 4px; padding: 5px; background: #fff; border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-panel); box-shadow: var(--wd-card-shadow); transition: transform 220ms var(--wd-ease); }
.wd-qb-tools[hidden] { display: none; }
.wd-qb-tool { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--wd-r-ctl); background: transparent; color: var(--ep-text-secondary); transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease), transform 150ms var(--wd-ease); }
.wd-qb-tool .ms { font-size: 21px; }
.wd-qb-tool:hover, .wd-qb-tool[aria-expanded="true"] { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-qb-tool.is-main { background: var(--wd-onyx); color: #fff; }
.wd-qb-tool.is-main:hover, .wd-qb-tool.is-main[aria-expanded="true"] { background: #000; color: #fff; transform: scale(1.04); }
.wd-qb-tool.is-main .ms { font-size: 24px; }
.wd-qb-picker:not(.is-sheet) .wd-qb-pop-extra { display: none; }
/* Où arrivera la question : un trait doré dans l'interstice */
.wd-qb-item.is-insert-after::after, .wd-qb-list.is-insert-start::before, .wd-qb-sec-list.is-insert-start::before { content: ''; display: block; height: 3px; border-radius: 3px; background: var(--wd-jaune); pointer-events: none; }
.wd-qb-item.is-insert-after::after { position: absolute; left: 12px; right: 12px; bottom: -7px; z-index: 2; }
.wd-qb-sec.is-insert-after::after { bottom: -8px; }
.wd-qb-list.is-insert-start::before, .wd-qb-sec-list.is-insert-start::before { margin: -6px 12px 3px; }

/* Les creux d'ajout */
.wd-qb-add { width: 100%; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; font-size: 0.88rem; font-weight: 500; color: var(--ep-text-secondary); transition: border-color 150ms var(--wd-ease), color 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-qb-add .ms { font-size: 19px; }
.wd-qb-add:hover, .wd-qb-add[aria-expanded="true"] { border-color: var(--wd-onyx); color: var(--wd-onyx); background: #FAF8F5; }
.wd-qb-end { margin-top: 18px; }
.wd-qb-end-acts { display: flex; gap: 10px; }
.wd-qb-end-acts .wd-qb-add { height: 54px; }
.wd-qb-reuse { display: inline-flex; align-items: center; gap: 6px; margin: 14px auto 0; padding: 4px 6px; border: 0; background: none; font-size: 0.84rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-qb-end .wd-qb-reuse { display: flex; }
.wd-qb-reuse .ms { font-size: 17px; }
.wd-qb-reuse > span:last-child { text-decoration: underline; text-decoration-color: var(--wd-hairline-2); text-underline-offset: 3px; }
.wd-qb-reuse:hover { color: var(--wd-onyx); }
.wd-qb-reuse:hover > span:last-child { text-decoration-color: var(--wd-jaune); text-decoration-thickness: 2px; }
.wd-qb-empty { padding: 40px 24px; border: 1px dashed var(--wd-hairline-2); border-radius: var(--wd-r-card); text-align: center; }
.wd-qb-empty > .ms { font-size: 32px; color: var(--ep-text-muted); }
.wd-qb-empty h2 { margin: 8px 0 4px; font-size: 1.1rem; }
.wd-qb-empty p { margin: 0 auto 18px; max-width: 46ch; font-size: 0.9rem; color: var(--ep-text-secondary); }
.wd-qb-empty-acts { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.wd-qb-empty-acts .wd-ev-submit, .wd-qb-empty-acts .wd-ev-btn { height: 42px; padding: 0 16px; display: inline-flex; align-items: center; gap: 6px; }
.wd-qb-empty-acts .ms { font-size: 19px; }

/* Arrivée, départ, glisser */
.wd-qb-item.is-arrived { animation: wd-qb-arrive 650ms var(--wd-ease); }
.wd-qb-sec.is-arrived { animation: wd-qb-arrive-flat 650ms var(--wd-ease); }
@keyframes wd-qb-arrive { from { transform: translateY(6px); box-shadow: 0 0 0 2px var(--wd-jaune), var(--wd-card-shadow); } to { transform: none; } }
@keyframes wd-qb-arrive-flat { from { box-shadow: 0 0 0 2px var(--wd-jaune); } to { box-shadow: 0 0 0 0 transparent; } }
.wd-qb-item.is-removing { display: none; }
.wd-qb-item.is-ghost { opacity: 0.35; }
.wd-qb-item.is-dragged { box-shadow: var(--wd-shadow-lift); }

/* Menus flottants (types, ⋯) — feuille du bas sur téléphone */
.wd-qb-pop { position: fixed; z-index: 1085; min-width: 240px; max-width: calc(100vw - 24px); max-height: min(70vh, 460px); overflow-y: auto; padding: 6px; background: #fff; border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-panel); box-shadow: var(--wd-shadow-lift); animation: wd-qb-pop 160ms var(--wd-ease); }
.wd-qb-pop[hidden] { display: none; }
@keyframes wd-qb-pop { from { opacity: 0; transform: translateY(-4px); } }
.wd-qb-pop hr { margin: 6px 4px; border: 0; border-top: 1px solid var(--wd-hairline); opacity: 1; }
.wd-qb-pop-title { margin: 4px 10px 6px; font-size: 0.78rem; font-weight: 500; color: var(--ep-text-muted); }
.wd-qb-picker .wd-qb-pop-title { display: none; }
.wd-qb-pop-item { width: 100%; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 0.88rem; color: var(--wd-onyx); text-align: left; }
.wd-qb-pop-item .ms { font-size: 20px; color: var(--ep-text-secondary); }
.wd-qb-pop-item:hover, .wd-qb-pop-item:focus-visible { background: var(--wd-papier); outline: 0; }
.wd-qb-pop-item:disabled { opacity: 0.4; background: none; }
.wd-qb-pop-item.is-danger, .wd-qb-pop-item.is-danger .ms { color: var(--wd-st-danger); }
.wd-qb-pop-item.is-sub { padding-left: 26px; }
.wd-qb-pop-item.is-sub .ms { font-size: 18px; }
.wd-qb-pop-item.is-danger:hover { background: var(--wd-st-danger-bg); }
.wd-qb-pop.is-sheet { top: auto !important; left: 0 !important; right: 0; bottom: 0; max-width: none; max-height: 75vh; border-radius: 18px 18px 0 0; padding: 10px 10px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 0 0 100vmax rgba(27, 24, 22, 0.32); animation: wd-qb-sheet 220ms var(--wd-ease); }
.wd-qb-pop.is-sheet .wd-qb-pop-title { display: block; margin: 6px 12px 10px; font-family: var(--wd-font-display); font-size: 1rem; font-weight: 600; color: var(--wd-onyx); }
.wd-qb-pop.is-sheet .wd-qb-pop-item { height: 48px; font-size: 0.95rem; }
@keyframes wd-qb-sheet { from { transform: translateY(100%); } }

/* Notification (suppression annulable, erreurs) */
.wd-qb-toast { position: fixed; z-index: 1090; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; max-width: calc(100vw - 32px); padding: 10px 10px 10px 18px; border-radius: 12px; background: var(--wd-onyx); color: #fff; font-size: 0.88rem; box-shadow: var(--wd-shadow-lift); }
.wd-qb-toast[hidden] { display: none; }
.wd-qb-toast.is-in { animation: wd-qb-toast 220ms var(--wd-ease); }
@keyframes wd-qb-toast { from { opacity: 0; transform: translate(-50%, 8px); } }
.wd-qb-toast-act { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.1); color: var(--wd-jaune); font-weight: 600; font-size: 0.86rem; }
.wd-qb-toast-act:hover { background: rgba(255, 255, 255, 0.18); }
.wd-qb-danger { background: var(--wd-st-danger); }
.wd-qb-danger:hover { background: #962f25; }

/* D. Remplissage (modale), aperçu du constructeur, lecture d'une réponse */
.ep-qr-modal .modal-content { border: 0; border-radius: var(--wd-r-card); box-shadow: var(--wd-shadow-lift); }
.ep-qr-modal .modal-header { border-bottom: 1px solid var(--wd-hairline); padding: 18px 24px; }
.ep-qr-modal .modal-title { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.ep-qr-modal .modal-body { padding: 20px 24px 0; }
.ep-qr-fill .qrf-intro { margin: 0 0 22px; padding: 0; border: 0; font-size: 0.92rem; color: var(--ep-text-secondary); }
.ep-qr-fill .qrf-sections { gap: 30px; }
.ep-qr-fill .qrf-section { border: 0; border-radius: 0; overflow: visible; background: transparent; }
.ep-qr-fill .qrf-section-head { padding: 0 0 8px; border: 0; border-bottom: 1px solid var(--wd-hairline); background: transparent; }
.ep-qr-fill .qrf-section-title { font-family: var(--wd-font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; text-transform: none; color: var(--wd-onyx); }
.ep-qr-fill .qrf-section-chevron { font-size: 22px; color: var(--ep-text-muted); transition: transform 200ms var(--wd-ease); }
.ep-qr-fill .qrf-section.is-collapsed .qrf-section-chevron { transform: rotate(-90deg); }
.ep-qr-fill .qrf-section.is-collapsed .qrf-section-body { display: none; }
.ep-qr-fill .qrf-section-body { padding: 16px 0 0; gap: 20px; }
.ep-qr-fill .qrf-section--loose .qrf-section-body { padding-top: 0; }
.ep-qr-fill .qrf-section-desc { font-style: normal; font-size: 0.86rem; margin-top: -4px; }
.ep-qr-fill .qrf-field { gap: 7px; }
.ep-qr-fill .qrf-label { font-size: 0.9rem; font-weight: 600; color: var(--wd-onyx); }
/* Sous-section : un intertitre et un filet, ses questions décalées d'un cran */
.ep-qr-fill .qrf-sub { display: flex; flex-direction: column; gap: 20px; padding-left: 16px; border-left: 2px solid var(--wd-hairline); }
.ep-qr-fill .qrf-sub-title { margin: 2px 0 -6px; font-family: var(--wd-font-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--wd-onyx); }
.ep-qr-fill .qrf-sub-desc { margin: -4px 0 -2px; font-size: 0.84rem; color: var(--ep-text-secondary); }
.ep-qr-fill .qrf-sub .qrf-label { font-weight: 500; }
.ep-qr-fill .qrf-req { color: var(--wd-jaune); margin-left: 3px; }
.ep-qr-fill .qrf-help { margin-top: -3px; font-size: 0.82rem; color: var(--ep-text-secondary); }
.ep-qr-fill .form-control, .ep-qr-fill .form-select { height: 42px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font-size: 0.92rem; background-color: #fff; }
.ep-qr-fill textarea.form-control { height: auto; min-height: 42px; }
.ep-qr-fill .form-control:focus, .ep-qr-fill .form-select:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.ep-qr-fill trix-editor { border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); }
.ep-qr-fill .qrf-options { gap: 6px; }
.ep-qr-fill .qrf-option { min-height: 42px; padding: 8px 12px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font-size: 0.9rem; color: var(--wd-onyx); }
.ep-qr-fill .qrf-option:hover { border-color: var(--wd-onyx); background: #fff; }
.ep-qr-fill .qrf-option:has(:checked) { border-color: var(--wd-onyx); background: #FAF8F5; }
.ep-qr-fill .qrf-option .form-check-input:checked { background-color: var(--wd-onyx); border-color: var(--wd-onyx); }
.ep-qr-fill .qrf-other { margin-top: 8px; }
.ep-qr-fill .qrf-drop { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px; border: 1px dashed var(--wd-hairline-2); border-radius: 12px; background: #fff; font-size: 0.88rem; color: var(--ep-text-secondary); text-align: center; cursor: pointer; }
.ep-qr-fill .qrf-drop .ms { font-size: 22px; color: var(--ep-text-muted); }
.ep-qr-fill .qrf-drop small { font-size: 0.78rem; color: var(--ep-text-muted); }
.ep-qr-fill .qrf-empty { margin: 0; color: var(--ep-text-secondary); }
.ep-qr-fill .qrf-actions { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 26px -24px 0; padding: 14px 24px 18px; border-top: 1px solid var(--wd-hairline); background: #fff; }
.ep-qr-fill .qrf-actions .wd-ev-submit, .ep-qr-fill .qrf-actions .wd-ev-btn { height: 40px; padding: 0 16px; }
.ep-qr-fill .qrf-preview-note { margin: 0 auto 0 0; display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; color: var(--ep-text-secondary); }
.ep-qr-fill .qrf-preview-note .ms { font-size: 18px; }
/* Le contrôle tel qu'au remplissage, dans la carte du constructeur */
.wd-qb-q-ctl.ep-qr-fill .form-control, .wd-qb-q-ctl.ep-qr-fill .form-select { height: 38px; background-color: #FDFCFA; }
.wd-qb-q-ctl.ep-qr-fill textarea.form-control { height: 64px; }
.wd-qb-q-ctl.ep-qr-fill .qrf-option { min-height: 38px; padding: 6px 12px; background: #FDFCFA; }
.wd-qb-q-ctl.ep-qr-fill .qrf-drop { padding: 14px; background: #FDFCFA; }

/* Lecture d'une réponse : la même grammaire, sans capitales */
.ep-qr-view .qr-eyebrow { font-size: 0.8rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ep-text-muted); }
.ep-qr-view .qr-doc-title { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.02em; }
.ep-qr-view .qr-doc-subtitle .sep { color: var(--ep-text-muted); }
.ep-qr-view .qr-meta-k { font-size: 0.76rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ep-text-muted); }
.ep-qr-view .qr-meta-v { font-size: 0.88rem; font-weight: 500; }
.ep-qr-view .qr-status { background: var(--wd-st-ok-bg); color: var(--wd-st-ok); border: 0; font-weight: 500; }
.ep-qr-view .qr-status .dot { background: var(--wd-st-ok); }
.ep-qr-view .qr-rule { height: 1px; margin: 0 0 22px; background: var(--wd-hairline); }
.ep-qr-view .qr-sections { gap: 26px; }
.ep-qr-view .qr-section { border: 0; border-radius: 0; overflow: visible; }
.ep-qr-view .qr-section-head { padding: 0 0 8px; background: transparent; border: 0; border-bottom: 1px solid var(--wd-hairline); }
.ep-qr-view .qr-section-title { font-family: var(--wd-font-display); font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; text-transform: none; }
.ep-qr-view .qr-section-desc { font-style: normal; font-size: 0.84rem; }
.ep-qr-view .qr-section-count { font-size: 0.78rem; font-weight: 400; }
.ep-qr-view .qr-section-body { background: transparent; }
.ep-qr-view .qr-field { padding: 11px 0; border-top: 1px solid var(--wd-hairline); }
.ep-qr-view .qr-section-body .qr-field:first-child { border-top: 0; }
.ep-qr-view .qr-sub-head { padding: 16px 0 6px; }
.ep-qr-view .qr-section-body .qr-sub-head:first-child { padding-top: 4px; }
.ep-qr-view .qr-sub-title { margin: 0; font-family: var(--wd-font-display); font-size: 0.9rem; font-weight: 600; letter-spacing: -0.01em; color: var(--wd-onyx); }
.ep-qr-view .qr-sub-desc { margin: 2px 0 0; font-size: 0.8rem; color: var(--ep-text-secondary); }
.ep-qr-view .qr-field--sub { padding-left: 16px; }
.ep-qr-view .qr-field-label { font-size: 0.84rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ep-text-secondary); }
.ep-qr-view .qr-field-value { font-size: 0.92rem; }
.ep-qr-view .qr-tag { font-weight: 500; background: var(--wd-papier); border: 0; }
.ep-qr-view .qr-complement { border-left-color: var(--wd-hairline-2); }
.ep-qr-view .qr-complement .lbl { font-size: 0.76rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.ep-qr-view .qr-acts { display: flex; justify-content: flex-end; gap: 8px; margin: 26px -24px 0; padding: 14px 24px 18px; border-top: 1px solid var(--wd-hairline); }
.ep-qr-view .qr-acts .wd-ev-submit, .ep-qr-view .qr-acts .wd-ev-btn { height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.ep-qr-view .qr-acts .wd-ev-submit .ms { font-size: 18px; }

/* Reprendre des questions (modale d'import) */
.ep-import-picker { margin: 0 0 18px; padding: 12px; border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-panel); max-height: 46vh; overflow-y: auto; }
.ep-import-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; }
.ep-import-row { gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: 0.88rem; }
.ep-import-row:hover { background: #FAF8F5; }
.ep-import-row .form-check-input:checked, .ep-import-row .form-check-input:indeterminate { background-color: var(--wd-onyx); border-color: var(--wd-onyx); }
.ep-import-row-ico { font-size: 18px; color: var(--ep-text-muted); }
.ep-import-row--section .ep-import-row-label { font-weight: 600; text-transform: none; letter-spacing: 0; }
.ep-import-row-type { font-size: 0.78rem; color: var(--ep-text-muted); }

@media (max-width: 767.98px) {
    .wd-qb-cover .wd-qb-activate, .wd-qb-cover .wd-qb-preview { display: none; }
    .wd-qb-menu-phone { display: block; }
    .wd-qb-activate-phone { display: block; margin: -16px 0 24px; }
    .wd-qb-activate-phone .wd-ev-submit { width: 100%; height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
    .wd-qb-activate-phone .wd-ev-submit:disabled { opacity: 0.5; }
    .wd-qb-crumb b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
    .wd-qb-grip { display: none; }
    .wd-qb-q { padding: 14px 16px 16px; }
    .wd-qb-more { opacity: 1; width: 44px; height: 44px; top: 4px; right: 4px; }
    .wd-qb-q-top { padding-right: 36px; flex-wrap: wrap; row-gap: 4px; }
    .wd-qb-q-edit .wd-qb-q-top { padding-right: 40px; }
    .wd-qb-q-input { margin-left: 0; flex-basis: 100%; }
    .wd-qb-help-input { margin-left: 0; }
    .wd-qb-opt-del { opacity: 1; width: 44px; height: 44px; }
    .wd-qb-q-foot { flex-wrap: wrap; }
    .wd-qb-sec { padding: 0 10px 10px; }
    .wd-qb-sec-head { margin: 0 -10px; padding: 12px 6px 10px 12px; gap: 4px; }
    .wd-qb-sec-num { width: 26px; height: 26px; font-size: 0.8rem; }
    .wd-qb-sec-title { font-size: 1.05rem; }
    .wd-qb-sec-count { display: none; }
    .wd-qb-sec-list > .wd-qb-sec { padding: 0 8px 8px; }
    .wd-qb-sec-list > .wd-qb-sec > .wd-qb-sec-head { margin: 0 -8px; padding: 10px 4px 8px 10px; }
    .wd-qb-sec-adds { flex-direction: column; gap: 8px; }
    .wd-qb-doc { margin-bottom: 120px; }
    .wd-qb-end-acts { flex-direction: column; }
    .wd-qb-toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
    .wd-qn-body, .wd-qn-foot { padding-left: 18px; padding-right: 18px; }
    .ep-qr-modal .modal-body { padding: 16px 18px 0; }
    .ep-qr-fill .qrf-actions, .ep-qr-view .qr-acts { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 991.98px) {
    .wd-qb-tools { position: fixed; top: auto; right: 20px; bottom: calc(24px + env(safe-area-inset-bottom)); padding: 0; border: 0; background: none; box-shadow: none; transform: none !important; }
    .wd-qb-tools .wd-qb-tool:not(.is-main) { display: none; }
    .wd-qb-tool.is-main { width: 56px; height: 56px; border-radius: 18px; box-shadow: var(--wd-shadow-lift), 0 2px 6px rgba(27, 24, 22, 0.25); }
    .wd-qb-tool.is-main .ms { font-size: 28px; }
}
@media (max-width: 767.98px) {
    .wd-qb-tools { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); }
    .wd-qb-toast { left: 16px; right: 84px; transform: none; max-width: none; }
    .wd-qb-toast.is-in { animation: none; }
}
@media (hover: none) {
    .wd-qb-more, .wd-qb-opt-del { opacity: 1; }
    .wd-qb-sec-desc:placeholder-shown { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-qb-tools, .wd-qb-tool { transition: none; }
    .wd-qb-item.is-arrived, .wd-qb-pop, .wd-qb-pop.is-sheet, .wd-qb-toast.is-in { animation: none; }
    .wd-qb-save.is-saving .ms { animation: none; }
    .wd-qb-q, .wd-qb-switch-ui, .wd-qb-switch-ui::after, .wd-qb-sec-toggle .ms { transition: none; }
}

/* ============================================================
   PARAMÈTRES — refonte Rail du 24/10/2026 d'après la revue UX :
   nav verticale collante de 220 px (trois groupes sans intitulé :
   vous / l'entreprise / le compte), une colonne de 760 px, h1 = nom de
   la rubrique + une phrase d'aide. Cartes = .wd-bif-sec en relief,
   titrées en casse normale (.wd-ev-h + small) ; lignes .wd-set-row
   (modules, agendas, membres) ; enregistrement par la barre noire
   .wd-doc-savebar quand une page a plusieurs cartes pour un seul
   formulaire. Sous 992 px, la nav devient le sélecteur .wd-chapter.
   ============================================================ */
.wd-set { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 48px; align-items: start; margin-top: 8px; }
.wd-set--wide { grid-template-columns: 220px minmax(0, 1fr); }
.wd-set-main { min-width: 0; }
/* --wd-gris n'est défini nulle part (66 usages dans ce fichier) : les aides
   s'affichent en noir ; ici on lui donne le gris chaud prévu */
.wd-set { --wd-gris: var(--wd-fumee-fonce); }

/* Nav */
.wd-set-nav { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.wd-set-nav-h { margin: 0 10px 12px; font-size: 0.82rem; font-weight: 500; color: var(--ep-text-muted); }
.wd-set-sep { height: 1px; background: var(--wd-hairline); margin: 10px; }
.wd-set-link { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--wd-r-ctl); font-size: 0.9rem; font-weight: 500; color: var(--ep-text-secondary); text-decoration: none; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-set-link .ms { font-size: 20px; color: var(--ep-text-muted); transition: transform 200ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-set-link:hover { background: #F9F7F3; color: var(--wd-onyx); }
.wd-set-link:hover .ms { color: var(--wd-onyx); transform: translateY(-1px); }
.wd-set-link.active { background: var(--wd-papier); color: var(--wd-onyx); font-weight: 600; }
.wd-set-link.active .ms { color: var(--wd-onyx); font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.wd-set-link em, .wd-set-picker .wd-chapter-item em { margin-left: auto; font-style: normal; font-size: 0.74rem; font-weight: 500; padding: 2px 7px; border-radius: 999px; background: var(--wd-jaune-pale); color: #6B4F22; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-set-link em.late, .wd-set-picker .wd-chapter-item em.late { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-set-picker { display: none; margin: 0 0 18px; }

/* En-tête */
.wd-set-head { display: flex; align-items: flex-start; gap: 16px; margin: 0 0 22px; }
.wd-set-head > div { min-width: 0; flex: 1; }
.wd-set-head h1 { font-size: 1.75rem; margin: 0 0 6px; }
.wd-set-head p { margin: 0; max-width: 62ch; font-size: 0.94rem; color: var(--ep-text-secondary); }
.wd-set-head .wd-ev-btn { flex: none; }
.wd-set-head .wd-ev-btn--primary { color: #fff; }

/* Corps : cartes en relief, titres en casse normale */
.wd-set-body { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.wd-set-body > .wd-bif-sec, .wd-set-body > form > .wd-bif-sec { padding: 22px 24px 24px; border-color: var(--wd-card-border); box-shadow: var(--wd-card-shadow); }
.wd-set-body > form:not(.wd-bif-sec) { display: flex; flex-direction: column; gap: 16px; }
.wd-set-body .wd-ev-h { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-family: var(--wd-font-display); font-size: 1.02rem; letter-spacing: -0.01em; }
.wd-set-body .wd-ev-h small { font-family: var(--wd-font-sans); font-size: 0.82rem; font-weight: 400; letter-spacing: 0; color: var(--ep-text-muted); }
.wd-set-body .wd-ev-h .wd-st { margin-left: auto; height: 24px; font-size: 0.76rem; font-family: var(--wd-font-sans); letter-spacing: 0; }
.wd-set-body .wd-ev-h + .wd-set-lede { margin-top: -10px; }
.wd-set-lede { margin: 0 0 16px; font-size: 0.88rem; color: var(--ep-text-secondary); max-width: 62ch; }
.wd-set-body .wd-bif-foot { padding-top: 18px; }
.wd-set-body .wd-bif-foot .wd-ev-btn--primary { color: #fff; }
.wd-set-body .invalid-feedback { font-size: 0.8rem; }
.wd-gf-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wd-gf-f.is-missing .form-control, .wd-gf-f.is-missing .form-select { border-color: #E9C2BA; }
.wd-gf-hint.is-missing { color: var(--wd-st-danger); }
.wd-set-narrow { max-width: 340px; }
.wd-set-tight { margin: -6px 0 14px; }
.wd-set-note { margin: 2px 4px 0; font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-set-note a, .wd-set-body .wd-gf-hint a, .wd-set-lede a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-set-body .wd-gf-fold { padding: 0; }
.wd-set-body .wd-gf-fold[open] { padding-bottom: 22px; }
.wd-set-body .wd-gf-fold > summary { padding: 18px 24px; }
.wd-set-body .wd-gf-fold > summary .wd-ev-h { margin: 0; }
.wd-set-body .wd-gf-fold > :not(summary) { margin-left: 24px; margin-right: 24px; }

/* Lignes : modules, agendas, membres */
.wd-set-rows { list-style: none; margin: -6px 0; padding: 0; }
.wd-set-row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 68px; padding: 10px 0; scroll-margin-top: 100px; }
.wd-set-row + .wd-set-row { border-top: 1px solid var(--wd-hairline); }
.wd-set-row .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--wd-papier); color: var(--wd-fumee-fonce); font-family: var(--wd-font-display); font-size: 0.78rem; font-weight: 600; transition: background 200ms var(--wd-ease), color 200ms var(--wd-ease), transform 220ms var(--wd-ease); }
.wd-set-row .ic .ms { font-size: 20px; }
.wd-set-row.is-on .ic { background: var(--wd-onyx); color: #fff; }
.wd-set-row:hover .ic { transform: rotate(-4deg); }
.wd-set-row .ic.is-dashed { background: #fff; border: 1.5px dashed var(--wd-hairline-2); }
.wd-set-row .t { min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.wd-set-row .t b { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 0.94rem; font-weight: 600; color: var(--wd-onyx); }
.wd-set-row .t b .wd-st { height: 22px; font-size: 0.72rem; font-weight: 500; }
.wd-set-row .t small { font-size: 0.82rem; color: var(--ep-text-secondary); overflow-wrap: anywhere; }
.wd-set-row .acts { display: flex; align-items: center; gap: 6px; }
.wd-set-row .acts form { margin: 0; }
.wd-set-row.is-off .t b, .wd-set-row.is-off .ic { opacity: 0.6; }
.wd-set-row:target { animation: wd-set-ping 1.4s var(--wd-ease) 1; border-radius: 12px; }
@keyframes wd-set-ping { 0% { background: var(--wd-jaune-pale); } 100% { background: transparent; } }
.wd-set-row-more { grid-column: 2 / -1; }

/* Interrupteur qui poste tout seul (bouton submit, sans JS) */
.wd-set-toggle { border: 0; background: none; padding: 8px 0 8px 8px; cursor: pointer; display: inline-flex; }
.wd-set-toggle[aria-checked="true"] .wd-bif-switch-ui { background: var(--wd-onyx); }
.wd-set-toggle[aria-checked="true"] .wd-bif-switch-ui::after { transform: translateX(16px); }
.wd-set-toggle:focus-visible { outline: none; }
.wd-set-toggle:focus-visible .wd-bif-switch-ui { box-shadow: 0 0 0 3px rgba(201, 160, 99, 0.45); }
/* Pendant l'envoi (Turbo pose aria-busy sur le form) : la bascule part tout de suite */
form[aria-busy="true"] .wd-set-toggle .wd-bif-switch-ui { background: var(--wd-jaune); }
form[aria-busy="true"] .wd-set-toggle[aria-checked="false"] .wd-bif-switch-ui::after { transform: translateX(16px); }
form[aria-busy="true"] .wd-set-toggle[aria-checked="true"] .wd-bif-switch-ui::after { transform: none; }

/* Mon profil */
.wd-set-who { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.wd-set-av { width: 52px; height: 52px; border-radius: 16px; flex: none; display: grid; place-items: center; background: var(--wd-jaune-pale); color: #6B4F22; font-family: var(--wd-font-display); font-weight: 600; font-size: 1.05rem; }
.wd-set-who p { margin: 0; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.wd-set-who b { font-family: var(--wd-font-display); font-size: 1.08rem; font-weight: 600; }
.wd-set-who small { font-size: 0.84rem; color: var(--ep-text-secondary); }
/* Mon profil › Vérification en deux étapes (25/10/2026) */
.wd-set-2fa { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.wd-set-2fa > .ic { width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--wd-papier); }
.wd-set-2fa > .ic .ms { font-size: 21px; }
.wd-set-2fa p, .wd-set-2fa-devices p { margin: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; min-width: 0; }
.wd-set-2fa b, .wd-set-2fa-devices b { font-weight: 600; }
.wd-set-2fa small, .wd-set-2fa-devices small { font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-set-2fa-form .wd-gf-f { margin-bottom: 12px; }
.wd-set-2fa-devices { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--wd-hairline); }
.wd-set-2fa-devices .wd-ev-btn { flex: none; }
/* Second dans le HTML (« Entrée » ne doit pas le valider), premier à l'écran */
.wd-set-2fa-alt, .wd-pt-sec-alt { order: -1; }
/* Nouvelle adresse de connexion en attente de son code */
.wd-set-pending { border-color: var(--wd-onyx); }
/* Ancres de Mon profil (#nouvelle-adresse, #connexion, #verification) : pas sous la barre du haut */
.wd-set-body > [id] { scroll-margin-top: 88px; }
.wd-set-dev { margin: 0 0 12px; padding: 8px 12px; border: 1px dashed var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-set-dev b { color: var(--wd-onyx); letter-spacing: 0.12em; }
/* « Ajouter à mon application » : un téléphone ne peut pas scanner son propre écran */
.wd-set-otpauth, .wd-set-otpauth-hint { display: none !important; }
@media (pointer: coarse) { .wd-set-otpauth { display: inline-flex !important; } .wd-set-otpauth-hint { display: block !important; } }
.wd-set-back { margin: 0 0 4px; }
.wd-set-back a { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--ep-text-secondary); text-decoration: none; }
.wd-set-back a:hover { color: var(--wd-onyx); }
.wd-set-back .ms { font-size: 19px; }
.wd-set-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: wd-step; }
.wd-set-steps > li { counter-increment: wd-step; }
.wd-set-steps > li > .wd-ev-h::before { content: counter(wd-step); display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; background: var(--wd-onyx); color: #fff; font-size: 0.78rem; font-weight: 600; vertical-align: 2px; }
.wd-set-qr { display: flex; align-items: center; gap: 22px; }
.wd-set-qr img { flex: none; width: 176px; height: 176px; padding: 8px; border: 1px solid var(--wd-hairline); border-radius: 14px; background: #fff; }
.wd-set-qr > div { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.wd-set-qr .wd-gf-hint { margin: 0; }
/* Paramètres › Demandes : l'adresse Mariages.net, le code Gmail, le lien vers le pas-à-pas (/aide) */
.wd-ld-code { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 14px 0 0; }
.wd-ld-help { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; }
.wd-ld-help .wd-gf-hint { margin: 0; flex: 1; min-width: 200px; }
.wd-ld-help .wd-ev-btn .ms { font-size: 18px; }
.wd-ld-code .wd-set-secret { display: inline-block; font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-ld-code .wd-gf-hint { margin: 0; }
@media (max-width: 560px) {
    .wd-ld-url { flex-wrap: wrap; padding: 10px 12px; }
    .wd-ld-url .u { flex-basis: calc(100% - 18px); white-space: normal; overflow-wrap: anywhere; }
    .wd-ld-url .wd-ev-btn { width: 100%; justify-content: center; }
}
.wd-set-secret { display: block; max-width: 100%; padding: 8px 12px; border-radius: var(--wd-r-ctl); background: var(--wd-papier); color: var(--wd-onyx); font-size: 0.92rem; letter-spacing: 0.06em; overflow-wrap: anywhere; }
.wd-set-otp { font-size: 1.3rem; font-weight: 600; letter-spacing: 0.32em; font-variant-numeric: tabular-nums; }
.wd-set-codes { list-style: none; margin: 0 0 16px; padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; border-radius: var(--wd-r-card); background: var(--wd-papier); }
.wd-set-codes code { font-size: 1rem; color: var(--wd-onyx); letter-spacing: 0.08em; }
/* Impression des codes de secours : la liste seule, sans menus ni boutons */
@media print {
    body:has(.wd-set-codes) .wd-set-nav, body:has(.wd-set-codes) .wd-set-picker, body:has(.wd-set-codes) .wd-bif-foot, body:has(.wd-set-codes) .wd-pt-sec-acts,
    body:has(.wd-set-codes) .wd-pt-hd, body:has(.wd-set-codes) .wd-pt-crumb, body:has(.wd-set-codes) .wd-pt-ft { display: none !important; }
    .wd-set-codes { background: none; border: 1px solid #000; }
}
@media (max-width: 575.98px) {
    .wd-set-qr { flex-direction: column; align-items: flex-start; }
    .wd-set-2fa-devices { flex-direction: column; align-items: stretch; }
    .wd-set-2fa-form .wd-bif-foot { flex-direction: column-reverse; }
    /* En colonne, le flex: 1 des pieds de formulaire écrasait la hauteur des boutons */
    .wd-set-2fa-form .wd-bif-foot .wd-ev-btn { flex: none; }
}
.wd-set-confirm { padding-top: 14px; border-top: 1px solid var(--wd-hairline); }

@media (max-width: 991.98px) {
    .wd-set, .wd-set--wide { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 0; }
    .wd-set-nav { display: none; }
    .wd-set-picker { display: block; }
}
@media (max-width: 575.98px) {
    .wd-set-head { flex-wrap: wrap; margin-bottom: 18px; }
    .wd-set-head h1 { font-size: 1.5rem; }
    .wd-set-head p { font-size: 0.88rem; }
    .wd-set-body > .wd-bif-sec, .wd-set-body > form > .wd-bif-sec { padding: 18px 16px 20px; }
    .wd-set-body .wd-gf-fold > summary { padding: 16px; }
    .wd-set-body .wd-gf-fold > :not(summary) { margin-left: 16px; margin-right: 16px; }
    .wd-set-body .wd-ev-h { flex-wrap: wrap; }
    .wd-gf-row--3 { gap: 8px; }
    .wd-set-narrow { max-width: none; }
    .wd-set-row { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; }
    .wd-set-row .ic { width: 36px; height: 36px; }
    /* La barre d'enregistrement ne garde que la pastille : le libellé débordait à 390 px */
    .wd-doc-savebar > span { font-size: 0; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-set-row:target { animation: none; }
    .wd-set-row .ic, .wd-set-link .ms { transition: none; }
}
/* Entreprise : le capital social ne concerne que les sociétés */
.wd-set-legal:has(select option:checked:is([value="Micro-entreprise"], [value="Auto-entrepreneur"], [value="EI"], [value="EIRL"], [value="Association"])) .wd-set-capital { display: none; }
/* Apparence : vignette du logo, couleur, aperçu collant à droite */
.wd-set-brand { grid-template-columns: minmax(0, 760px) 300px; }
.wd-set-logo { display: flex; align-items: flex-start; gap: 20px; }
.wd-set-logo-tile { width: 168px; height: 104px; flex: none; margin: 0; border-radius: 14px; border: 1.5px dashed var(--wd-hairline-2); background: #fff; display: grid; place-items: center; padding: 14px; cursor: pointer; transition: border-color 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-set-logo-tile:hover { border-color: var(--wd-onyx); }
.wd-set-logo-tile.has-logo { border-style: solid; border-color: var(--wd-hairline); background: #FDFCFA; }
.wd-set-logo-tile img { max-width: 100%; max-height: 72px; object-fit: contain; }
.wd-set-logo-tile img[hidden], .wd-set-logo-empty[hidden] { display: none; }
.wd-set-logo-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.84rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-set-logo-empty .ms { font-size: 22px; }
.wd-set-logo-t { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 6px; }
.wd-set-logo-t .wd-gf-hint { flex-basis: 100%; margin: 0; }
.wd-set-logo-t .wd-ev-btn { cursor: pointer; margin: 0; }
.wd-set-logo-t .wd-ev-btn .ms { font-size: 18px; }
.wd-set-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wd-set-file:focus-visible + .wd-ev-btn { box-shadow: 0 0 0 3px rgba(201, 160, 99, 0.45); }
.wd-set-link-btn { border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-set-link-btn:hover { color: var(--wd-onyx); }
.wd-set-link-btn .ms { font-size: 18px; }
.wd-set-logo-t .wd-set-link-btn:hover { color: var(--wd-st-danger); }
.wd-set-color { display: flex; align-items: center; gap: 16px; }
.wd-set-color .form-label { margin: 0 0 2px; }
.wd-set-color .form-label small { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; margin-left: 6px; }
.wd-set-color .wd-gf-hint { margin: 0; }
.wd-gf .wd-set-swatch { width: 56px; height: 56px; flex: none; padding: 4px; border: 1px solid var(--wd-hairline-2); border-radius: 14px; background: #fff; cursor: pointer; }
.wd-set-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.wd-set-swatch::-webkit-color-swatch { border: 0; border-radius: 10px; }
.wd-set-swatch::-moz-color-swatch { border: 0; border-radius: 10px; }
.wd-set-reset { margin-top: 16px; }
.wd-set-preview { top: 96px; }
.wd-set-doc { position: relative; overflow: hidden; border: 1px solid var(--wd-hairline); border-radius: 10px; background: #fff; padding: 18px 16px 16px; box-shadow: 0 10px 24px -18px rgba(27, 24, 22, 0.4); }
.wd-set-doc .bar { position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--wd-brand-primary); }
.wd-set-doc .top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.wd-set-doc .who { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wd-set-doc .who img { max-width: 96px; max-height: 32px; object-fit: contain; object-position: left; }
.wd-set-doc .who img[hidden], .wd-set-doc .who b[hidden] { display: none; }
.wd-set-doc .who b { font-size: 0.82rem; font-weight: 700; color: var(--wd-brand-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-set-doc i:not(.bar) { display: block; height: 5px; border-radius: 3px; background: var(--wd-papier); width: 92px; }
.wd-set-doc i.short { width: 60px; }
.wd-set-doc .what { text-align: right; display: flex; flex-direction: column; }
.wd-set-doc .what b { font-size: 0.86rem; letter-spacing: 0.06em; color: var(--wd-brand-primary); }
.wd-set-doc .what small { font-size: 0.66rem; color: var(--ep-text-muted); }
.wd-set-doc .lines { display: flex; flex-direction: column; gap: 7px; }
.wd-set-doc .lines i { width: 100%; }
.wd-set-doc .lines i.head { height: 2px; background: var(--wd-brand-primary); margin-bottom: 3px; }
.wd-set-doc .lines i.short { width: 55%; }
.wd-set-book { margin-top: 12px; border: 1px solid var(--wd-hairline); border-radius: 10px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.wd-set-book small { font-size: 0.74rem; color: var(--ep-text-muted); }
.wd-set-book .slot { align-self: flex-start; height: 28px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; font-size: 0.78rem; font-weight: 500; color: var(--wd-brand-primary); background: color-mix(in srgb, var(--wd-brand-primary) 9%, #fff); border: 1px solid color-mix(in srgb, var(--wd-brand-primary) 30%, #fff); }
.wd-set-book .go { height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 0.8rem; font-weight: 600; color: #fff; background: var(--wd-brand-primary); }
@media (max-width: 1199.98px) {
    .wd-set-brand { grid-template-columns: minmax(0, 1fr); }
    .wd-set-preview { position: static; order: -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
    .wd-set-preview .wd-gf-side-h { grid-column: 1 / -1; margin: 0; }
    .wd-set-preview .wd-set-book { margin-top: 0; }
}
@media (max-width: 575.98px) {
    .wd-set-logo { flex-direction: column; gap: 12px; }
    .wd-set-preview { grid-template-columns: 1fr; }
}
/* Page publique : couverture large, prestations à cocher, aperçu en téléphone */
.wd-vp-cover { margin-bottom: 18px; }
.wd-vp-cover .wd-set-logo-tile { width: 220px; padding: 0; overflow: hidden; }
.wd-vp-cover .wd-set-logo-tile img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.wd-vp-lede { margin: -4px 0 14px; }
.wd-vp-networks { margin-top: 18px; }
.wd-vp-max { font-size: 0.78rem; font-weight: 400; color: var(--wd-gris); }
.wd-vp-picks { display: flex; flex-direction: column; border: 1px solid var(--wd-hairline); border-radius: 12px; max-height: 360px; overflow-y: auto; }
.wd-vp-pick { display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin: 0; cursor: pointer; font-size: 0.9rem; }
.wd-vp-pick + .wd-vp-pick { border-top: 1px solid var(--wd-hairline); }
.wd-vp-pick:hover { background: #FDFCFA; }
.wd-vp-pick input { width: 17px; height: 17px; flex: none; accent-color: var(--wd-onyx); }
.wd-vp-pick span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wd-vp-pick small { color: var(--wd-gris); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wd-vp-side { padding: 16px; }
.wd-vp-phone { height: 560px; border-radius: 22px; overflow: hidden; border: 1px solid var(--wd-hairline); background: #F8F5EF; }
.wd-vp-phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.wd-vp-open { width: 100%; justify-content: center; margin-top: 12px; }
@media (max-width: 1199.98px) {
    .wd-vp-side { display: none; }
}
@media (max-width: 575.98px) {
    .wd-vp-cover .wd-set-logo-tile { width: 100%; height: 132px; }
}
/* Devis et factures */
.wd-set-body .wd-bif-switch { margin-bottom: 14px; }
.wd-set-body .wd-bif-sec > .wd-bif-switch:last-child { margin-bottom: 0; }
.wd-set-vat:has(> .wd-bif-switch input:checked) .wd-set-rate { display: none; }
.wd-set-sublabel { margin: 4px 0 8px; }
.wd-set-sublabel small { color: var(--wd-gris); font-weight: 400; margin-left: 4px; }
.wd-gf-row--iban { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.wd-set-more { margin-top: 4px; border-top: 1px solid var(--wd-hairline); padding-top: 14px; }
.wd-set-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 600; color: var(--wd-onyx); }
.wd-set-more > summary::-webkit-details-marker { display: none; }
.wd-set-more > summary small { font-weight: 400; color: var(--wd-gris); font-size: 0.82rem; }
.wd-set-more > summary .ms { font-size: 20px; color: var(--ep-text-muted); transform: rotate(-90deg); transition: transform 200ms var(--wd-ease); }
.wd-set-more[open] > summary { margin-bottom: 16px; }
.wd-set-more[open] > summary .ms { transform: none; }
.wd-set-more > .wd-gf-row:last-child, .wd-set-more > .wd-gf-f:last-child { margin-bottom: 0; }
@media (max-width: 575.98px) {
    .wd-gf-row--3, .wd-gf-row--iban { grid-template-columns: 1fr; }
}
/* Mes agendas */
.wd-set-row .ic .bi { font-size: 18px; line-height: 1; }
.wd-set-cal > .wd-set-row { padding-top: 0; min-height: 0; margin-bottom: 14px; }
.wd-set-alert { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--wd-st-warn-bg); color: var(--wd-st-warn); font-size: 0.84rem; }
.wd-set-alert .ms { font-size: 18px; }
.wd-set-row .wd-set-alert { margin: 4px 0 0; }
.wd-set-cal-form { padding-top: 16px; border-top: 1px solid var(--wd-hairline); }
.wd-set-cal-form .wd-bif-switch { margin-bottom: 4px; }
.wd-set-cal-foot { align-items: center; justify-content: space-between; gap: 12px; }
.wd-set-sync { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--ep-text-muted); }
.wd-set-sync .ms { font-size: 16px; }
.wd-set-cal-more { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--wd-hairline); }
.wd-set-cal-more form { margin: 0; }
.wd-set-link-btn.wd-set-danger:hover { color: var(--wd-st-danger); }
.wd-set-admin { font-size: 0.78rem; color: var(--ep-text-muted); overflow-wrap: anywhere; }
.wd-set-admin summary { cursor: pointer; }
/* Données : la suppression du compte, repliée en bas */
.wd-set-delete { padding: 0 !important; }
.wd-set-delete > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 18px 24px; }
.wd-set-delete > summary::-webkit-details-marker { display: none; }
.wd-set-delete > summary > span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.wd-set-delete > summary b { font-size: 0.94rem; color: var(--wd-st-danger); }
.wd-set-delete > summary small { font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-set-delete > summary .ms { color: var(--ep-text-muted); transform: rotate(-90deg); transition: transform 200ms var(--wd-ease); }
.wd-set-delete[open] > summary .ms { transform: none; }
.wd-set-delete > :not(summary) { margin: 0 24px 16px 60px; }
.wd-set-delete > :last-child { margin-bottom: 22px; }
.wd-set-delete p { font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-set-delete p a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-set-delete-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wd-set-delete-row .form-control { max-width: 320px; }
.wd-set-btn-danger { height: 42px; color: var(--wd-st-danger); border-color: color-mix(in srgb, var(--wd-st-danger) 35%, #fff); }
.wd-set-btn-danger:hover { background: var(--wd-st-danger); border-color: var(--wd-st-danger); color: #fff; }
@media (max-width: 575.98px) {
    .wd-set-delete > summary { padding: 16px; }
    .wd-set-delete > :not(summary) { margin: 0 16px 14px; }
    .wd-set-delete-row .form-control { max-width: none; }
    .wd-set-delete-row .wd-ev-btn { width: 100%; justify-content: center; }
}
/* Équipe : initiales des membres, repli « Qui peut faire quoi ? » */
.wd-set-row .ic:not(:has(.ms, .bi)) { background: var(--wd-jaune-pale); color: #6B4F22; }
.wd-set-row.is-off .ic:not(:has(.ms, .bi)) { background: var(--wd-papier); color: var(--wd-fumee-fonce); }
.wd-set-row .acts .wd-ev-btn .ms { font-size: 18px; }
.wd-set-head .wd-ev-btn .ms { font-size: 18px; }
.wd-set-fold { padding: 0 !important; }
.wd-set-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 16px 24px; font-size: 0.9rem; font-weight: 600; color: var(--wd-onyx); }
.wd-set-fold > summary::-webkit-details-marker { display: none; }
.wd-set-fold > summary .ms { font-size: 20px; color: var(--ep-text-muted); transform: rotate(-90deg); transition: transform 200ms var(--wd-ease); }
.wd-set-fold[open] > summary .ms { transform: none; }
.wd-set-roles { margin: 0 24px 20px 52px; display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; font-size: 0.86rem; }
.wd-set-roles dt { font-weight: 600; }
.wd-set-roles dd { margin: 0; color: var(--ep-text-secondary); }
.wd-set-body > .wd-back { align-self: flex-start; margin-bottom: -6px; }
@media (max-width: 575.98px) {
    .wd-set-fold > summary { padding: 14px 16px; }
    .wd-set-roles { grid-template-columns: 1fr; gap: 2px; margin: 0 16px 16px; }
    .wd-set-roles dd { margin-bottom: 10px; }
    /* Les actions en ligne passent toutes dans le menu ⋯ */
    .wd-set-row .acts .wd-set-inline { display: none; }
}
/* Abonnement : la formule en carte-titre noire, la jauge, le parrainage */
.wd-set-plan { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px; border-radius: var(--wd-r-card); background: var(--wd-onyx); color: #fff; }
.wd-set-plan-main { min-width: 0; flex: 1 1 320px; }
.wd-set-plan .wd-st:not(.wd-st-accent, .wd-st-ok, .wd-st-danger, .wd-st-warn) { background: rgba(255, 255, 255, 0.12); color: #fff; }
.wd-set-plan h2 { color: #fff; font-size: 1.6rem; margin: 10px 0 4px; letter-spacing: -0.02em; }
.wd-set-plan p { margin: 0; color: rgba(255, 255, 255, 0.68); font-size: 0.9rem; }
.wd-set-plan p b { color: #fff; font-weight: 600; }
.wd-set-plan-when { margin-top: 14px !important; }
.wd-set-plan-gauge { display: block; height: 4px; max-width: 320px; margin-top: 10px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.wd-set-plan-gauge i { display: block; height: 100%; width: var(--v); background: var(--wd-jaune); border-radius: 2px; }
.wd-set-plan-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.wd-set-plan-acts form { margin: 0; }
.wd-set-plan-acts .wd-ev-btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.wd-set-plan-acts .wd-ev-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.wd-set-plan-acts .wd-ev-btn .ms { font-size: 18px; }
.wd-set-plan-acts .wd-set-plan-primary, .wd-set-plan-acts .wd-set-plan-primary:hover { background: #fff; color: var(--wd-onyx); border-color: #fff; }
.wd-set-quota { padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--wd-hairline); }
.wd-set-quota:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.wd-set-quota p { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; font-size: 0.9rem; }
.wd-set-quota p span { color: var(--ep-text-secondary); font-size: 0.86rem; }
.wd-set-quota p span b { color: var(--wd-onyx); font-variant-numeric: tabular-nums; }
.wd-set-quota-bar { display: block; height: 6px; border-radius: 3px; background: var(--wd-papier); overflow: hidden; }
.wd-set-quota-bar i { display: block; height: 100%; width: var(--v); background: var(--wd-onyx); border-radius: 3px; }
.wd-set-quota.is-warn .wd-set-quota-bar i { background: var(--wd-jaune); }
.wd-set-quota.is-full .wd-set-quota-bar i { background: var(--wd-st-danger); }
.wd-set-quota small { display: block; margin-top: 8px; font-size: 0.82rem; color: var(--wd-st-warn); }
.wd-set-quota.is-full small { color: var(--wd-st-danger); }
.wd-set-ref { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--wd-hairline-2); border-radius: 12px; }
.wd-set-ref code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.84rem; color: var(--wd-onyx); background: none; }
.wd-set-ref .wd-ev-btn .ms { font-size: 18px; }
.wd-set-refs { margin-top: 10px; }
.wd-set-fold-body { margin: 0 24px 18px; }
.wd-set-fold-body .wd-set-rows { margin: 0; }
.wd-set-row .acts form + form { margin-left: 0; }
.wd-set-empty { display: flex; gap: 16px; align-items: flex-start; }
.wd-set-empty > .ic { width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--wd-papier); }
.wd-set-empty .wd-ev-h { margin-bottom: 4px !important; }
.wd-set-empty .wd-ev-btn--primary { color: #fff; }
@media (max-width: 575.98px) {
    .wd-set-plan { padding: 20px 18px; }
    .wd-set-plan-acts, .wd-set-plan-acts form, .wd-set-plan-acts .wd-ev-btn { width: 100%; justify-content: center; }
    .wd-set-fold-body { margin: 0 16px 16px; }
}

/* ============================================================
   PORTAIL CLIENT — coquille et accueil « Le fil » (24/10/2026)
   Revue UX par agent, piste A retenue : plus de barre de 12 onglets,
   l'accueil sert de carrefour (une colonne, trois blocs : carte noire,
   « À vous de jouer », sommaire « Votre espace ») ; les pages internes
   ont « ← Accueil » et le menu « Votre espace ». Fond blanc, pas de serif,
   l'or en petites surfaces (J−X, compteur, pastille Messages).
   ============================================================ */
:root {
    --wd-pt-col: 720px;
    --wd-pt-wrap: 1200px;
    --wd-pt-gold-ink: #6B4F22;
    --wd-pt-veil: #F9F7F3;
    --wd-pt-mute: #8E867C;
}

.wd-portal { background: #FFFFFF; }

/* Plus de Marcellus ni d'Italiana : aucune serif dans le logiciel */
.wd-portal .wd-page-head-title,
.wd-portal .wd-portal-page-title,
.wd-portal-gallery-card-overlay .wd-portal-gallery-card-name,
.wd-space-org {
    font-family: var(--wd-font-display);
    font-weight: 600;
    letter-spacing: -0.025em;
}
.wd-portal .wd-page-head:has(> .wd-page-head-actions) {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ── En-tête : marque · [Votre espace] · Messages · [Changer d'espace] · compte ── */
.wd-pt-hd { background: #FFFFFF; border-bottom: 1px solid var(--wd-card-border); position: sticky; top: 0; z-index: 100; }
/* Même largeur sur toutes les pages, accueil compris : resserré sur la
   colonne, l'en-tête de l'accueil faisait paraître la page plus étroite. */
.wd-pt-hd-in { max-width: var(--wd-pt-wrap); margin: 0 auto; height: 68px; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.wd-pt-brand { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.02em; color: var(--wd-onyx); text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wd-pt-brand:hover { color: var(--wd-onyx); }
.wd-pt-brand img { max-height: 36px; max-width: 168px; object-fit: contain; display: block; }
.wd-pt-hd-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.wd-pt-hd-btn, .wd-pt-hd-link { height: 38px; border-radius: var(--wd-r-ctl); display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; font-weight: 500; color: var(--wd-onyx); text-decoration: none; white-space: nowrap; position: relative; background: #FFFFFF; }
.wd-pt-hd-btn { padding: 0 13px; border: 1px solid var(--wd-card-border); }
.wd-pt-hd-link { padding: 0 10px; border: 1px solid transparent; }
.wd-pt-hd-btn .ms, .wd-pt-hd-link .ms { font-size: 19px; color: var(--ep-text-secondary); transition: transform 260ms var(--wd-ease); }
.wd-pt-hd-btn .wd-pt-caret { font-size: 18px; margin-left: -2px; transition: transform 200ms var(--wd-ease); }
.wd-pt-hd-btn:hover, .wd-pt-hd-link:hover, .wd-pt-hd-link.is-current { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-pt-hd-btn:hover .ms:first-child, .wd-pt-hd-link:hover .ms { transform: translateY(-1px); }
.wd-pt-hd-btn[aria-expanded="true"] { background: var(--wd-papier); border-color: var(--wd-hairline-2); }
.wd-pt-hd-btn[aria-expanded="true"] .wd-pt-caret { transform: rotate(180deg); }
.wd-pt-dot { position: absolute; top: 7px; left: 25px; width: 8px; height: 8px; border-radius: 50%; background: var(--wd-jaune); box-shadow: 0 0 0 2px #FFFFFF; animation: wd-breathe 2.8s var(--wd-ease) infinite; }
.wd-pt-me { width: 36px; height: 36px; border-radius: 50%; background: var(--wd-onyx); color: #FFFFFF; display: grid; place-items: center; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; border: 0; flex: none; cursor: pointer; transition: transform 160ms var(--wd-ease); }
.wd-pt-me:hover { transform: scale(1.05); }
.wd-pt-me:active { transform: scale(0.95); }
/* Focus clavier : le trait onyx du rail, pas l'anneau bleu du navigateur */
.wd-pt-hd :is(a, button):focus { outline: none; }
.wd-pt-hd :is(a, button):focus-visible, .wd-pt-crumb a:focus-visible, .wd-pt-som a:focus-visible, .wd-pt-btn:focus-visible { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-pt-une .wd-pt-btn:focus-visible, .wd-pt-une-pic:focus-visible { outline-color: #FFFFFF; }

/* Menu compte */
.wd-pt-menu.dropdown-menu { min-width: 250px; border-radius: var(--wd-r-panel); border: 1px solid var(--wd-hairline); box-shadow: var(--wd-shadow-lift); padding: 0.4rem; }
.wd-pt-menu .dropdown-item { border-radius: 8px; padding: 0.5rem 0.65rem; font-size: 0.86rem; display: flex; align-items: center; gap: 0.6rem; color: var(--wd-onyx); }
.wd-pt-menu .dropdown-item .ms { font-size: 20px; color: var(--ep-text-secondary); }
.wd-pt-menu .dropdown-item:hover, .wd-pt-menu .dropdown-item:focus { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-pt-menu-id { padding: 0.45rem 0.65rem 0.2rem; }
.wd-pt-menu-id b { display: block; font-weight: 600; font-size: 0.88rem; color: var(--wd-onyx); }
.wd-pt-menu-id small { display: block; font-size: 0.74rem; color: var(--ep-text-secondary); overflow: hidden; text-overflow: ellipsis; }

/* Sommaire en surimpression (« Votre espace ») : menu Bootstrap, feuille du bas sur téléphone */
.wd-pt-pop.dropdown-menu { width: 380px; max-height: calc(100vh - 90px); overflow: auto; background: #FFFFFF; border: 1px solid var(--wd-card-border); border-radius: 16px; box-shadow: 0 2px 4px rgba(27, 24, 22, 0.04), 0 24px 48px -18px rgba(27, 24, 22, 0.32); padding: 8px 18px; }
.wd-pt-pop.dropdown-menu.show { animation: wd-pt-pop-in 180ms var(--wd-ease); }
@keyframes wd-pt-pop-in { from { opacity: 0; translate: 0 -4px; } to { opacity: 1; translate: 0 0; } }
.wd-pt-pop .wd-pt-som { grid-template-columns: 1fr; padding: 0; }
.wd-pt-pop .wd-pt-som li, .wd-pt-pop .wd-pt-som li:nth-child(2) { border-top: 1px solid var(--wd-card-border); }
.wd-pt-pop .wd-pt-som li:first-child { border-top: 0; }
.wd-pt-pop .wd-pt-som a { height: 50px; }
.wd-pt-som a[aria-current="page"] { background: var(--wd-papier); }

/* Fil d'Ariane des pages internes (remplace la barre d'onglets) */
.wd-pt-crumb { max-width: var(--wd-pt-wrap); margin: 0 auto; padding: 18px 24px 0; width: 100%; }
.wd-pt-crumb a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 6px; margin-left: -6px; border-radius: var(--wd-r-ctl); color: var(--ep-text-secondary); font-size: 0.88rem; font-weight: 500; text-decoration: none; }
.wd-pt-crumb a:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-pt-crumb a .ms { font-size: 19px; transition: transform 200ms var(--wd-ease); }
.wd-pt-crumb a:hover .ms { transform: translateX(-2px); }
.wd-pt-crumb + .wd-portal-flashes:empty + .wd-portal-main { padding-top: 10px; }

/* Pied : une ligne discrète */
.wd-pt-ft { border-top: 1px solid var(--wd-card-border); padding: 22px 24px 28px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 0.78rem; color: var(--wd-pt-mute); background: #FFFFFF; }
.wd-pt-ft a { color: var(--wd-pt-mute); text-decoration: none; }
.wd-pt-ft a:hover { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wd-jaune); }
.wd-pt-ft b { font-weight: 500; color: var(--ep-text-secondary); }
.wd-pt-ft .wd-legal-links { display: contents; }
.wd-pt-ft .wd-legal-links > span { display: none; }
.wd-pt-ft-org { flex-basis: 100%; text-align: center; color: var(--ep-text-secondary); margin-bottom: 4px; }

/* ── Accueil : une colonne, trois blocs ── */
.wd-portal.is-home .wd-portal-flashes { max-width: calc(var(--wd-pt-col) + 64px); padding-left: 32px; padding-right: 32px; }
.wd-portal-main.wd-pt-main { max-width: calc(var(--wd-pt-col) + 64px); padding: 44px 32px 80px; display: flex; flex-direction: column; gap: 28px; }

/* Boutons : rectangles arrondis (rayon 10), jamais de pilule */
.wd-pt-btn { height: 40px; padding: 0 16px; border-radius: var(--wd-r-ctl); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--wd-font-sans); font-size: 0.88rem; font-weight: 500; text-decoration: none; white-space: nowrap; border: 1px solid transparent; cursor: pointer; flex: none; transition: background 150ms var(--wd-ease), border-color 150ms var(--wd-ease), transform 120ms var(--wd-ease); }
.wd-pt-btn .ms { font-size: 19px; }
.wd-pt-btn:active { transform: scale(0.97); }
.wd-pt-btn--dark { background: var(--wd-onyx); color: #FFFFFF; }
.wd-pt-btn--dark:hover { background: #000000; color: #FFFFFF; }
.wd-pt-btn--line { background: #FFFFFF; color: var(--wd-onyx); border-color: var(--wd-hairline-2); }
.wd-pt-btn--line:hover { border-color: var(--wd-onyx); color: var(--wd-onyx); }
.wd-pt-btn--inv { background: #FFFFFF; color: var(--wd-onyx); }
.wd-pt-btn--inv:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-pt-btn--ghost-inv { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, 0.3); }
.wd-pt-btn--ghost-inv:hover { background: rgba(255, 255, 255, 0.1); color: #FFFFFF; }

/* Bloc 1 — carte-titre : noir chaud, à plat */
.wd-pt-une { background: var(--wd-onyx); color: #FFFFFF; border-radius: 22px; padding: 30px 34px 26px; }
.wd-pt-une-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.wd-pt-kick { font-size: 0.86rem; color: rgba(255, 255, 255, 0.62); }
.wd-pt-j { height: 28px; padding: 0 11px; border-radius: 999px; background: var(--wd-jaune-pale); color: var(--wd-pt-gold-ink); font-family: var(--wd-font-display); font-weight: 600; font-size: 0.86rem; display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; position: relative; overflow: hidden; outline: none; flex: none; }
.wd-pt-j-alt { position: absolute; inset: 0; display: grid; place-items: center; background: inherit; transform: translateY(100%); transition: transform 260ms var(--wd-ease); font-weight: 500; }
.wd-pt-j:hover .wd-pt-j-alt, .wd-pt-j:focus-visible .wd-pt-j-alt { transform: none; }
.wd-pt-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--wd-jaune); display: inline-block; animation: wd-breathe 2.8s var(--wd-ease) infinite; flex: none; }
.wd-pt-une h1 { font-family: var(--wd-font-display); font-weight: 600; font-size: 2.7rem; line-height: 1.02; letter-spacing: -0.035em; color: #FFFFFF; margin: 12px 0 8px; overflow-wrap: anywhere; }
.wd-pt-une-meta { margin: 0; color: rgba(255, 255, 255, 0.68); font-size: 0.96rem; }
.wd-pt-une-foot { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.14); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wd-pt-une-acts { display: flex; gap: 10px; flex: none; }
.wd-pt-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wd-pt-who b { display: block; font-weight: 600; font-size: 0.94rem; }
.wd-pt-who small { display: block; font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); }
.wd-pt-av { width: 40px; height: 40px; border-radius: 50%; background: #FFFFFF; color: var(--wd-onyx); display: grid; place-items: center; font-family: var(--wd-font-display); font-weight: 600; font-size: 0.9rem; flex: none; overflow: hidden; }
/* Après : la photo de couverture dans la carte */
.wd-pt-une--photo { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 0 30px; padding-right: 26px; }
.wd-pt-une--photo .wd-pt-une-txt { display: flex; flex-direction: column; min-width: 0; }
.wd-pt-une--photo .wd-pt-une-foot { margin-top: auto; }
.wd-pt-une--photo .wd-pt-une-meta { margin-bottom: 24px; }
.wd-pt-une--photo .wd-pt-who small .org { display: none; }
.wd-pt-une-pic { margin: -4px 0; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 5; align-self: center; display: block; background: rgba(255, 255, 255, 0.06); }
.wd-pt-une-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms var(--wd-ease); }
.wd-pt-une-pic:hover img { transform: scale(1.03); }
/* Jour J : le programme en direct */
.wd-pt-live { list-style: none; margin: 22px 0 0; padding: 0; }
.wd-pt-live li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.wd-pt-live li:first-child { border-top: 0; }
.wd-pt-live .h { font-family: var(--wd-font-display); font-weight: 600; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.62); }
.wd-pt-live .x b { display: block; color: #FFFFFF; font-weight: 600; font-size: 0.98rem; }
.wd-pt-live .x small { display: block; font-size: 0.82rem; color: rgba(255, 255, 255, 0.55); }
.wd-pt-live li.is-now .h { color: var(--wd-jaune); }
.wd-pt-live li.is-now .x b { font-size: 1.12rem; }
.wd-pt-live .wd-st { display: inline-flex; align-items: center; gap: 6px; }

/* Blocs 2 et 3 — cartes de contenu : blanches, soulevées */
.wd-pt-card { background: var(--wd-card-bg); border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); padding: 22px 28px 10px; min-width: 0; }
.wd-pt-card-hd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 6px; }
.wd-pt-card-hd h2 { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.16rem; letter-spacing: -0.02em; margin: 0; color: var(--wd-onyx); }
.wd-pt-sub { font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-pt-n { height: 22px; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--wd-jaune-pale); color: var(--wd-pt-gold-ink); font-size: 0.76rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; transform: translateY(-2px); }

/* Lignes d'action */
.wd-pt-acts { list-style: none; margin: 0; padding: 0; }
.wd-pt-acts > li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 16px 0; border-top: 1px solid var(--wd-card-border); }
.wd-pt-acts > li:first-child { border-top: 0; }
.wd-pt-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--wd-papier); display: grid; place-items: center; color: var(--wd-onyx); transition: transform 320ms var(--wd-ease); }
.wd-pt-ic .ms { font-size: 22px; }
.wd-pt-acts > li:hover .wd-pt-ic { transform: rotate(-4deg) scale(1.04); }
.wd-pt-act-txt { min-width: 0; }
.wd-pt-act-txt b { display: block; font-weight: 600; font-size: 0.98rem; color: var(--wd-onyx); }
.wd-pt-act-txt small { display: block; font-size: 0.86rem; color: var(--ep-text-secondary); margin-top: 2px; }
.wd-pt-act-txt small em { font-style: normal; color: var(--wd-onyx); font-weight: 500; }
.wd-pt-late { color: var(--wd-st-danger); font-weight: 500; }
.wd-pt-act-form { margin: 0; }
.wd-pt-act-t { color: inherit; text-decoration: none; }
.wd-pt-act-t:hover { color: inherit; }
.wd-pt-act-t:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
/* « Voir les n autres » : se déplie sur place */
.wd-pt-more { border-top: 1px solid var(--wd-card-border); }
.wd-pt-more > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; height: 44px; font-size: 0.88rem; font-weight: 500; color: var(--ep-text-secondary); cursor: pointer; }
.wd-pt-more > summary::-webkit-details-marker { display: none; }
.wd-pt-more > summary:hover { color: var(--wd-onyx); }
.wd-pt-more > summary .ms { font-size: 19px; transition: transform 200ms var(--wd-ease); }
.wd-pt-more[open] > summary .ms { transform: rotate(180deg); }
.wd-pt-more[open] > summary { margin-bottom: -8px; }

/* Sommaire de l'espace */
.wd-pt-som { list-style: none; margin: 0; padding: 0 0 8px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; }
.wd-pt-som li { border-top: 1px solid var(--wd-card-border); min-width: 0; }
.wd-pt-som li:nth-child(-n+2) { border-top: 0; }
.wd-pt-som a { display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 10px; margin: 0 -10px; border-radius: 12px; color: var(--wd-onyx); text-decoration: none; transition: background 150ms var(--wd-ease); }
.wd-pt-som a > .ms:first-child { font-size: 21px; color: var(--ep-text-secondary); width: 22px; flex: none; transition: transform 260ms var(--wd-ease); }
.wd-pt-som .t { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.wd-pt-som .s { margin-left: auto; font-size: 0.84rem; color: var(--ep-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; text-align: right; }
.wd-pt-som .s b { color: var(--wd-onyx); font-weight: 600; }
.wd-pt-som .s.is-mute { color: var(--wd-pt-mute); }
.wd-pt-som .s.is-todo { color: var(--wd-pt-gold-ink); }
.wd-pt-som .chev { font-size: 20px; color: #B5ADA2; flex: none; transition: transform 200ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-pt-som a:hover { background: var(--wd-pt-veil); color: var(--wd-onyx); }
.wd-pt-som a:hover > .ms:first-child { transform: translateY(-1px); }
.wd-pt-som a:hover .chev { transform: translateX(2px); color: var(--wd-onyx); }

/* Creux : tuile vide en pointillés, sans ombre */
.wd-pt-hollow { border: 1.5px dashed var(--wd-hairline-2); border-radius: var(--wd-r-card); padding: 22px 24px; color: var(--ep-text-secondary); display: flex; align-items: center; gap: 16px; }
.wd-pt-hollow--card { padding: 26px 28px; }
.wd-pt-hollow b { color: var(--wd-onyx); font-weight: 600; display: block; font-size: 0.98rem; }
.wd-pt-hollow small { display: block; font-size: 0.86rem; margin-top: 2px; }
.wd-pt-hollow p { margin: 8px 0 0; font-size: 0.88rem; }
.wd-pt-hollow p b { display: inline; font-size: inherit; }
.wd-pt-tick { width: 44px; height: 44px; border-radius: 14px; border: 1.5px dashed var(--wd-hairline-2); display: grid; place-items: center; color: var(--ep-text-secondary); flex: none; }
.wd-pt-tick .ms { font-size: 22px; animation: wd-tick-pop 420ms var(--wd-ease) 260ms backwards; }

/* Écrire au prestataire */
.wd-pt-write { max-width: var(--wd-pt-col); }
.wd-pt-write-form { padding: 24px 28px; }
.wd-pt-write-acts { display: flex; justify-content: flex-end; gap: 10px; }

/* Entrée : les trois blocs montent l'un après l'autre (garde du double rendu Turbo) */
.wd-pt-main > * { animation: wd-rise-soft 520ms var(--wd-ease) backwards; }
.wd-pt-main > *:nth-child(2) { animation-delay: 60ms; }
.wd-pt-main > *:nth-child(3) { animation-delay: 120ms; }
html.wd-no-page-enter .wd-pt-main > *, html[data-turbo-preview] .wd-pt-main > * { animation: none; }
.wd-pt-n { animation: wd-tick-pop 380ms var(--wd-ease) 300ms backwards; }

/* ── Téléphone ── */
@media (max-width: 640px) {
    .wd-pt-hd-in { height: 58px; padding: 0 16px; gap: 10px; }
    .wd-pt-hd-btn .lbl, .wd-pt-hd-link .lbl, .wd-pt-hd-btn .wd-pt-caret { display: none; }
    .wd-pt-hd-btn, .wd-pt-hd-link { width: 40px; padding: 0; justify-content: center; }
    .wd-pt-hd-switch { display: none; }
    .wd-pt-hd-right { gap: 6px; }
    .wd-pt-dot { left: 23px; top: 8px; }
    .wd-pt-brand img { max-width: 130px; max-height: 32px; }
    .wd-pt-pop.dropdown-menu.show { position: fixed !important; inset: auto 0 0 0 !important; transform: none !important; width: auto; max-height: 80vh; border-radius: 18px 18px 0 0; padding: 10px 18px calc(16px + env(safe-area-inset-bottom)); animation-name: wd-pt-sheet-in; }
    /* Voile : un pseudo-élément du conteneur, pas du bouton — Bootstrap ferme
       le menu au toucher et le lien de la page en dessous ne reçoit rien. */
    .wd-pt-hd .dropdown:has(> .wd-pt-pop.show)::before { content: ''; position: fixed; inset: 0; background: rgba(27, 24, 22, 0.34); animation: wd-pt-veil-in 180ms var(--wd-ease); }
    .wd-pt-crumb { padding: 12px 16px 0; }
    .wd-portal.is-home .wd-portal-flashes { padding-left: 16px; padding-right: 16px; }
    .wd-portal-main.wd-pt-main { padding: 20px 16px 48px; gap: 18px; }
    .wd-pt-une { padding: 22px 20px 18px; border-radius: 20px; }
    .wd-pt-une h1 { font-size: 2.05rem; margin: 10px 0 6px; }
    .wd-pt-une-meta { font-size: 0.9rem; }
    .wd-pt-une-foot { margin-top: 18px; padding-top: 14px; }
    .wd-pt-who small .org { display: none; }
    .wd-pt-une-acts .wd-pt-btn { width: 42px; padding: 0; }
    .wd-pt-une-acts .wd-pt-btn .lbl { display: none; }
    .wd-pt-une--photo { grid-template-columns: 1fr; padding-right: 20px; }
    .wd-pt-une-pic { order: -1; aspect-ratio: 3 / 2; margin: -8px -6px 18px; }
    .wd-pt-live li { grid-template-columns: 52px minmax(0, 1fr); }
    .wd-pt-live li > .wd-st { display: none; }
    .wd-pt-card { padding: 18px 18px 6px; }
    .wd-pt-acts > li { grid-template-columns: 40px minmax(0, 1fr); padding: 14px 0; gap: 10px 14px; }
    .wd-pt-acts > li > .wd-pt-btn, .wd-pt-acts > li > .wd-pt-act-form { grid-column: 2; justify-self: start; }
    .wd-pt-acts > li .wd-pt-btn { height: 38px; }
    .wd-pt-ic { width: 40px; height: 40px; border-radius: 12px; }
    .wd-pt-som { grid-template-columns: 1fr; }
    .wd-pt-som li:nth-child(2) { border-top: 1px solid var(--wd-card-border); }
    .wd-pt-som a { height: 54px; }
    .wd-pt-hollow--card { padding: 20px 18px; align-items: flex-start; }
    .wd-pt-write-form { padding: 18px; }
    .wd-pt-ft { padding: 18px 16px 24px; }
}
@keyframes wd-pt-sheet-in { from { translate: 0 24px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes wd-pt-veil-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .wd-pt-main > *, .wd-pt-n, .wd-pt-pulse, .wd-pt-dot, .wd-pt-pop.dropdown-menu.show, .wd-pt-tick .ms, .wd-pt-hd .dropdown::before { animation: none !important; }
    .wd-pt-ic, .wd-pt-som a > .ms:first-child, .wd-pt-som .chev, .wd-pt-une-pic img, .wd-pt-j-alt, .wd-pt-hd-btn .ms, .wd-pt-hd-link .ms, .wd-pt-me { transition: none !important; transform: none !important; }
}

/* Tâche partagée avec le client (24/10/2026) : un œil discret dans les listes
   (tâches, rétroplanning), un libellé dans la fiche ; l'interrupteur du
   formulaire n'apparaît que si un événement est choisi. */
.wd-tk-shared { flex: none; display: inline-flex; align-items: center; gap: 5px; color: var(--ep-text-muted); }
.wd-tk-shared .ms { font-size: 17px; }
.wd-tk-shared.is-label { margin-left: 10px; font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-clf-sec:has(select[name$="[event]"] option:checked[value=""]) .wd-tkf-share { display: none; }
.wd-tkf-share { margin: 2px 0 6px; }
/* --wd-gris n'est défini que dans .wd-set : l'aide de l'interrupteur sortait en noir */
.wd-tkf-share .wd-bif-switch-t small { color: var(--ep-text-secondary); }

/* Préparatifs du portail : les tâches partagées, une colonne, case « C'est fait » */
.wd-pt-prep { max-width: var(--wd-pt-col); display: flex; flex-direction: column; gap: 20px; }
.wd-pt-prep .wd-page-head { margin-bottom: 0; }
.wd-pt-prep > .wd-pt-card { padding-bottom: 6px; }
.wd-pt-todos { list-style: none; margin: 0; padding: 0; }
.wd-pt-todo { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: start; gap: 4px 16px; padding: 16px 0; border-top: 1px solid var(--wd-card-border); scroll-margin-top: 90px; }
.wd-pt-todo:first-child { border-top: 0; }
.wd-pt-todo .wd-retro-tick { margin-top: 2px; }
.wd-pt-todo .wd-retro-box { width: 20px; height: 20px; }
.wd-pt-todo-txt { min-width: 0; }
.wd-pt-todo-txt b { display: block; font-weight: 600; font-size: 0.98rem; color: var(--wd-onyx); }
.wd-pt-todo-txt p { margin: 4px 0 0; font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-pt-todo-when { font-size: 0.84rem; color: var(--ep-text-secondary); white-space: nowrap; padding-top: 2px; }
.wd-pt-todo.is-done .wd-pt-todo-txt b { color: var(--ep-text-muted); font-weight: 500; text-decoration: line-through; text-decoration-color: var(--wd-hairline-2); }
.wd-pt-todo:target { background: var(--wd-pt-veil); border-radius: 12px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.wd-pt-done { padding-top: 10px; }
.wd-pt-done > summary { list-style: none; display: flex; align-items: center; gap: 8px; height: 40px; cursor: pointer; font-family: var(--wd-font-display); font-weight: 600; font-size: 1.02rem; color: var(--wd-onyx); }
.wd-pt-done > summary::-webkit-details-marker { display: none; }
.wd-pt-done > summary .ms { margin-left: auto; font-size: 20px; color: var(--ep-text-secondary); transition: transform 200ms var(--wd-ease); }
.wd-pt-done[open] > summary .ms { transform: rotate(180deg); }
@media (max-width: 640px) {
    .wd-pt-todo { grid-template-columns: 20px minmax(0, 1fr); gap: 4px 14px; }
    .wd-pt-todo-when { grid-column: 2; padding-top: 0; white-space: normal; }
}

/* ============================================================
   SITE DE MARIAGE — CRÉATION PAR LE COUPLE (piste A3, 24/10/2026)
   Page « Votre site » (grammaire .wd-pt-*), rubriques à enregistrement
   automatique avec aperçu en direct, partage, invitations par foyer,
   démarrage express. Préfixe .wd-sw-* (« site web »). Blanc, sans serif,
   l'or en petites touches, boutons rectangulaires.
   ============================================================ */
.wd-pt-link { display: inline-flex; align-items: center; gap: 4px; color: var(--wd-onyx); font-weight: 500; font-size: 0.92rem; text-decoration: none; }
.wd-pt-link > span:first-child { text-decoration: underline; text-decoration-color: var(--wd-hairline-2); text-underline-offset: 4px; }
.wd-pt-link:hover > span:first-child { text-decoration-color: currentColor; }
.wd-pt-link .ms { font-size: 18px; transition: transform 160ms var(--wd-ease); }
.wd-pt-link:hover .ms { transform: translateX(2px); }
.wd-sw-une .wd-pt-une-top { gap: 10px; }
.wd-sw-state { height: 26px; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.82); font-size: 0.8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.wd-sw-state.is-on { background: var(--wd-jaune-pale); color: var(--wd-pt-gold-ink); }
.wd-sw-url { margin: 10px 0 0; display: flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.6); font-size: 0.88rem; overflow-wrap: anywhere; }
.wd-sw-url .ms { font-size: 17px; }
.wd-sw-une .wd-pt-une-acts form { margin: 0; }
.wd-sw-nopic { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed rgba(255, 255, 255, 0.28); color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 0.86rem; text-align: center; padding: 16px; }
.wd-sw-nopic .ms { font-size: 28px; }
.wd-sw-nopic:hover { color: #FFFFFF; border-color: rgba(255, 255, 255, 0.5); }
.wd-sw-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; padding-top: 12px; border-top: 1px solid var(--wd-card-border); }
.wd-sw-more form { margin: 0; }
.wd-sw-textbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 0.86rem; color: var(--ep-text-secondary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wd-sw-textbtn:hover { color: var(--wd-onyx); }

/* Une rubrique : le formulaire à gauche, l'aperçu dans un téléphone à droite */
.wd-sw-sec { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 56px; padding: 8px 0 40px; }
.wd-sw-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.wd-sw-col > .wd-clf-card, .wd-sw-col > form > .wd-clf-card { margin-bottom: 0; }
.wd-sw-form { display: flex; flex-direction: column; gap: 16px; }
.wd-sw-form.wd-clf-card { padding: 20px 24px 8px; }
.wd-sw-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 34px; padding: 0 10px 0 6px; margin-left: -6px; border-radius: var(--wd-r-ctl); color: var(--ep-text-secondary); font-size: 0.88rem; font-weight: 500; text-decoration: none; }
.wd-sw-back:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-sw-back .ms { font-size: 19px; }
.wd-sw-k { font-size: 0.86rem; color: var(--ep-text-secondary); margin: 0 0 -10px; font-weight: 500; }
.wd-sw-h1 { font-family: var(--wd-font-display); font-weight: 600; font-size: 2.2rem; line-height: 1.05; letter-spacing: -0.035em; margin: 0; color: var(--wd-onyx); }
.wd-sw-lead { font-size: 1rem; color: var(--ep-text-secondary); margin: -6px 0 0; max-width: 560px; line-height: 1.5; }
.wd-sw-card-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 12px; }
.wd-sw-card-hd h2 { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.04rem; letter-spacing: -0.02em; margin: 0; }
.wd-sw-card-hd small { font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-sw-save { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-sw-save .ms { font-size: 18px; }
.wd-sw-save.is-error, [data-wedding-site-status-short].is-error { color: var(--wd-st-danger); }
.wd-sw-fixed { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 0 0 16px; border-radius: var(--wd-r-ctl); background: var(--wd-papier); }
.wd-sw-fixed .ms { font-size: 20px; color: var(--ep-text-secondary); margin-top: 1px; }
.wd-sw-fixed b { display: block; font-weight: 600; font-size: 0.94rem; }
.wd-sw-fixed small { display: block; font-size: 0.82rem; color: var(--ep-text-secondary); margin-top: 2px; }

/* Étapes du programme et rubriques affichées : un interrupteur par ligne */
.wd-sw-steps { list-style: none; margin: 0 0 8px; padding: 0; }
.wd-sw-steps li { border-top: 1px solid var(--wd-card-border); }
.wd-sw-steps li:first-child { border-top: 0; }
.wd-sw-step { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; margin: 0; cursor: pointer; }
.wd-sw-step:not(:has(.h)) { grid-template-columns: minmax(0, 1fr) auto; }
.wd-sw-step .h { font-family: var(--wd-font-display); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ep-text-secondary); font-size: 0.92rem; }
.wd-sw-step .x b { font-weight: 600; font-size: 0.95rem; display: block; color: var(--wd-onyx); }
.wd-sw-step .x small { font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-sw-step:has(input:not(:checked)) .x b { color: var(--ep-text-secondary); font-weight: 500; }
.wd-sw-switch { position: relative; display: inline-flex; }
.wd-sw-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-sw-switch input:checked + .wd-bif-switch-ui { background: var(--wd-onyx); }
.wd-sw-switch input:checked + .wd-bif-switch-ui::after { transform: translateX(16px); }
.wd-sw-switch input:focus-visible + .wd-bif-switch-ui { box-shadow: 0 0 0 3px rgba(201, 160, 99, 0.45); }
.wd-sw-empty { color: var(--ep-text-secondary); font-size: 0.92rem; margin: 0 0 14px; list-style: none; }
.wd-sw-aside-link { margin: 0; }

/* Listes extensibles : une carte claire par ligne */
.wd-sw-rowsets { display: flex; flex-direction: column; gap: 12px; }
.wd-sw-rowset { position: relative; padding: 14px 14px 4px; border: 1px solid var(--wd-card-border); border-radius: 14px; background: #FFFFFF; }
.wd-sw-rowset .mb-3 { margin-bottom: 10px !important; }
.wd-sw-rm { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 6px; margin: 0 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ep-text-secondary); font-size: 0.84rem; cursor: pointer; }
.wd-sw-rm .ms { font-size: 18px; }
.wd-sw-rm:hover { background: var(--wd-st-danger-bg, #FDECEC); color: var(--wd-st-danger); }
.wd-sw-collection > .wd-clf-add { margin-bottom: 14px; }
.wd-sw-suggest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.wd-sw-suggest small { color: var(--ep-text-secondary); font-size: 0.84rem; }
.wd-sw-suggest .wd-clf-add { margin: 0; }
.wd-sw-tip p { margin: 8px 0 0; }

/* Photos du site */
.wd-sw-photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; }
.wd-sw-photos form { margin: 0; }
.wd-sw-photo { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 1px solid var(--wd-card-border); border-radius: 12px; overflow: hidden; background: var(--wd-papier); cursor: crosshair; }
.wd-sw-photo img { width: 100%; height: 100%; object-fit: contain !important; display: block; }
.wd-sw-photos li.is-cover .wd-sw-photo { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--wd-onyx); }
.wd-sw-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid #FFFFFF; background: rgba(27, 24, 22, 0.55); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); pointer-events: none; transition: left 160ms var(--wd-ease), top 160ms var(--wd-ease); }
.wd-sw-photo-acts { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; min-height: 32px; }
.wd-sw-photo-acts .wd-sw-rm { margin: 0; }
.wd-sw-help { font-size: 0.82rem; color: var(--ep-text-secondary); margin: 12px 0 0; }
.wd-sw-drop { margin: 16px 0 12px; }
.wd-sw-drop label { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1.5px dashed var(--wd-hairline-2); border-radius: var(--wd-r-card); cursor: pointer; margin: 0; }
.wd-sw-drop label:hover { border-color: var(--wd-onyx); }
.wd-sw-drop .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--wd-papier); display: grid; place-items: center; flex: none; }
.wd-sw-drop .t { flex: 1; min-width: 0; }
.wd-sw-drop .t b { display: block; font-weight: 600; font-size: 0.95rem; }
.wd-sw-drop .t small { display: block; font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-sw-drop.wd-clf-card { padding: 4px 16px; }
.wd-sw-thumbs { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.wd-sw-thumbs form { margin: 0; }
.wd-sw-thumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--wd-papier); cursor: pointer; transition: transform 160ms var(--wd-ease); }
.wd-sw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-sw-thumb:hover:not(:disabled) { transform: translateY(-2px); }
.wd-sw-thumb.is-on { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--wd-onyx); cursor: default; }
.wd-sw-thumb .tick { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--wd-onyx); color: #FFFFFF; display: grid; place-items: center; }
.wd-sw-thumb .tick .ms { font-size: 16px; }

/* Apparence : modèles (aperçus en miniature), réglages, couleurs */
.wd-sw-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.wd-sw-model { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border: 1px solid var(--wd-card-border); border-radius: 16px; cursor: pointer; margin: 0; transition: border-color 150ms var(--wd-ease); }
.wd-sw-model:hover { border-color: var(--wd-hairline-2); }
.wd-sw-model input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-sw-model:has(input:checked) { border-color: var(--wd-onyx); box-shadow: 0 0 0 1px var(--wd-onyx); }
.wd-sw-model:has(input:focus-visible) { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-sw-model-pic { position: relative; width: 195px; height: 340px; align-self: center; overflow: hidden; border-radius: 14px; border: 1px solid var(--wd-card-border); background: #FFFFFF; margin-bottom: 8px; }
.wd-sw-model-pic iframe { position: absolute; top: 0; left: 0; width: 390px; height: 680px; border: 0; transform: scale(0.5); transform-origin: 0 0; pointer-events: none; }
.wd-sw-models--big .wd-sw-model-pic { width: 234px; height: 420px; }
.wd-sw-models--big .wd-sw-model-pic iframe { height: 700px; transform: scale(0.6); }
.wd-sw-model b { font-weight: 600; font-size: 0.98rem; color: var(--wd-onyx); }
.wd-sw-model small { font-size: 0.84rem; color: var(--ep-text-secondary); line-height: 1.4; }
.wd-sw-tunes { display: flex; flex-direction: column; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.wd-sw-tune .form-label { margin-bottom: 8px; }
.wd-sw-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.wd-sw-swatches label { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.wd-sw-swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-sw-swatches .sw { width: 40px; height: 40px; border-radius: 8px; background: var(--sw); display: grid; place-items: center; color: #FFFFFF; }
.wd-sw-swatches .sw.is-none { background: linear-gradient(135deg, #FFFFFF 50%, #111111 50%); border: 1px solid var(--wd-hairline-2); color: transparent; }
.wd-sw-swatches .sw .ms { font-size: 20px; opacity: 0; }
.wd-sw-swatches input:checked + .sw { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--wd-onyx); }
.wd-sw-swatches input:checked + .sw .ms { opacity: 1; }
.wd-sw-swatches input:checked + .sw.is-none .ms { color: var(--wd-jaune); }
.wd-sw-swatches input:focus-visible + .sw { outline: 2px solid var(--wd-onyx); outline-offset: 4px; }
.wd-sw-swatches small { font-size: 0.78rem; color: var(--ep-text-secondary); }
.wd-sw-slug { display: flex; align-items: center; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); overflow: hidden; }
.wd-sw-slug span { padding: 0 4px 0 12px; color: var(--ep-text-secondary); font-size: 0.88rem; white-space: nowrap; }
.wd-sw-slug .form-control { border: 0 !important; box-shadow: none !important; padding-left: 0; }

/* L'aperçu en direct, dans un téléphone (ou un écran d'ordinateur) */
.wd-sw-prev { position: sticky; top: 90px; align-self: start; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 6px; }
.wd-sw-live { color: var(--ep-text-secondary); font-size: 0.86rem; display: inline-flex; align-items: center; gap: 7px; }
.wd-sw-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--wd-jaune); display: inline-block; animation: wd-breathe 2.8s var(--wd-ease) infinite; }
.wd-sw-dev { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-sw-frame { position: relative; width: 300px; height: 626px; padding: 10px; border-radius: 44px; background: var(--wd-onyx); box-shadow: 0 30px 60px -30px rgba(27, 24, 22, 0.45); overflow: hidden; }
.wd-sw-frame iframe { position: absolute; top: 10px; left: 10px; width: 390px; height: 844px; border: 0; border-radius: 47px; background: #FFFFFF; transform: scale(0.7179); transform-origin: 0 0; }
.wd-sw-prev:has(#wd-sw-desk:checked) .wd-sw-frame { width: 100%; max-width: 520px; height: 352px; padding: 8px; border-radius: 14px; }
.wd-sw-prev:has(#wd-sw-desk:checked) .wd-sw-frame iframe { top: 8px; left: 8px; width: 1280px; height: 840px; border-radius: 16px; transform: scale(0.4); }
.wd-sw-devs label { cursor: pointer; }
.wd-sw-devs span { gap: 6px; }
.wd-sw-devs .ms { font-size: 18px; }
.wd-sw-prev:has(#wd-sw-phone:checked) label[for="wd-sw-phone"] > span,
.wd-sw-prev:has(#wd-sw-desk:checked) label[for="wd-sw-desk"] > span { background: #FFFFFF; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.wd-sw-mbar { display: none; }

/* Partager, invitations */
.wd-sw-page { display: flex; flex-direction: column; gap: 22px; }
.wd-sw-page > header { display: flex; flex-direction: column; gap: 14px; }
.wd-sw-linkrow { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; flex-wrap: wrap; }
.wd-sw-linktxt { flex: 1; min-width: 0; font-size: 0.95rem; font-weight: 500; overflow-wrap: anywhere; padding: 10px 14px; border-radius: var(--wd-r-ctl); background: var(--wd-papier); }
.wd-sw-message { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--wd-r-ctl); background: var(--wd-papier); font-size: 0.95rem; line-height: 1.5; }
.wd-sw-sharebar { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; }
.wd-sw-qrcard { display: flex; align-items: center; gap: 24px; padding: 20px 24px; }
.wd-sw-qrcard img { border-radius: 12px; border: 1px solid var(--wd-card-border); flex: none; }
.wd-sw-qrcard h2 { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.1rem; margin: 0 0 6px; }
.wd-sw-qrcard p { margin: 0 0 14px; color: var(--ep-text-secondary); font-size: 0.92rem; }
.wd-portal-main.wd-sw-wide { max-width: 1000px; }
.wd-sw-pagehd { align-items: flex-start; }
.wd-sw-pagehd > div { display: flex; flex-direction: column; gap: 14px; }
.wd-sw-warn { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 14px; border-radius: var(--wd-r-ctl); background: var(--wd-jaune-pale); color: var(--wd-pt-gold-ink); font-size: 0.9rem; }
.wd-sw-filter { align-self: flex-start; }
.wd-sw-filter a { text-decoration: none; }
.wd-sw-filter a span { height: 34px; padding: 0 14px; border-radius: 8px; display: inline-flex; align-items: center; font-size: 0.86rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-sw-filter a[aria-current] span { background: #FFFFFF; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.wd-sw-hh ul { list-style: none; margin: 0; padding: 0; }
.wd-sw-hh li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--wd-card-border); }
.wd-sw-hh li:first-child { border-top: 0; }
.wd-sw-hh-who b { display: block; font-weight: 600; font-size: 0.96rem; }
.wd-sw-hh-who small { display: block; font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-sw-hh-who .is-todo { color: var(--wd-pt-gold-ink); }
.wd-sw-hh li.is-sent .wd-sw-hh-who b::after { content: 'envoyée'; margin-left: 8px; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--wd-st-ok-bg); color: var(--wd-st-ok); font-size: 0.72rem; font-weight: 600; display: inline-flex; align-items: center; vertical-align: 2px; }
.wd-sw-code { font-family: var(--wd-font-display); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.08em; color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; }
.wd-sw-hh-acts { display: flex; gap: 6px; }
.wd-sw-hh-acts .wd-pt-btn { height: 38px; padding: 0 12px; }
.wd-sw-iconbtn { width: 38px; padding: 0 !important; }

/* Démarrage express */
.wd-sw-startbar { display: flex; align-items: center; gap: 16px; }
.wd-sw-segs { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 320px; }
.wd-sw-segs i { height: 4px; border-radius: 2px; background: var(--wd-hairline-2); display: block; }
.wd-sw-segs i.done { background: var(--wd-onyx); }
.wd-sw-segs i.now { background: var(--wd-jaune); }
.wd-sw-start .wd-sw-k { margin: 0; }
.wd-sw-start .wd-clf-card { padding: 20px 24px; margin: 0; }
.wd-sw-startacts { display: flex; justify-content: flex-end; gap: 10px; }
.wd-sw-chosen { margin: 0; display: flex; align-items: center; gap: 14px; }
.wd-sw-chosen img { width: 96px; height: 120px; object-fit: cover; border-radius: 12px; }
.wd-sw-chosen figcaption { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

@media (max-width: 991.98px) {
    .wd-sw-sec { display: block; padding-bottom: 96px; }
    .wd-sw-prev { display: none; }
    .wd-sw-save { display: none; }
    .wd-sw-mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #FFFFFF; border-top: 1px solid var(--wd-card-border); }
    .wd-sw-mbar > span { display: inline-flex; align-items: center; gap: 6px; color: var(--ep-text-secondary); font-size: 0.86rem; min-width: 0; }
    .wd-sw-mbar .ms { font-size: 18px; }
}
@media (max-width: 640px) {
    .wd-sw-h1 { font-size: 1.8rem; }
    .wd-sw-form.wd-clf-card, .wd-sw-start .wd-clf-card { padding: 16px; }
    .wd-sw-hh li { grid-template-columns: minmax(0, 1fr) auto; }
    .wd-sw-hh-acts { grid-column: 1 / -1; flex-wrap: wrap; gap: 6px; }
    .wd-sw-hh-acts .wd-pt-btn { padding: 0 12px; gap: 6px; }
    .wd-sw-hh-acts .wd-pt-btn:not(.wd-sw-iconbtn) > .ms { display: none; }
    .wd-sw-hh-acts .wd-sw-iconbtn { width: 38px; padding: 0 !important; }
    .wd-sw-qrcard { flex-direction: column; align-items: flex-start; }
    .wd-sw-models { grid-template-columns: 1fr; }
    .wd-sw-drop label { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-sw-live i { animation: none; }
    .wd-sw-dot, .wd-sw-thumb { transition: none; }
}

/* ============================================================
   PORTAIL — PHOTOS ET INSPIRATION (lot « photos », revue UX 24/10/2026)
   Galeries, photos des invités, inspiration, droit à l'image, vidéo
   souvenir. Même grammaire que l'accueil « Le fil » : blanc, sans serif,
   l'or en petites touches, boutons rectangulaires (rayon 10), cartes
   soulevées, creux en pointillés. L'image d'abord : l'interface s'efface.
   À ajouter en fin de theme.css, après la section .wd-sw-*.
   ============================================================ */

/* ── Vignettes-portes : une galerie, un tableau d'inspiration ── */
.wd-pt-gals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.wd-pt-gals > li { min-width: 0; }
.wd-pt-gal { display: flex; flex-direction: column; height: 100%; background: var(--wd-card-bg); border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); overflow: hidden; color: var(--wd-onyx); text-decoration: none; transition: transform 220ms var(--wd-ease), box-shadow 220ms var(--wd-ease); }
.wd-pt-gal:hover { color: var(--wd-onyx); transform: translateY(-2px); box-shadow: 0 1px 2px rgba(27, 24, 22, 0.06), 0 24px 40px -20px rgba(27, 24, 22, 0.34); }
.wd-pt-gal:focus-visible { outline: 2px solid var(--wd-onyx); outline-offset: 3px; }
.wd-pt-gal-pic { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--wd-papier); overflow: hidden; }
.wd-pt-gal-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms var(--wd-ease); }
.wd-pt-gal:hover .wd-pt-gal-pic img { transform: scale(1.03); }
.wd-pt-gal-pic > .wd-st { position: absolute; top: 12px; left: 12px; z-index: 1; gap: 6px; }
.wd-pt-gal-pic > .ms { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; font-size: 34px; color: var(--ep-text-muted); }
.wd-pt-gal-txt { display: flex; align-items: center; gap: 12px; padding: 14px 18px 16px; }
.wd-pt-gal-txt > span:first-child { min-width: 0; flex: 1; }
.wd-pt-gal-txt b { display: block; font-weight: 600; font-size: 1rem; }
.wd-pt-gal-txt small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-pt-gal-txt small em { font-style: normal; color: var(--wd-pt-gold-ink); font-weight: 500; }
.wd-pt-gal-txt > .ms { font-size: 20px; color: #B5ADA2; flex: none; transition: transform 200ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-pt-gal:hover .wd-pt-gal-txt > .ms { transform: translateX(2px); color: var(--wd-onyx); }
/* Une seule vignette : elle prend toute la largeur, en grand */
.wd-pt-gals > li:only-child { grid-column: 1 / -1; }
.wd-pt-gals > li:only-child .wd-pt-gal-pic { aspect-ratio: 2 / 1; }
/* Couverture de tableau : jusqu'à 4 photos en mosaïque… */
.wd-pt-gal-pic.is-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; }
.wd-pt-gal-pic.is-grid img { min-height: 0; }
/* (de type : la pastille « À regarder » est une sœur des images) */
.wd-pt-gal-pic.is-grid img:only-of-type { grid-column: 1 / -1; grid-row: 1 / -1; }
.wd-pt-gal-pic.is-grid img:first-of-type:nth-last-of-type(2),
.wd-pt-gal-pic.is-grid img:first-of-type:nth-last-of-type(2) ~ img,
.wd-pt-gal-pic.is-grid img:first-of-type:nth-last-of-type(3) { grid-row: 1 / -1; }
/* …sinon les bandes de la palette (rien n'est stocké des pins Pinterest) */
.wd-pt-gal-swatches { position: absolute; inset: 0; display: flex; }
.wd-pt-gal-swatches i { flex: 1; background: var(--c); }

/* ── En-tête de carte avec une action à droite ── */
.wd-pt-card-hd--act { align-items: center; margin-bottom: 14px; }
.wd-pt-card-hd--act > .wd-pt-btn, .wd-pt-card-hd--act > form, .wd-pt-card-hd--act > .wd-pt-link { margin-left: auto; }
.wd-pt-card-hd--act > form { margin-top: 0; margin-bottom: 0; }

/* ── Photos de vos invités : vignettes carrées, deux gestes dessous ── */
.wd-pt-shots { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px 14px; }
.wd-pt-shots > li { min-width: 0; }
.wd-pt-shot-pic { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--wd-papier); }
.wd-pt-shot-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-pt-shots small { display: block; margin-top: 8px; font-size: 0.82rem; color: var(--ep-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-pt-shots small b { color: var(--wd-onyx); font-weight: 600; }
.wd-pt-shot-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.wd-pt-shot-acts form { margin: 0; }
.wd-pt-shot-acts .wd-pt-btn { min-width: 0; width: 100%; height: 36px; padding: 0 8px; gap: 4px; font-size: 0.84rem; }
.wd-pt-shot-acts .wd-pt-btn .ms { font-size: 18px; }
.wd-pt-shots--small { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px 10px; }
.wd-pt-shots--small .wd-pt-shot-pic { border-radius: 10px; }

/* ── Droit à l'image : historique replié ── */
.wd-pt-hist { list-style: none; margin: 0; padding: 0 0 12px; }
.wd-pt-hist li { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; align-items: start; gap: 4px 14px; padding: 12px 0; border-top: 1px solid var(--wd-card-border); font-size: 0.9rem; }
.wd-pt-hist .d { color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; }
.wd-pt-hist small { display: block; margin-top: 2px; font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-pt-card > .wd-pt-done { padding-top: 0; }
.wd-pt-card > .wd-pt-done > summary { height: 44px; margin: -6px 0 0; }
.wd-pt-card > .wd-pt-done[open] > summary { margin-bottom: 4px; }
.wd-pt-card > .wd-pt-done > summary small { font-family: var(--wd-font-sans); font-weight: 400; font-size: 0.86rem; color: var(--ep-text-secondary); }

/* ── Vidéo souvenir : choix des photos ── */
.wd-pt-picks { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.wd-pt-pick { position: relative; display: block; aspect-ratio: 1; margin: 0; border-radius: 10px; overflow: hidden; background: var(--wd-papier); cursor: pointer; }
.wd-pt-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-pt-pick img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 200ms var(--wd-ease); }
.wd-pt-pick .tick { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #FFFFFF; background: rgba(27, 24, 22, 0.28); display: grid; place-items: center; color: #FFFFFF; }
.wd-pt-pick .tick .ms { font-size: 16px; opacity: 0; }
.wd-pt-pick:has(input:checked) img { transform: scale(0.9); border-radius: 8px; }
.wd-pt-pick:has(input:checked) .tick { background: var(--wd-onyx); border-color: var(--wd-onyx); }
.wd-pt-pick:has(input:checked) .tick .ms { opacity: 1; }
.wd-pt-pick:has(input:focus-visible) { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-pt-mv-step { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
.wd-pt-mv-step:first-child { margin-top: 6px; }
.wd-pt-mv-step b { font-weight: 600; font-size: 0.98rem; }
.wd-pt-mv-step small { font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-pt-mv-step small b { font-size: inherit; color: var(--wd-onyx); }

/* ── Inspiration : la planche dans la colonne de 1000 px du portail ──
   Le widget Pinterest ne descend pas sous 236 px : 4 colonnes dans 936 px
   en feraient 219. Trois colonnes (298 px), deux sous 900 px (règle
   existante), et le pin pleine largeur sous 576 px (règle existante). */
@media (min-width: 900px) { .wd-portal .wd-mood-board { column-count: 3; } }

/* ── Inspiration : compteurs sous le titre, univers dans une carte du portail ── */
.wd-mood-tally { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.wd-pt-card > .wd-muniverse { border: 0; padding: 0 0 14px; margin: 0; background: none; box-shadow: none; }

/* ── Inspiration : réactions rectangulaires (rayon 10), libellées sous un pin ── */
.wd-portal .wd-mreact { border-radius: var(--wd-r-ctl); height: 36px; min-width: 36px; }
.wd-portal .wd-mtile--embed .wd-mreacts { padding: 10px 0 0; gap: 8px; flex-wrap: wrap; }
.wd-portal .wd-mtile--embed .wd-mreact { padding: 0 12px; font-size: 0.84rem; font-weight: 500; white-space: nowrap; }
.wd-portal .wd-mtile--embed .wd-mreact .ms { font-size: 18px; }

@media (max-width: 640px) {
    .wd-pt-gals { grid-template-columns: 1fr; gap: 16px; }
    .wd-pt-gals > li:only-child .wd-pt-gal-pic { aspect-ratio: 4 / 3; }
    .wd-pt-gal-txt { padding: 12px 16px 14px; }
    .wd-pt-shots { grid-template-columns: 1fr 1fr; gap: 16px 10px; }
    .wd-pt-shot-acts .wd-pt-btn .ms { display: none; }
    .wd-pt-shots--small { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .wd-pt-hist li { grid-template-columns: minmax(0, 1fr) auto; }
    .wd-pt-hist .d { grid-column: 1 / -1; }
    .wd-pt-picks { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-pt-gal, .wd-pt-gal-pic img, .wd-pt-gal-txt > .ms, .wd-pt-pick img { transition: none !important; transform: none !important; }
}

/* ── Droit à l'image : l'état de l'accord sous le titre, la note du pied ── */
.wd-ir-state { margin: 0; }
/* Un usage non accordé n'est pas « éteint » : même poids que les autres */
.wd-ir .wd-sw-step:has(input:not(:checked)) .x b { color: var(--wd-onyx); font-weight: 600; }
.wd-ir-note { font-size: 0.84rem; color: var(--ep-text-secondary); flex: 1 1 260px; }
.wd-pt-more > .wd-sw-steps { margin-top: 2px; }

/* ============================================================
   PORTAIL — ARGENT ET ÉQUIPE (lot « argent », 24/10/2026)
   Devis et factures, un devis, budget, prestataires. Même grammaire
   que l'accueil « Le fil » : carte noire (le chiffre qui compte),
   une carte blanche de lignes, un creux. Montants en chiffres
   tabulaires ; l'or seulement en petites touches (repère d'enveloppe,
   « à régler »).
   ============================================================ */

/* Montant en titre de carte noire : « 9 492 € TTC », « 20 500 € sur 25 000 € » */
.wd-pt-une h1.is-amount { font-variant-numeric: tabular-nums; }
.wd-pt-h1-sub { font-size: 0.4em; font-weight: 500; letter-spacing: -0.01em; color: rgba(255, 255, 255, 0.62); margin-left: 8px; white-space: nowrap; }

/* Jauge dans la carte noire : réglé | à régler | estimé ; repère d'or = l'enveloppe */
.wd-pt-gauge { position: relative; margin: 22px 0 0; }
.wd-pt-gauge-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.12); }
.wd-pt-gauge-bar > i { display: block; height: 100%; flex: none; }
.wd-pt-gauge-bar .is-paid, .wd-pt-legend .is-paid { background: #FFFFFF; }
.wd-pt-gauge-bar .is-due, .wd-pt-legend .is-due { background: rgba(255, 255, 255, 0.42); }
.wd-pt-gauge-bar .is-guess, .wd-pt-legend .is-guess { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0 2px, transparent 2px 5px); }
.wd-pt-gauge-cap { position: absolute; top: -5px; width: 2px; height: 18px; margin-left: -1px; border-radius: 1px; background: var(--wd-jaune); }
.wd-pt-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.84rem; color: rgba(255, 255, 255, 0.62); min-width: 0; }
.wd-pt-legend li { white-space: nowrap; }
.wd-pt-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.wd-pt-legend i.is-guess { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.wd-pt-legend b { color: #FFFFFF; font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* Lignes d'argent : icône | texte | montant + état | action.
   Sert aux documents, aux postes du budget, aux lignes d'un devis (--plain)
   et aux prestataires (--who). */
.wd-pt-lines { list-style: none; margin: 0; padding: 0; }
.wd-pt-lines > li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; grid-template-areas: "ic txt amt act"; align-items: center; gap: 4px 18px; padding: 16px 0; border-top: 1px solid var(--wd-card-border); scroll-margin-top: 90px; }
.wd-pt-lines > li:first-child { border-top: 0; }
.wd-pt-lines > li > .wd-pt-ic { grid-area: ic; overflow: hidden; }
.wd-pt-lines > li > .wd-pt-act-txt { grid-area: txt; }
.wd-pt-lines > li > .wd-pt-amt { grid-area: amt; }
.wd-pt-lines > li > .wd-pt-line-acts { grid-area: act; display: flex; gap: 6px; }
.wd-pt-lines > li:target { background: var(--wd-pt-veil); border-radius: 12px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.wd-pt-line-acts .wd-pt-btn { height: 38px; padding: 0 12px; }
.wd-pt-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-pt-ic .bi { font-size: 19px; line-height: 1; }
.wd-pt-lines > li:not(:has(> .wd-pt-line-acts)) { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "ic txt amt"; }
.wd-pt-lines--plain > li, .wd-pt-lines--plain > li:not(:has(> .wd-pt-line-acts)) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "txt amt"; padding: 14px 0; }
.wd-pt-lines--who > li { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "ic txt act"; }
.wd-pt-lines--who > li:not(:has(> .wd-pt-line-acts)) { grid-template-areas: "ic txt txt"; }
.wd-pt-amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wd-pt-amt b { display: block; font-weight: 600; font-size: 0.98rem; color: var(--wd-onyx); }
.wd-pt-amt small { display: block; font-size: 0.82rem; color: var(--ep-text-secondary); margin-top: 2px; }
.wd-pt-amt small.is-todo { color: var(--wd-pt-gold-ink); font-weight: 500; }
.wd-pt-amt small.is-late { color: var(--wd-st-danger); font-weight: 500; }
.wd-pt-amt small.is-ok { color: var(--wd-st-ok); }
.wd-pt-amt small.is-mute { color: var(--wd-pt-mute); }

/* Totaux d'un devis : le TTC d'abord ; le hors taxes se replie */
.wd-pt-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; margin: 0; padding: 14px 0 16px; border-top: 1px solid var(--wd-card-border); font-variant-numeric: tabular-nums; }
.wd-pt-sum dt { font-weight: 400; font-size: 0.9rem; color: var(--ep-text-secondary); }
.wd-pt-sum dd { margin: 0; text-align: right; font-size: 0.9rem; color: var(--ep-text-secondary); white-space: nowrap; }
.wd-pt-sum .is-total { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.16rem; letter-spacing: -0.01em; color: var(--wd-onyx); }
.wd-pt-more .wd-pt-sum { border-top: 0; padding-top: 8px; }
/* Devis à options : la case, le nom, « +350 € » ; le total au-dessous suit les cases */
.wd-pt-opts { border-top: 1px solid var(--wd-card-border); padding-top: 14px; }
.wd-pt-opts-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; font-size: 0.94rem; font-weight: 600; color: var(--wd-onyx); }
.wd-pt-opts-h small { font-size: 0.84rem; font-weight: 400; color: var(--ep-text-secondary); }
.wd-pt-opt-pick { grid-area: txt; display: flex; align-items: flex-start; gap: 12px; margin: 0; min-width: 0; cursor: pointer; }
.wd-pt-opt-pick input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--wd-onyx); cursor: pointer; }
.wd-pt-opt:not(.is-chosen) .wd-pt-amt b { color: var(--ep-text-secondary); font-weight: 500; }
.wd-pt-opt:not(.is-chosen):not(:has(.wd-pt-opt-pick)) .wd-pt-act-txt b { color: var(--ep-text-secondary); font-weight: 500; }

/* Réponse au devis */
.wd-pt-answer-lead { margin: 2px 0 16px; color: var(--ep-text-secondary); font-size: 0.94rem; line-height: 1.5; }
.wd-pt-answer-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; padding-bottom: 18px; }
.wd-pt-refuse { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 8px 0 16px; }
.wd-pt-refuse label { font-size: 0.86rem; font-weight: 500; color: var(--wd-onyx); margin: 0; }
.wd-clf .wd-pt-refuse textarea.form-control { width: 100%; height: auto; min-height: 96px; resize: vertical; line-height: 1.5; padding-top: 10px; }

/* Régler par virement : IBAN et référence à copier (lignes .wd-sw-linkrow) */
.wd-pt-pay small { display: block; font-size: 0.84rem; color: var(--ep-text-secondary); margin: 6px 0 6px; }
.wd-pt-pay .wd-sw-linktxt { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

@media (max-width: 640px) {
    .wd-pt-h1-sub { font-size: 0.46em; }
    .wd-pt-une-foot:has(.wd-pt-legend) { flex-wrap: wrap; }
    .wd-pt-legend { gap: 6px 16px; font-size: 0.8rem; }
    .wd-pt-lines > li, .wd-pt-lines > li:not(:has(> .wd-pt-line-acts)) { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "ic txt txt" ". amt act"; gap: 8px 14px; padding: 14px 0; }
    .wd-pt-lines > li > .wd-pt-amt { text-align: left; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
    .wd-pt-lines > li > .wd-pt-amt small { margin: 0; }
    .wd-pt-lines--plain > li, .wd-pt-lines--plain > li:not(:has(> .wd-pt-line-acts)) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "txt amt"; gap: 4px 14px; }
    .wd-pt-lines--plain > li > .wd-pt-amt { display: block; text-align: right; }
    .wd-pt-lines--who > li, .wd-pt-lines--who > li:not(:has(> .wd-pt-line-acts)) { grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "ic txt" "act act"; }
    .wd-pt-lines--who > li > .wd-pt-line-acts { flex-wrap: wrap; }
    .wd-pt-answer-acts .wd-pt-btn--dark { width: 100%; }
}

/* ============================================================
   PORTAIL — JOUR J ET INVITÉS (audit UX 24/10/2026)
   Programme dans une carte, liste d'invités par foyer, formulaires
   en .wd-clf. Tout le reste réutilise .wd-pt-* / .wd-sw-* / .wd-clf-*.
   À coller dans theme.css après « Préparatifs du portail ».
   ============================================================ */

/* Carte-titre : pied sans interlocuteur (une phrase à gauche), bouton qui garde son libellé sur téléphone */
.wd-pt-une-note { margin: 0; font-size: 0.86rem; color: rgba(255, 255, 255, 0.62); min-width: 0; }
.wd-pt-une-note b { color: #FFFFFF; font-weight: 600; }

/* ── Programme : la journée dans une carte, par moments ── */
.wd-pt-day { padding-bottom: 6px; }
.wd-pt-day-mo { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 0; font-size: 0.86rem; font-weight: 600; color: var(--ep-text-secondary); }
.wd-pt-day-mo:first-child { margin-top: 14px; }
.wd-pt-day-mo small { font-size: 0.82rem; font-weight: 400; color: var(--wd-pt-mute); }
.wd-pt-step { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: start; gap: 2px 18px; padding: 14px 0; border-top: 1px solid var(--wd-card-border); color: inherit; text-decoration: none; scroll-margin-top: 90px; }
.wd-pt-day-mo + .wd-pt-step { border-top: 0; }
.wd-pt-step-h { font-family: var(--wd-font-display); font-weight: 600; font-size: 1rem; line-height: 1.35; font-variant-numeric: tabular-nums; color: var(--wd-onyx); }
.wd-pt-step-h small { display: block; font-family: var(--wd-font-sans); font-weight: 400; font-size: 0.8rem; color: var(--wd-pt-mute); white-space: nowrap; }
.wd-pt-step-x { min-width: 0; }
.wd-pt-step-x b { font-weight: 600; font-size: 0.98rem; line-height: 1.35; color: var(--wd-onyx); }
.wd-pt-step-x p { margin: 3px 0 0; font-size: 0.88rem; line-height: 1.5; color: var(--ep-text-secondary); text-wrap: pretty; }
.wd-pt-step-x small { display: block; margin-top: 4px; font-size: 0.82rem; color: var(--wd-pt-mute); }
.wd-pt-step-x .wd-st { height: 22px; padding: 0 8px; margin-left: 8px; font-size: 0.74rem; vertical-align: 2px; }
/* Temps fort : l'heure passe à l'or, une pastille « Temps fort » (pas de capitales) */
.wd-pt-step.is-strong .wd-pt-step-h { color: var(--wd-pt-gold-ink); }
/* Saisie ouverte au couple : toute la ligne ouvre l'étape */
.wd-pt-step > .ms { font-size: 20px; color: #B5ADA2; align-self: center; transition: transform 200ms var(--wd-ease), color 150ms var(--wd-ease); }
a.wd-pt-step:hover .wd-pt-step-x b { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
a.wd-pt-step:hover > .ms { color: var(--wd-onyx); transform: translateX(2px); }
a.wd-pt-step:focus-visible { outline: 2px solid var(--wd-onyx); outline-offset: 2px; border-radius: 8px; }
/* Battement : une annotation dans la colonne du texte, sans trait de plus */
.wd-pt-day-gap { margin: 0; padding: 2px 0 8px 74px; font-size: 0.8rem; color: var(--wd-pt-mute); }
.wd-pt-day .wd-clf-add { margin: 8px 0 12px; }

/* ── Invités : outils (filtre + recherche) et liste par foyer ── */
.wd-pt-gl-tools { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--wd-card-border); }
.wd-pt-gl-tools .wd-clf-seg { flex: none; }
.wd-pt-gl-tools .wd-clf-seg a { text-decoration: none; }
.wd-pt-gl-tools .wd-clf-seg a span { height: 32px; padding: 0 11px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px; font-size: 0.85rem; font-weight: 500; color: var(--ep-text-secondary); white-space: nowrap; }
.wd-pt-gl-tools .wd-clf-seg a span em { font-style: normal; color: var(--wd-pt-mute); font-variant-numeric: tabular-nums; }
.wd-pt-gl-tools .wd-clf-seg a.is-todo span em { color: var(--wd-pt-gold-ink); font-weight: 600; }
.wd-pt-gl-tools .wd-clf-seg a:hover span { color: var(--wd-onyx); }
.wd-pt-gl-tools .wd-clf-seg a[aria-current] span { background: #FFFFFF; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.wd-pt-search { flex: 1 1 180px; min-width: 0; position: relative; display: flex; align-items: center; margin: 0; }
.wd-pt-search .ms { position: absolute; left: 11px; font-size: 19px; color: var(--ep-text-secondary); pointer-events: none; }
.wd-pt-search input { width: 100%; height: 38px; padding: 0 12px 0 37px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #FFFFFF; font: inherit; font-size: 0.9rem; color: var(--wd-onyx); }
.wd-pt-search input::placeholder { color: var(--wd-pt-mute); }
.wd-pt-search input:focus { outline: none; border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }

.wd-pt-gl { list-style: none; margin: 0; padding: 0; }
.wd-pt-gl-hh { padding: 8px 0; border-top: 1px solid var(--wd-card-border); }
.wd-pt-gl-hh:first-child { border-top: 0; }
/* Un foyer de plusieurs personnes : resserré, un trait à gauche, une légende dessous */
.wd-pt-gl-hh.is-multi { position: relative; padding-left: 16px; }
.wd-pt-gl-hh.is-multi::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 36px; width: 2px; border-radius: 2px; background: var(--wd-hairline-2); }
.wd-pt-gl-p { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 230px) 124px; align-items: center; gap: 0 16px; min-height: 44px; scroll-margin-top: 90px; }
.wd-pt-gl-who { min-width: 0; }
.wd-pt-gl-n { color: var(--wd-onyx); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.wd-pt-gl-n:hover { color: var(--wd-onyx); }
.wd-pt-gl-n:hover span { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-pt-gl-who small { margin-left: 8px; font-size: 0.82rem; color: var(--wd-pt-mute); white-space: nowrap; }
.wd-pt-gl-diet { font-size: 0.86rem; color: var(--ep-text-secondary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-pt-gl-diet .is-alert { color: var(--wd-onyx); font-weight: 500; }
.wd-pt-gl-cap { margin: 2px 0 2px; font-size: 0.8rem; color: var(--wd-pt-mute); }
/* La réponse : un statut qui s'ouvre en menu (Oui · Non · Sans réponse · Peut-être) */
.wd-pt-gl-p > .dropdown { justify-self: end; }
.wd-pt-gl-rsvp { border: 0; cursor: pointer; gap: 2px; height: 28px; padding: 0 6px 0 10px; font-family: var(--wd-font-sans); transition: box-shadow 150ms var(--wd-ease); }
.wd-pt-gl-rsvp .ms { font-size: 17px; opacity: 0.7; }
.wd-pt-gl-rsvp:hover, .wd-pt-gl-rsvp[aria-expanded="true"] { box-shadow: inset 0 0 0 1px currentColor; }
.wd-pt-gl-rsvp:focus-visible { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-pt-gl-menu.dropdown-menu { min-width: 180px; border-radius: 12px; border: 1px solid var(--wd-hairline); box-shadow: var(--wd-shadow-lift); padding: 0.35rem; }
.wd-pt-gl-menu form { margin: 0; }
.wd-pt-gl-menu .dropdown-item { border-radius: 8px; padding: 0.45rem 0.6rem; font-size: 0.86rem; color: var(--wd-onyx); }
.wd-pt-gl-menu .dropdown-item.active, .wd-pt-gl-menu .dropdown-item:active { background: var(--wd-papier); color: var(--wd-onyx); font-weight: 600; }
.wd-pt-gl-empty { margin: 0; padding: 26px 0 22px; text-align: center; color: var(--ep-text-secondary); font-size: 0.92rem; }
.wd-pt-gl-empty .wd-pt-link { margin-top: 8px; }
/* Suggestion de foyer : un creux d'une ligne, un bouton */
.wd-pt-hollow .wd-pt-hollow-act { margin-left: auto; flex: none; }
.wd-pt-hollow form { margin: 0; }

/* ── Formulaires du portail (invité, étape) : sur .wd-clf, cartes .wd-clf-card ── */
.wd-pt-form { display: flex; flex-direction: column; gap: 18px; }
.wd-pt-form > header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.wd-pt-form .wd-clf-card { margin: 0; padding: 18px 24px 20px; }
.wd-pt-form .wd-sw-card-hd { margin: 0 0 14px; flex-wrap: wrap; gap: 2px 12px; }
.wd-pt-form .wd-sw-card-hd h2 { flex: none; }
.wd-pt-form .wd-clf-row:last-child { margin-bottom: 0; }
.wd-pt-form .form-text { font-size: 0.8rem; color: var(--wd-pt-mute); margin-top: 5px; }
.wd-pt-form .wd-clf-row--time { grid-template-columns: 1fr 1fr auto; align-items: end; }
.wd-pt-form textarea.form-control { height: auto; min-height: 84px; padding-top: 10px; line-height: 1.5; resize: vertical; }
.wd-pt-form .wd-clf-foot { align-items: center; }
.wd-pt-form .wd-clf-foot .wd-sw-textbtn { margin-right: auto; }
/* Choix multiples (menu, allergies) : des cases rectangulaires, jamais des pilules */
.wd-pt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-pt-chips > label { margin: 0; cursor: pointer; }
.wd-pt-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-pt-chips > label > span { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--wd-hairline-2); background: #FFFFFF; display: inline-flex; align-items: center; gap: 5px; font-size: 0.86rem; color: var(--ep-text-secondary); transition: border-color 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-pt-chips > label > span > .ms { font-size: 17px; display: none; }
.wd-pt-chips > label:hover > span { border-color: var(--wd-onyx); color: var(--wd-onyx); }
.wd-pt-chips input:checked + span { background: var(--wd-onyx); border-color: var(--wd-onyx); color: #FFFFFF; }
.wd-pt-chips input:checked + span > .ms { display: inline; }
.wd-pt-chips input:focus-visible + span { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
/* Foyer : une ligne par personne qui vient avec (lien, prénom, nom, âge, retirer) */
.wd-pt-mates { display: flex; flex-direction: column; gap: 8px; }
.wd-pt-mate { display: grid; grid-template-columns: 132px minmax(0, 1fr) minmax(0, 1fr) 72px 36px; gap: 8px; align-items: center; }
.wd-pt-mate .form-select, .wd-pt-mate .form-control { height: 40px; }
/* L'âge ne se demande que pour un enfant (la ligne prend .is-child au choix « Enfant ») */
.wd-pt-mate:not(.is-child) > .is-age { visibility: hidden; }
.wd-pt-mate-x { width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--ep-text-secondary); display: grid; place-items: center; cursor: pointer; }
.wd-pt-mate-x:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-pt-mate-x .ms { font-size: 19px; }
.wd-pt-mate-adds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.wd-pt-mate-adds .wd-clf-add { margin: 0; }
.wd-pt-mate-link { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--wd-card-border); }
.wd-pt-check { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font-size: 0.9rem; color: var(--wd-onyx); cursor: pointer; }
.wd-pt-check input { width: 18px; height: 18px; accent-color: var(--wd-onyx); margin: 0; }
/* « Réponse et repas » replié tant qu'on ne sait rien */
.wd-pt-fold { padding: 0 !important; }
.wd-pt-fold > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 18px 24px; cursor: pointer; }
.wd-pt-fold > summary::-webkit-details-marker { display: none; }
.wd-pt-fold-t { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
.wd-pt-fold > summary h2 { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.04rem; letter-spacing: -0.02em; margin: 0; color: var(--wd-onyx); }
.wd-pt-fold > summary small { font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-pt-fold > summary .ms { margin-left: auto; font-size: 20px; color: var(--ep-text-secondary); transition: transform 200ms var(--wd-ease); }
.wd-pt-fold[open] > summary .ms { transform: rotate(180deg); }
.wd-pt-fold > .wd-pt-fold-in { padding: 0 24px 20px; display: flex; flex-direction: column; gap: 16px; }
/* Membre d'un foyer : la ligne « Vient avec … » à la place du bloc foyer */
.wd-pt-member { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.92rem; }
.wd-pt-member .ms { font-size: 20px; color: var(--ep-text-secondary); }

/* ── Import : le modèle en aperçu ── */
.wd-pt-model-wrap { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--wd-card-border); border-radius: 12px; }
.wd-pt-model { width: 100%; border-collapse: collapse; font-size: 0.84rem; white-space: nowrap; }
.wd-pt-model th { text-align: left; font-weight: 600; color: var(--wd-onyx); background: var(--wd-papier); padding: 8px 12px; }
.wd-pt-model td { padding: 8px 12px; border-top: 1px solid var(--wd-card-border); color: var(--ep-text-secondary); }
.wd-pt-model td:first-child, .wd-pt-model th:first-child { color: var(--wd-pt-gold-ink); font-variant-numeric: tabular-nums; }
.wd-pt-model-help { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-pt-model-help b { color: var(--wd-onyx); font-weight: 600; }

/* ── Téléphone ── */
@media (max-width: 640px) {
    .wd-pt-une-acts .wd-pt-btn.wd-pt-btn--keep { width: auto; padding: 0 14px; }
    .wd-pt-une-acts .wd-pt-btn--keep .lbl { display: inline; }
    .wd-pt-une-foot:has(.wd-pt-une-note) { flex-wrap: wrap; }
    .wd-pt-step { grid-template-columns: 52px minmax(0, 1fr); gap: 2px 12px; }
    .wd-pt-step-h small { font-size: 0.76rem; }
    .wd-pt-step > .ms { display: none; }
    .wd-pt-step-h { font-size: 0.95rem; }
    .wd-pt-day-gap { padding-left: 64px; }
    .wd-pt-gl-tools { gap: 10px; }
    /* Le filtre défile sur place : la page, elle, ne déborde pas */
    .wd-pt-gl-tools .wd-clf-seg { display: flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    .wd-pt-gl-tools .wd-clf-seg::-webkit-scrollbar { display: none; }
    .wd-pt-search { flex-basis: 100%; }
    .wd-pt-gl-p { grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 4px 0; }
    .wd-pt-gl-p > .wd-pt-gl-diet { grid-column: 1; grid-row: 2; font-size: 0.82rem; white-space: normal; }
    .wd-pt-gl-p > .dropdown { grid-column: 2; grid-row: 1 / span 2; }
    .wd-pt-gl-who small { display: block; margin: 0; }
    .wd-pt-hollow:has(.wd-pt-hollow-act) { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px 16px; align-items: start; }
    .wd-pt-hollow .wd-pt-hollow-act { grid-column: 2; margin: 0; justify-self: start; }
    .wd-pt-form .wd-clf-card { padding: 16px; }
    .wd-pt-form .wd-clf-row--time { grid-template-columns: 1fr 1fr; }
    .wd-pt-form .wd-clf-row--time > :last-child { grid-column: 1 / -1; }
    .wd-pt-mate { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; }
    .wd-pt-mate > :first-child { grid-column: 1 / span 2; }
    .wd-pt-mate > .wd-pt-mate-x { grid-column: 3; grid-row: 1; }
    .wd-pt-mate > .is-age { grid-column: 1 / span 2; }
    .wd-pt-mate:not(.is-child) > .is-age { display: none; }
    .wd-pt-form .wd-sw-card-hd { flex-direction: column; align-items: flex-start; }
    .wd-pt-fold > summary { padding: 16px; }
    .wd-pt-fold > .wd-pt-fold-in { padding: 0 16px 16px; }
    .wd-pt-form .wd-clf-foot { flex-wrap: wrap; }
    .wd-pt-form .wd-clf-foot .wd-pt-btn { flex: 1; }
    .wd-pt-form .wd-clf-foot .wd-sw-textbtn { flex-basis: 100%; order: 3; text-align: center; margin: 6px 0 0; }
}

/* Préparatifs : la case reste à 20 px, la zone de toucher passe à 44 px */
.wd-pt-todo .wd-retro-box::after { content: ''; position: absolute; inset: -12px; }

/* Bouton en attente (fichier non choisi) */
.wd-pt-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.wd-pt-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ============================================================
   PORTAIL — ÉCHANGES, ACCÈS ET JOUR J (audit UX du 24/10/2026)
   À ajouter à la fin de la section « PORTAIL CLIENT » de theme.css.
   Messages : on reprend le fil de la messagerie prestataire (.wd-cv-msg,
   .wd-cv-sep, .wd-cv-item, .wd-cv-compose) en inversant les rôles :
   le prestataire à gauche sur papier, le couple à droite en noir.
   Accès (connexion, invitation, espaces) : la coquille du portail
   (.wd-pt-hd, .wd-pt-ft) autour d'une colonne de 480 px, la marque du
   prestataire en tête, Wedoria seulement au pied.
   ============================================================ */

/* ── Messages : la liste, comme celle d'un téléphone ── */
.wd-pt-card--list { padding: 8px 18px; }
.wd-pt-thr { list-style: none; margin: 0 -8px; padding: 0; }
.wd-pt-thr .wd-cv-item a { grid-template-columns: 44px minmax(0, 1fr); align-items: center; padding: 14px 10px; }
.wd-pt-thr .wd-cv-av { width: 44px; height: 44px; border-radius: 14px; background: var(--wd-jaune-pale); color: var(--wd-pt-gold-ink); font-size: 0.86rem; }
.wd-pt-thr .main { gap: 3px; }
.wd-pt-thr .top b { font-size: 0.98rem; }
.wd-pt-thr .top time { font-size: 0.8rem; }
.wd-pt-thr .prev { font-size: 0.88rem; }
.wd-pt-thr .prev i { color: var(--wd-onyx); font-weight: 500; }
.wd-pt-thr .wd-cv-item.is-unread .prev { color: var(--wd-onyx); }
.wd-pt-thr .wd-cv-item.is-unread time::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--wd-jaune); vertical-align: 1px; }

/* ── Messages : une conversation (un seul cadre : le fil puis la réponse) ── */
.wd-pt-thread { padding: 0; }
.wd-pt-flow { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 20px; }
.wd-pt-flow .wd-cv-msg { max-width: min(560px, 86%); scroll-margin-top: 96px; scroll-margin-bottom: 24px; }
.wd-pt-flow .wd-cv-sep { scroll-margin-top: 96px; }
.wd-pt-flow .wd-cv-msg .bubble { font-size: 0.95rem; }
.wd-pt-reply { margin: 0; padding: 12px 16px 16px; border-top: 1px solid var(--wd-card-border); background: #FFFFFF; border-radius: 0 0 var(--wd-r-card) var(--wd-r-card); }
/* La zone de saisie du fil prestataire, avec un simple textarea (pas de mise en forme côté client) */
.wd-cv-compose textarea { display: block; width: 100%; min-height: 50px; max-height: 40vh; resize: none; overflow-y: auto; margin: 0; padding: 12px 14px 4px; border: 0; outline: 0; border-radius: 16px 16px 0 0; background: transparent; font-family: var(--wd-font-sans); font-size: 0.95rem; line-height: 1.55; color: var(--wd-onyx); field-sizing: content; }
.wd-cv-compose textarea::placeholder { color: var(--ep-text-muted); }
.wd-pt-compose-tall textarea { min-height: 200px; }
/* Éditeur (Trix) du portail : la zone de rédaction d'un nouveau message reste haute */
.wd-pt-compose-tall trix-editor { min-height: 200px; max-height: 50vh; }
.wd-pt-compose trix-editor a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; }
.wd-pt-reply .wd-cv-bar, .wd-pt-write-form .wd-cv-bar { padding: 6px 8px 8px 14px; }
.wd-pt-reply .wd-cv-send, .wd-pt-write-form .wd-cv-send { height: 38px; margin-left: auto; }

/* Écrire au prestataire : erreurs en ligne, plus d'alerte Bootstrap */
.wd-pt-err { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 14px; border-radius: var(--wd-r-ctl); background: var(--wd-st-danger-bg); color: var(--wd-st-danger); font-size: 0.9rem; }
.wd-pt-err .ms { font-size: 19px; }
.wd-pt-write-form .wd-pt-f + .wd-pt-f { margin-top: 18px; }
.wd-pt-write-form .form-label small, .wd-pt-auth-card .form-label small { margin-left: 4px; font-weight: 400; color: var(--ep-text-muted); font-size: 0.8rem; }

/* ── Accès : connexion, invitation, lien expiré, choix de l'espace ── */
body:has(.wd-pt-auth) { padding-top: 0; } /* app.css réserve 56 px à la barre mobile du logiciel */
.wd-pt-auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #FFFFFF; }
.wd-pt-auth .wd-pt-hd { position: static; }
.wd-pt-auth .wd-pt-hd-in { justify-content: center; }
.wd-pt-auth-main { flex: 1; width: 100%; max-width: 528px; margin: 0 auto; padding: 56px 24px 64px; display: flex; flex-direction: column; gap: 22px; }
.wd-pt-auth-main--wide { max-width: 608px; }
.wd-pt-auth-head { display: flex; flex-direction: column; gap: 12px; }
.wd-pt-auth-head .wd-sw-lead { margin: 0; }
.wd-pt-auth-card { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 16px; }
.wd-pt-auth-card h2 { font-family: var(--wd-font-display); font-weight: 600; font-size: 1.16rem; letter-spacing: -0.02em; margin: 0; }
.wd-pt-auth-card .form-label { margin-bottom: 6px; }
.wd-pt-auth-card .wd-clf-row { margin: 0; }
.wd-pt-auth-lbl { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.wd-pt-auth-lbl .wd-pt-link { font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-pt-auth-submit { width: 100%; height: 46px; margin-top: 4px; font-size: 0.95rem; }
.wd-pt-info { display: flex; align-items: center; gap: 10px; margin: 0; padding: 11px 14px; border-radius: var(--wd-r-ctl); background: var(--wd-papier); font-size: 0.9rem; color: var(--wd-onyx); overflow-wrap: anywhere; }
.wd-pt-info .ms { font-size: 19px; color: var(--ep-text-secondary); }
.wd-pt-auth-note { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--ep-text-secondary); text-align: center; }
.wd-pt-auth-legal { margin: 0; font-size: 0.78rem; line-height: 1.5; color: var(--wd-pt-mute); }
.wd-pt-auth-legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wd-hairline-2); }
.wd-pt-pw { position: relative; }
.wd-pt-pw .form-control { padding-right: 92px; }
.wd-pt-pw button { position: absolute; top: 5px; right: 5px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font-size: 0.82rem; font-weight: 500; color: var(--ep-text-secondary); cursor: pointer; }
.wd-pt-pw button:hover { background: var(--wd-papier); color: var(--wd-onyx); }

/* Double authentification (25/10/2026) : le code, « appareil reconnu », renvoi */
.wd-pt-code { height: 56px; font-size: 1.55rem; font-weight: 600; letter-spacing: 0.42em; text-align: center; font-variant-numeric: tabular-nums; }
.wd-pt-code--backup { font-size: 1.2rem; letter-spacing: 0.1em; }
.wd-pt-trust { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--ep-text-secondary); cursor: pointer; }
.wd-pt-trust input { width: 18px; height: 18px; flex: none; accent-color: var(--wd-onyx); }
.wd-pt-inline { display: inline; }
button.wd-pt-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; cursor: pointer; }
/* Portail › Sécurité */
.wd-pt-sec { padding-bottom: 22px; }
.wd-pt-sec-row { display: flex; align-items: center; gap: 16px; padding: 10px 0 4px; }
.wd-pt-sec-row .wd-pt-act-txt { flex: 1; }
.wd-pt-sec-row > .wd-pt-btn { flex: none; }
.wd-pt-sec-hint { margin: 10px 0 0; font-size: 0.86rem; line-height: 1.5; color: var(--ep-text-secondary); }
.wd-pt-sec-form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--wd-card-border); }
.wd-pt-sec-form .form-control { max-width: 340px; }
.wd-pt-sec-steps .wd-pt-sec-form { margin-top: 6px; padding-top: 0; border-top: 0; }
.wd-pt-sec-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.wd-pt-sec-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: wd-step; }
.wd-pt-sec-steps > li { counter-increment: wd-step; }
.wd-pt-sec-steps > li h2::before { content: counter(wd-step); display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; background: var(--wd-onyx); color: #fff; font-size: 0.78rem; font-weight: 600; vertical-align: 2px; }
@media (max-width: 575.98px) {
    .wd-pt-sec-row { flex-wrap: wrap; }
    .wd-pt-sec-row > .wd-pt-btn, .wd-pt-sec-acts > .wd-pt-btn { width: 100%; }
    .wd-pt-sec-acts { flex-direction: column-reverse; }
}
.wd-pt-auth .wd-pt-une { padding: 26px 28px 22px; }
.wd-pt-auth .wd-pt-une h1 { font-size: 2.4rem; }
.wd-pt-auth .wd-pt-hollow .wd-pt-btn { margin-top: 14px; }
.wd-pt-av img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

/* Choix de l'espace */
.wd-pt-spaces { list-style: none; margin: 0 -10px; padding: 0; }
.wd-pt-spaces li + li { border-top: 1px solid var(--wd-card-border); }
.wd-pt-spaces form { margin: 0; }
.wd-pt-space { width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 20px; align-items: center; gap: 4px 14px; padding: 14px 10px; border: 0; border-radius: 12px; background: none; text-align: left; color: var(--wd-onyx); cursor: pointer; transition: background 150ms var(--wd-ease); }
.wd-pt-space:hover { background: var(--wd-pt-veil); }
.wd-pt-space:focus-visible { outline: 2px solid var(--wd-onyx); outline-offset: 2px; }
.wd-pt-space-logo { grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 14px; background: var(--wd-papier); display: grid; place-items: center; overflow: hidden; font-family: var(--wd-font-display); font-weight: 600; font-size: 0.95rem; transition: transform 320ms var(--wd-ease); }
.wd-pt-space-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.wd-pt-space:hover .wd-pt-space-logo { transform: rotate(-4deg) scale(1.04); }
.wd-pt-space-txt { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
.wd-pt-space-txt b { display: block; font-weight: 600; font-size: 1rem; }
.wd-pt-space-txt small { display: block; margin-top: 2px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-pt-space > .wd-st { grid-column: 3; grid-row: 1 / span 2; }
.wd-pt-space > .chev { grid-column: 4; grid-row: 1 / span 2; font-size: 20px; color: #B5ADA2; transition: transform 200ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-pt-space:hover > .chev { transform: translateX(2px); color: var(--wd-onyx); }

/* ── Livre d'or (ex-« Tableau de bord en direct ») ── */
.wd-pt-onair { display: inline-flex; align-items: center; gap: 8px; }
.wd-pt-gb { list-style: none; margin: 0; padding: 0; }
.wd-pt-gb > li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 4px 14px; padding: 16px 0; border-top: 1px solid var(--wd-card-border); }
.wd-pt-gb > li:first-child { border-top: 0; }
.wd-pt-gb .wd-cv-av { width: 40px; height: 40px; border-radius: 13px; background: var(--wd-jaune-pale); color: var(--wd-pt-gold-ink); }
.wd-pt-gb-txt { min-width: 0; }
.wd-pt-gb-txt b { font-weight: 600; font-size: 0.96rem; color: var(--wd-onyx); }
.wd-pt-gb-txt time { margin-left: 8px; font-size: 0.8rem; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.wd-pt-gb-txt p { margin: 4px 0 0; font-size: 0.95rem; line-height: 1.55; color: var(--wd-onyx); overflow-wrap: anywhere; }
.wd-pt-gb-pic { display: block; width: 200px; max-width: 100%; aspect-ratio: 4 / 3; margin-top: 10px; border-radius: 12px; overflow: hidden; background: var(--wd-papier); }
.wd-pt-gb-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-pt-gb > li.is-new { animation: wd-rise-soft 420ms var(--wd-ease); }
.wd-pt-gb > li.is-hidden .wd-pt-gb-txt { opacity: 0.55; }
.wd-pt-gb > li.is-hidden .wd-pt-gb-hide { opacity: 1; }
.wd-pt-gb-hide { width: 36px; height: 36px; padding: 0; background: none; color: var(--ep-text-muted); }
.wd-pt-gb-hide:hover, .wd-pt-gb-hide:focus-visible { background: var(--wd-papier); color: var(--wd-onyx); }
@media (hover: hover) {
    .wd-pt-gb > li .wd-pt-gb-hide { opacity: 0; transition: opacity 150ms var(--wd-ease); }
    .wd-pt-gb > li:hover .wd-pt-gb-hide, .wd-pt-gb > li:focus-within .wd-pt-gb-hide { opacity: 1; }
}
/* Le jour J seulement : qui est arrivé (déclaré par les invités sur leur page) */
.wd-pt-arr-more > summary b { color: var(--wd-onyx); font-weight: 600; }
.wd-pt-arr-list { list-style: none; margin: 0; padding: 4px 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.wd-pt-arr-list li { height: 30px; padding: 0 10px; border-radius: 8px; background: var(--wd-papier); display: inline-flex; align-items: center; gap: 5px; font-size: 0.84rem; color: var(--wd-onyx); }
.wd-pt-arr-list li.is-route { background: #FFFFFF; border: 1px dashed var(--wd-hairline-2); color: var(--ep-text-secondary); }
.wd-pt-arr-list .ms { font-size: 16px; }
.wd-pt-qracts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }

/* ── Réponses reçues : une ligne par foyer, son mot en bulle ── */
.wd-pt-ans { list-style: none; margin: 0; padding: 0; }
.wd-pt-ans > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 16px; padding: 16px 0; border-top: 1px solid var(--wd-card-border); }
.wd-pt-ans > li:first-child { border-top: 0; }
.wd-pt-ans time { font-size: 0.84rem; color: var(--ep-text-secondary); white-space: nowrap; }
.wd-pt-ans .is-no { color: var(--ep-text-muted); }
.wd-pt-quote { grid-column: 1 / -1; justify-self: start; max-width: min(560px, 100%); margin: 8px 0 0; padding: 10px 14px; border-radius: 6px 18px 18px 18px; background: var(--wd-papier); font-size: 0.95rem; line-height: 1.5; color: var(--wd-onyx); overflow-wrap: anywhere; }
.wd-pt-ans-extra { grid-column: 1 / -1; margin: 6px 0 0; font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-pt-tally { margin: 0; font-size: 1rem; color: var(--ep-text-secondary); line-height: 1.6; }
.wd-pt-tally b { color: var(--wd-onyx); font-weight: 600; }

/* ── Téléphone ── */
@media (max-width: 640px) {
    .wd-pt-card--list { padding: 4px 10px; }
    .wd-pt-thr .wd-cv-item a { padding: 12px 8px; gap: 12px; }
    .wd-pt-thr .wd-cv-av { width: 40px; height: 40px; border-radius: 12px; }
    .wd-pt-flow { padding: 16px 14px 14px; }
    .wd-pt-flow .wd-cv-msg { max-width: 90%; scroll-margin-bottom: 96px; } /* sous la réponse collée en bas */
    /* La réponse reste sous le pouce, comme dans une messagerie */
    .wd-pt-reply { position: sticky; bottom: 0; z-index: 5; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 16px -12px rgba(27, 24, 22, 0.18); }
    .wd-cv-compose textarea { font-size: 16px; } /* iOS : pas de zoom à la saisie */
    .wd-pt-compose trix-editor { font-size: 16px; }
    .wd-pt-compose-tall trix-editor { min-height: 160px; }
    /* Dans le fil : le bouton d'envoi au bout de la ligne, comme une messagerie */
    .wd-pt-reply .wd-cv-compose { display: flex; align-items: flex-end; }
    .wd-pt-reply .wd-cv-compose textarea { min-height: 46px; padding: 11px 4px 11px 14px; border-radius: 16px; }
    .wd-pt-reply .wd-cv-bar { padding: 4px; }
    .wd-pt-reply .wd-cv-send { width: 40px; padding: 0; }
    .wd-pt-reply .wd-cv-send .lbl { display: none; }
    /* Avec l'éditeur : le texte sur toute la largeur, la barre (mise en forme + envoi) dessous */
    .wd-pt-reply .wd-pt-compose { display: block; }
    .wd-pt-reply .wd-pt-compose trix-editor { min-height: 46px; max-height: 30vh; padding: 11px 14px 2px; }
    .wd-pt-auth-main, .wd-pt-auth-main--wide { padding: 28px 16px 40px; gap: 18px; }
    .wd-pt-auth-card { padding: 20px 18px; }
    .wd-pt-auth .wd-pt-une h1 { font-size: 2rem; }
    .wd-pt-auth .form-control { font-size: 16px; }
    .wd-pt-space { grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 6px 12px; padding: 12px 10px; }
    .wd-pt-space-logo { width: 44px; height: 44px; border-radius: 13px; }
    .wd-pt-space-txt { grid-row: 1; }
    .wd-pt-space > .wd-st { grid-column: 2; grid-row: 2; justify-self: start; }
    .wd-pt-space > .chev { grid-column: 3; }
    .wd-pt-gb > li { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 12px; }
    .wd-pt-gb .wd-cv-av { width: 36px; height: 36px; border-radius: 12px; }
    .wd-pt-gb-pic { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-pt-gb > li.is-new { animation: none; }
    .wd-pt-space-logo, .wd-pt-space > .chev { transition: none; transform: none !important; }
}

/* ============================================================
   ADMINISTRATION — back office super admin, refonte Rail du 24/10/2026.
   Rien de neuf dans la grammaire : l'accueil reprend .wd-home (carte-titre
   noire + deux panneaux), les listes .board.wd-reg, la fiche organisation
   .wd-ev-cover + .wd-ev-panel, les réglages .wd-set (comme les Paramètres
   d'un prestataire). Cette section ne pose que les compléments .wd-adm-*.
   ============================================================ */

/* ── Avatar d'organisation : logo contenu (souvent en longueur) ou initiale ── */
.wd-adm-av { background: var(--wd-papier); }
.wd-adm-av img { object-fit: contain; padding: 4px; background: #fff; }
.wd-adm-av .bi { font-size: 1rem; line-height: 1; }
.wd-home-list .wd-adm-av { width: 34px; height: 34px; border-radius: 11px; font-size: 0.74rem; }

/* ── Accueil ── */
.wd-adm-beta {
    display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 12px;
    border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-ctl);
    font-size: 0.82rem; font-weight: 500; color: var(--ep-text-secondary); text-decoration: none;
}
.wd-adm-beta i { width: 8px; height: 8px; border-radius: 50%; background: var(--wd-st-ok); }
.wd-adm-beta.is-on i { background: var(--wd-jaune); animation: wd-breathe 2.8s var(--wd-ease) infinite; }
.wd-adm-beta:hover { border-color: var(--wd-hairline-2); color: var(--wd-onyx); }
.wd-adm-pulse .wd-home-av { padding: 13px; }
.wd-adm-pulse .wd-home-av img { object-fit: contain; }
.wd-adm-pulse .wd-home-count b { white-space: nowrap; }
.wd-adm-pulse .wd-home-chip-link a { color: inherit; text-decoration: none; }
.wd-adm-pulse .wd-home-chip-link a::after { content: ''; position: absolute; inset: -6px -4px; }
.wd-adm-pulse .wd-home-chip-link { position: relative; }
.wd-home-dot.wd-adm-dot--danger { background: var(--wd-st-danger); }
.wd-home-dot.wd-adm-dot--warn { background: var(--wd-jaune); }
.wd-home-dot.wd-adm-dot--info { background: var(--wd-st-info); }
.wd-home-dot.wd-adm-dot--ok { background: var(--wd-st-ok); }
.wd-home-dot.wd-adm-dot--mute { background: var(--wd-hairline-2); }
.wd-adm-home .wd-home-empty-row a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-adm-home .wd-home-list .wd-st { flex: none; }

/* ── Registres : toute la ligne s'ouvre ; menus et liens propres au-dessus ── */
.wd-adm-reg .board-row { position: relative; }
.wd-adm-stretch::after { content: ''; position: absolute; inset: 0; }
.wd-adm-reg .cell-actions, .wd-adm-reg .wd-adm-act, .wd-adm-reg .wd-adm-src { position: relative; z-index: 1; }
.wd-adm-reg .cell-actions:has(.dropdown-menu.show) { z-index: 5; }
.wd-adm-reg .cell-name .wd-st { margin-left: 8px; flex: none; }
.wd-adm-seg small { font-size: 0.74rem; color: var(--ep-text-muted); margin-left: 2px; font-variant-numeric: tabular-nums; }
.wd-adm-seg .active small { color: var(--ep-text-secondary); }
.wd-adm-act { justify-content: flex-end; }
.wd-adm-invite { height: 32px; padding: 0 12px; font-size: 0.82rem; }
.wd-adm-invite .ms { font-size: 17px; }
a.wd-adm-st-link { text-decoration: none; }
a.wd-adm-st-link:hover { filter: brightness(0.97); }
.wd-adm-lede { margin: -4px 0 16px; max-width: 64ch; font-size: 0.92rem; color: var(--ep-text-secondary); }
.wd-adm-src { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }

/* ── Abonnements : trois repères de même largeur, libellés en casse normale ── */
.wd-rp-stats.wd-adm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.wd-adm-stats .wd-rp-stat .l { font-size: 0.82rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ep-text-secondary); }
.wd-adm-stats .wd-rp-stat .w { color: var(--ep-text-secondary); }
.wd-adm-stats .wd-rp-stat .v small { color: var(--ep-text-secondary); }

/* ── Fiche organisation ── */
.wd-adm-org .wd-ev-cover .wd-st-danger { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-adm-org .wd-ev-cover .wd-st-ok { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; }
.wd-adm-h-n { font-family: var(--wd-font-sans); font-size: 0.82rem; font-weight: 400; color: var(--ep-text-muted); margin-left: 4px; }
.wd-adm-note { margin: 0; font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-adm-note--box { padding: 12px 16px; margin-bottom: 14px; border: 1px solid var(--wd-hairline); border-radius: 12px; background: #FDFCFA; }
.wd-adm-free {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: 16px; padding: 14px 16px;
    border: 1.5px dashed var(--wd-hairline-2); border-radius: 14px;
}
.wd-adm-free > .ms { font-size: 22px; color: var(--ep-text-muted); }
.wd-adm-free p { flex: 1 1 220px; margin: 0; font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-adm-free p b { color: var(--wd-onyx); font-weight: 600; }
.wd-adm-free form { margin: 0; }
.wd-adm-free.is-on { border-style: solid; border-color: var(--wd-jaune-pale); background: #FFFCF6; }
.wd-adm-free.is-on > .ms { color: var(--wd-jaune); font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.wd-ev-btn.wd-adm-btn-danger { color: var(--wd-st-danger); }
.wd-ev-btn.wd-adm-btn-danger:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); border-color: var(--wd-st-danger-bg); }
.wd-adm-members b em { font-style: normal; font-size: 0.74rem; font-weight: 500; color: #6B4F22; background: var(--wd-jaune-pale); padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.wd-adm-members small a { color: inherit; text-decoration: none; }
.wd-adm-members small a:hover { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; }
.wd-adm-seen { flex: none; font-size: 0.8rem; color: var(--ep-text-secondary); white-space: nowrap; }
.wd-adm-mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.82rem; font-weight: 500; }
.wd-adm-id { font-size: 0.72rem; color: var(--ep-text-secondary); }

/* Modale de suppression : un cadre, une phrase, le nom à retaper */
.wd-adm-modal { border: 0; border-radius: var(--wd-r-card); box-shadow: 0 24px 60px -24px rgba(27, 24, 22, 0.45); }
.wd-adm-modal .modal-header { border: 0; padding: 22px 24px 6px; }
.wd-adm-modal .modal-title { font-family: var(--wd-font-display); font-size: 1.15rem; font-weight: 600; margin: 0; }
.wd-adm-modal .modal-body { padding: 8px 24px 6px; font-size: 0.9rem; color: var(--ep-text-secondary); }
.wd-adm-modal .modal-body .form-label { font-size: 0.86rem; font-weight: 500; color: var(--wd-onyx); }
.wd-adm-modal .form-control { height: 42px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); }
.wd-adm-modal .form-control:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-adm-modal .modal-footer { border: 0; padding: 14px 24px 22px; gap: 8px; }
.wd-adm-modal .modal-footer > * { margin: 0; }
.wd-adm-warn { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--wd-st-danger-bg); color: var(--wd-st-danger); font-size: 0.86rem; }
.wd-adm-warn .ms { font-size: 19px; }

/* ── Inviter un testeur ── */
.wd-adm-form .wd-bif-title { margin-bottom: 6px; }
.wd-adm-form .wd-adm-lede { margin: 0; }
.wd-adm-form .wd-bif-sec .wd-ev-h { font-family: var(--wd-font-display); font-size: 1.02rem; margin-bottom: 14px; }
.wd-adm-form .wd-bif-foot .wd-ev-btn--primary { color: #fff; }
.wd-adm-miss { color: var(--wd-st-danger); }
.wd-bif-switch-t small a { color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }

/* ── Réglages ── */
.wd-adm-launch-fields { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--wd-hairline); }
.wd-gf-row.wd-adm-row-srv { grid-template-columns: minmax(0, 2fr) 96px minmax(0, 1fr); }
.wd-gf-row.wd-adm-row-src { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.wd-adm-test { margin-top: 16px; border-color: var(--wd-card-border); }
.wd-adm-test .wd-gf-f { margin: 0; }
.wd-adm-test-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wd-adm-test-row .form-control { flex: 1 1 240px; height: 42px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); }
.wd-adm-test-row .wd-ev-btn { height: 42px; }
.wd-adm-set .wd-rp-blank { margin-top: 0; }

/* Icône d'une catégorie : une grille de pastilles à cocher */
.wd-adm-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.wd-adm-icon { margin: 0; cursor: pointer; }
.wd-adm-icon input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wd-adm-icon span {
    height: 46px; display: grid; place-items: center;
    border: 1px solid var(--wd-hairline); border-radius: 12px; background: #fff;
    color: var(--ep-text-secondary); font-size: 1.15rem;
    transition: border-color 150ms var(--wd-ease), background 150ms var(--wd-ease), transform 200ms var(--wd-ease);
}
.wd-adm-icon span small { font-size: 0.7rem; }
.wd-adm-icon:hover span { border-color: var(--wd-hairline-2); color: var(--wd-onyx); transform: translateY(-1px); }
.wd-adm-icon input:checked + span { background: var(--wd-onyx); border-color: var(--wd-onyx); color: #fff; }
.wd-adm-icon input:focus-visible + span { box-shadow: 0 0 0 3px rgba(201, 160, 99, 0.45); }

@media (max-width: 767.98px) {
    .wd-rp-stats.wd-adm-stats { grid-template-columns: 1fr; }
    .wd-adm-stats .wd-rp-stat { border-left: 0; border-top: 1px solid var(--wd-hairline); }
    .wd-adm-stats .wd-rp-stat:first-child { border-top: 0; }
    .wd-adm-home .wd-home-greet { align-items: flex-start; }
    .wd-gf-row.wd-adm-row-srv { grid-template-columns: minmax(0, 1fr) 84px; }
    .wd-gf-row.wd-adm-row-srv > :first-child { grid-column: 1 / -1; }
    .wd-gf-row.wd-adm-row-src { grid-template-columns: 1fr; }
    .wd-adm-seen { display: none; }
    .wd-reg-head .wd-adm-seg { overflow-x: auto; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .wd-adm-beta.is-on i { animation: none; }
    .wd-adm-icon span { transition: none; }
}
/* Retouches après captures (24/10/2026) */
.wd-adm-reg .wd-cell-sub { font-weight: 400; }
.wd-adm-reg .cell-name .wd-cell-main { flex: none; }
.wd-adm-org .wd-ev-cover { margin-bottom: 24px; }
.wd-adm-form, .wd-adm-set { --wd-gris: var(--wd-fumee-fonce); }
.wd-adm-set .wd-set-note { margin-top: 14px; }
@media (max-width: 767.98px) {
    .wd-adm-pulse { grid-template-columns: 1fr; }
    .wd-adm-pulse .wd-home-count { padding-left: 70px; margin-top: -4px; }
    .wd-adm-pulse h2 { font-size: 1.3rem; }
}

/* ============================================================
   PLAN DE TABLE — chapitre du dossier (24/10/2026). Trois repères
   (placement des « oui », places, contraintes), puis le tableau de
   placement : « À placer » par famille à gauche, collant ; les tables en
   cartes à droite, chacune avec sa table vue de dessus (une pastille par
   place, pleine quand elle est prise). On glisse un invité, ou on le
   touche puis on touche la table. L'or ne marque que l'invité tenu et la
   cible visée ; un conflit de contrainte rougit la carte.
   ============================================================ */
.wd-rp-stats--sp { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wd-rp-stats--sp .wd-rp-stat .w b { color: var(--wd-onyx); font-weight: 600; }
button.wd-rp-stat { background: none; border: 0; border-left: 1px solid var(--wd-hairline); font: inherit; text-align: left; cursor: pointer; transition: background 150ms var(--wd-ease); }
button.wd-rp-stat:hover { background: #FDFCFA; }
button.wd-rp-stat:focus-visible { outline: 2px solid var(--wd-jaune); outline-offset: -2px; }

.wd-sp { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 48px; }

/* « À placer » */
.wd-sp-pool { position: sticky; top: 84px; display: flex; flex-direction: column; max-height: calc(100vh - 104px); background: var(--wd-card-bg); border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); transition: box-shadow 200ms var(--wd-ease); }
.wd-sp-pool-head { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--wd-hairline); }
.wd-sp-pool-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; }
.wd-sp-pool-head h2 em { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-family: var(--wd-font-sans); font-style: normal; font-size: 0.74rem; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--wd-jaune-pale); color: #6B4F22; }
.wd-sp.is-all-placed .wd-sp-pool-head h2 em { background: var(--wd-st-ok-bg); color: var(--wd-st-ok); }
.wd-sp-search { position: relative; margin: 0; }
.wd-sp-search .ms { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--ep-text-muted); pointer-events: none; }
.wd-sp-search input { width: 100%; height: 36px; padding: 0 10px 0 34px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; font: inherit; font-size: 0.86rem; color: var(--wd-onyx); outline: none; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-sp-search input:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-sp-search input::placeholder { color: var(--ep-text-muted); }
.wd-sp-pool-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 14px; overscroll-behavior: contain; }
.wd-sp-grp { padding-top: 12px; }
.wd-sp-grp:not(:has(.wd-sp-g:not([hidden]))) { display: none; }
.wd-sp-grp h3 { margin: 0 6px 4px; font-family: var(--wd-font-sans); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ep-text-muted); }
.wd-sp-list { list-style: none; margin: 0; padding: 0; }
.wd-sp-pool-list { display: flex; flex-direction: column; gap: 1px; }
.wd-sp-done, .wd-sp-nomatch { display: none; margin: 16px 6px 4px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-sp-done { align-items: center; gap: 8px; }
.wd-sp-done .ms { font-size: 20px; color: var(--wd-st-ok); }
.wd-sp-done a { color: var(--wd-onyx); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-sp.is-all-placed .wd-sp-done { display: flex; }
.wd-sp.is-nomatch .wd-sp-nomatch { display: block; }
.wd-sp.is-nomatch .wd-sp-done { display: none; }
.wd-sp-nomatch .seated, .wd-sp.is-seated-hit .wd-sp-nomatch .none { display: none; }
.wd-sp.is-seated-hit .wd-sp-nomatch .seated { display: inline; }
/* Dépôt « retirer de la table » : seulement pendant qu'on glisse un convive */
.wd-sp-back { display: none; }
.wd-sp.is-dragging-seated .wd-sp-back { display: flex; flex-direction: column; justify-content: center; min-height: 56px; margin-top: 12px; padding: 6px; border: 1.5px dashed var(--wd-jaune); border-radius: 12px; background: var(--wd-jaune-pale); }
.wd-sp.is-dragging-seated .wd-sp-back:not(:has(.wd-sp-g))::before { content: 'Déposer ici pour retirer de la table'; text-align: center; font-size: 0.82rem; font-weight: 500; color: #6B4F22; }

/* Un invité */
.wd-sp-g { position: relative; display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 3px 4px 3px 10px; border-radius: 9px; background: #fff; font-size: 0.86rem; color: var(--wd-onyx); cursor: grab; user-select: none; -webkit-user-select: none; outline: none; transition: background 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease), opacity 150ms var(--wd-ease); }
.wd-sp-g[hidden] { display: none; }
.wd-sp-g:hover { background: var(--wd-papier); }
.wd-sp-g:focus-visible { box-shadow: inset 0 0 0 2px var(--wd-jaune); }
.wd-sp-g .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.wd-sp-g.is-wait .n { color: var(--ep-text-secondary); font-weight: 400; }
.wd-sp-g .t { flex: none; height: 20px; padding: 0 7px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 0.7rem; font-weight: 500; background: var(--wd-papier); color: var(--ep-text-secondary); }
.wd-sp-g .t--wait { background: transparent; box-shadow: inset 0 0 0 1px var(--wd-hairline-2); color: var(--ep-text-muted); }
.wd-sp-g .t--no { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-sp-g .x { display: none; }
.wd-sp-seats .wd-sp-g .x { flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; display: grid; place-items: center; background: transparent; color: var(--ep-text-muted); opacity: 0; cursor: pointer; transition: opacity 150ms var(--wd-ease), background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-sp-seats .wd-sp-g:hover .x, .wd-sp-seats .wd-sp-g:focus-within .x { opacity: 1; }
.wd-sp-seats .wd-sp-g .x:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-sp-g .x .ms { font-size: 16px; }
@media (hover: none) { .wd-sp-seats .wd-sp-g .x { opacity: 1; } }
.wd-sp-g.is-chosen { background: #fff; box-shadow: var(--wd-card-shadow); }
.wd-sp-g.is-ghost { opacity: 0.45; background: var(--wd-jaune-pale); box-shadow: none; }
.wd-sp-g.is-picked { background: var(--wd-jaune-pale); box-shadow: inset 0 0 0 1.5px var(--wd-jaune); }
.wd-sp-g.is-match { background: var(--wd-jaune-pale); }
.wd-sp.is-searching .wd-sp-seats .wd-sp-g:not(.is-match) { opacity: 0.38; }

/* Les tables */
.wd-sp-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; align-items: start; }
.wd-sp-t { padding: 12px 10px 10px; background: var(--wd-card-bg); border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); outline: none; transition: border-color 200ms var(--wd-ease), box-shadow 200ms var(--wd-ease), transform 200ms var(--wd-ease), opacity 200ms var(--wd-ease); }
.wd-sp-t:focus-visible { box-shadow: 0 0 0 2px var(--wd-jaune), var(--wd-card-shadow); }
.wd-sp-t:has(.wd-sp-warn:not(:empty)) { border-color: #F0C9C2; }
.wd-sp-t.is-new { animation: wd-sp-new 1.4s var(--wd-ease); }
@keyframes wd-sp-new { from { box-shadow: 0 0 0 3px var(--wd-jaune), var(--wd-card-shadow); } }
.wd-sp-t-head { display: flex; align-items: center; gap: 12px; padding: 0 0 10px 4px; }
.wd-sp-t-title { flex: 1; min-width: 0; line-height: 1.25; }
.wd-sp-t-title h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.98rem; }
.wd-sp-t-title .c { font-size: 0.8rem; color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; }
.wd-sp-t-title .c b { color: var(--wd-onyx); font-weight: 600; }
.wd-sp-t .full { display: none; }
.wd-sp-t.is-full .full { display: inline; color: var(--wd-st-ok); font-weight: 500; }
.wd-sp-t-menu { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; display: grid; place-items: center; background: transparent; color: var(--ep-text-secondary); transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-sp-t-menu:hover, .wd-sp-t-menu[aria-expanded="true"] { background: var(--wd-papier); color: var(--wd-onyx); }
.wd-sp-rename { width: 100%; height: 30px; padding: 0 8px; border: 1px solid var(--wd-onyx); border-radius: 8px; font: inherit; font-family: var(--wd-font-display); font-size: 0.95rem; font-weight: 600; color: var(--wd-onyx); outline: none; box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-sp-seats { display: flex; flex-direction: column; gap: 1px; min-height: 42px; padding: 4px; border-radius: 12px; background: #FBFAF7; }
.wd-sp-seats .wd-sp-g { background: transparent; }
.wd-sp-seats .wd-sp-g:hover { background: #fff; }
.wd-sp-seats .wd-sp-g.is-picked, .wd-sp-seats .wd-sp-g.is-match { background: var(--wd-jaune-pale); }
.wd-sp-seats::after { content: attr(data-free-label); display: flex; align-items: center; justify-content: center; height: 32px; margin-top: 2px; border: 1px dashed var(--wd-hairline-2); border-radius: 9px; font-size: 0.78rem; color: var(--ep-text-muted); transition: border-color 150ms var(--wd-ease), color 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-sp-seats[data-free-label=""]::after { display: none; }
.wd-sp-warn { display: flex; flex-direction: column; gap: 6px; margin: 10px 4px 2px; }
.wd-sp-warn:empty { display: none; }
.wd-sp-warn > span { display: flex; align-items: flex-start; gap: 6px; font-size: 0.78rem; line-height: 1.35; color: var(--wd-st-danger); }
.wd-sp-warn .ms { flex: none; margin-top: 1px; font-size: 16px; }

/* La table vue de dessus : une pastille par place */
.wd-sp-mini { --d: clamp(4px, calc(84px / var(--n)), 7px); position: relative; flex: none; width: 46px; height: 46px; }
.wd-sp-mini::before { content: ''; position: absolute; background: #fff; border: 1.5px solid var(--wd-hairline-2); }
.wd-sp-mini.is-round::before { inset: 11px; border-radius: 50%; }
.wd-sp-mini.is-rect::before { left: 4px; right: 4px; top: 15px; bottom: 15px; border-radius: 4px; }
.wd-sp-mini i { position: absolute; width: var(--d); height: var(--d); border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px var(--wd-hairline-2); transition: background 250ms var(--wd-ease), box-shadow 250ms var(--wd-ease); }
.wd-sp-mini.is-round i { left: 50%; top: 50%; margin: calc(var(--d) / -2); transform: rotate(calc(var(--i) * 360deg / var(--n))) translateY(-19px); }
.wd-sp-mini.is-rect i { left: calc(4px + (var(--c) + 0.5) * 38px / var(--k)); top: calc(var(--r) * 27px + 5px); margin-left: calc(var(--d) / -2); }
.wd-sp-mini i.on { background: var(--wd-onyx); box-shadow: none; }

/* Viser une table : invité tenu (toucher) ou en cours de glisser */
.wd-sp.is-picking .wd-sp-t { cursor: pointer; }
.wd-sp.is-picking .wd-sp-t:not(.is-full):hover, .wd-sp.is-picking .wd-sp-t:not(.is-full):focus-visible { border-color: var(--wd-jaune); box-shadow: 0 0 0 1px var(--wd-jaune), var(--wd-card-shadow); transform: translateY(-1px); }
.wd-sp.is-picking .wd-sp-t:not(.is-full):hover .wd-sp-seats::after, .wd-sp.is-dragging .wd-sp-t:not(.is-full) .wd-sp-seats::after { border-color: var(--wd-jaune); color: #6B4F22; background: #fff; }
.wd-sp.is-picking .wd-sp-t.is-full:not(:has(.is-picked)), .wd-sp.is-dragging .wd-sp-t.is-full:not(:has(.is-chosen)) { opacity: 0.5; }
.wd-sp.is-picking-seated .wd-sp-pool { cursor: pointer; box-shadow: 0 0 0 1.5px var(--wd-jaune), var(--wd-card-shadow); }

/* Pas encore de table / ajouter une table */
.wd-sp-empty { grid-column: 1 / -1; padding: 36px 24px 30px; border: 1px dashed var(--wd-hairline-2); border-radius: var(--wd-r-card); text-align: center; color: var(--ep-text-secondary); }
.wd-sp-empty > .ms { font-size: 34px; color: var(--ep-text-muted); }
.wd-sp-empty h2 { margin: 8px 0 4px; font-size: 1.1rem; color: var(--wd-onyx); }
.wd-sp-empty p { max-width: 46ch; margin: 0 auto; font-size: 0.9rem; }
.wd-sp-empty-acts { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.wd-sp-empty-acts .wd-ev-btn .ms { font-size: 18px; }
.wd-sp-add-btn { width: 100%; min-height: 136px; border: 1.5px dashed var(--wd-hairline-2); border-radius: var(--wd-r-card); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: inherit; font-size: 0.9rem; font-weight: 500; color: var(--ep-text-secondary); transition: border-color 150ms var(--wd-ease), color 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.wd-sp-add-btn .ms { font-size: 24px; transition: transform 250ms var(--wd-ease); }
.wd-sp-add-btn:hover, .wd-sp-add-btn[aria-expanded="true"] { border-color: var(--wd-onyx); color: var(--wd-onyx); background: #FDFCFA; }
.wd-sp-add-btn:hover .ms { transform: rotate(90deg); }
.wd-sp-menu .dropdown-header { padding: 6px 10px 4px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ep-text-muted); }
.wd-sp-menu .dropdown-item small { margin-left: auto; padding-left: 16px; font-size: 0.76rem; color: var(--ep-text-muted); }
.wd-sp-menu .dropdown-item.active, .wd-sp-menu .dropdown-item:active { background: var(--wd-papier); color: var(--wd-onyx); font-weight: 600; }
.wd-sp-menu .dropdown-item:disabled { opacity: 0.4; }
.wd-ev-menu .wd-sp-danger, .wd-ev-menu .wd-sp-danger .ms { color: var(--wd-st-danger); }
.wd-ev-menu .wd-sp-danger:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }

/* Message en bas d'écran (annuler un retrait, invité tenu, erreurs) */
.wd-sp-toast { position: fixed; z-index: 1090; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 10px 10px 10px 18px; border-radius: 12px; background: var(--wd-onyx); color: #fff; font-size: 0.88rem; box-shadow: var(--wd-shadow-lift); }
.wd-sp-toast[hidden] { display: none; }
.wd-sp-toast:has(.wd-sp-toast-act[hidden]) { padding-right: 18px; }
.wd-sp-toast.is-in { animation: wd-sp-toast 220ms var(--wd-ease); }
@keyframes wd-sp-toast { from { opacity: 0; transform: translate(-50%, 8px); } }
.wd-sp-toast-act { flex: none; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.1); font-size: 0.86rem; font-weight: 600; color: var(--wd-jaune); }
.wd-sp-toast-act[hidden] { display: none; }
.wd-sp-toast-act:hover { background: rgba(255, 255, 255, 0.18); }
.wd-sp-spin { animation: wd-ds-spin 900ms linear infinite; }

/* Modales : contraintes, partage, conflits */
.wd-sp-modal .modal-content { border: 0; border-radius: var(--wd-r-card); box-shadow: var(--wd-shadow-lift); }
.wd-sp-modal .modal-header { align-items: flex-start; gap: 16px; padding: 22px 24px 12px; border-bottom: 0; }
.wd-sp-modal .modal-title { margin: 0 0 4px; font-size: 1.2rem; }
.wd-sp-modal .modal-header p { max-width: 60ch; margin: 0; font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-sp-modal .modal-body { padding: 6px 24px 24px; }
.wd-sp-rule-form { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-panel); background: #FCFBF9; }
.wd-sp-rule-form .form-select { height: 40px; border-color: var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font-size: 0.88rem; }
.wd-sp-rule-form .form-select:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-sp-rule-and { font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-sp-rule-seg { grid-column: 1 / 3; justify-self: start; display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--wd-papier); }
.wd-sp-rule-seg label { position: relative; margin: 0; cursor: pointer; }
.wd-sp-rule-seg input { position: absolute; opacity: 0; pointer-events: none; }
.wd-sp-rule-seg span { height: 32px; padding: 0 14px; border-radius: 8px; display: inline-flex; align-items: center; font-size: 0.86rem; font-weight: 500; color: var(--ep-text-secondary); transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-sp-rule-seg input:checked + span { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.wd-sp-rule-seg input:focus-visible + span { outline: 2px solid var(--wd-jaune); }
.wd-sp-rule-form .wd-ev-btn--primary { grid-column: 3; justify-self: end; }
.wd-sp-rule-err { margin: 8px 2px 0; font-size: 0.84rem; color: var(--wd-st-danger); }
.wd-sp-rule-err[hidden] { display: none; }
.wd-sp-rules { list-style: none; margin: 14px 0 0; padding: 0; }
.wd-sp-rule { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 2px 6px 6px; border-bottom: 1px solid var(--wd-hairline); font-size: 0.9rem; transition: opacity 200ms var(--wd-ease); }
.wd-sp-rule:last-child { border-bottom: 0; }
.wd-sp-rule > .ms { font-size: 20px; color: var(--ep-text-muted); }
.wd-sp-rule.is-bad > .ms { color: var(--wd-st-danger); }
.wd-sp-rule .who { flex: 1; min-width: 0; color: var(--ep-text-secondary); }
.wd-sp-rule .who b { font-weight: 600; color: var(--wd-onyx); }
.wd-sp-rule .who small { display: block; font-size: 0.78rem; color: var(--ep-text-muted); }
.wd-sp-rule .st { font-size: 0.78rem; font-weight: 600; color: var(--wd-st-danger); white-space: nowrap; }
.wd-sp-rule.is-leaving { opacity: 0.4; }
.wd-sp-rule-x { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; display: grid; place-items: center; background: transparent; color: var(--ep-text-muted); transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.wd-sp-rule-x:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-sp-rule-x .ms { font-size: 18px; }
.wd-sp-rule-empty, .wd-sp-rule-wait { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 18px; border: 1px dashed var(--wd-hairline-2); border-radius: var(--wd-r-panel); font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-sp-modal .modal-body > .wd-sp-rule-wait:first-child, .wd-sp-modal .modal-body > .wd-sp-rule-empty:first-child { margin-top: 0; }
.wd-sp-rule-empty .ms { font-size: 22px; color: var(--ep-text-muted); }
.wd-sp-rule-empty.is-ok .ms { color: var(--wd-st-ok); }
.wd-sp-conflicts { list-style: none; margin: 0; padding: 0; }
.wd-sp-conflicts li { position: relative; padding: 12px 0 12px 20px; border-bottom: 1px solid var(--wd-hairline); font-size: 0.9rem; }
.wd-sp-conflicts li:last-child { border-bottom: 0; }
.wd-sp-conflicts li::before { content: ''; position: absolute; left: 2px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--wd-st-danger); }
.wd-sp-conflicts b { display: block; font-weight: 600; }
.wd-sp-conflicts small { font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-sp-switch.form-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 14px 16px; border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-panel); cursor: pointer; }
.wd-sp-switch b { display: block; font-size: 0.92rem; font-weight: 600; }
.wd-sp-switch small { font-size: 0.8rem; color: var(--ep-text-secondary); }
.wd-sp-switch .on, .wd-sp-switch:has(input:checked) .off { display: none; }
.wd-sp-switch:has(input:checked) .on { display: inline; }
.wd-sp-switch .form-check-input { flex: none; width: 2.4em; height: 1.3em; margin: 0; cursor: pointer; }
.wd-sp-switch .form-check-input:checked { background-color: var(--wd-onyx); border-color: var(--wd-onyx); }
.wd-sp-switch .form-check-input:focus { box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.1); border-color: var(--wd-hairline-2); }
.wd-sp-share { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.wd-sp-share-link { display: flex; gap: 8px; }
.wd-sp-share-link .form-control { height: 38px; border-color: var(--wd-hairline); border-radius: var(--wd-r-ctl); background: var(--wd-papier); font-size: 0.86rem; }
.wd-sp-share-link .wd-ev-btn { flex: none; }
.wd-sp-share-link .wd-ev-btn.is-done { color: var(--wd-st-ok); }
.wd-sp-share .wd-ev-btn .ms { font-size: 18px; }
.wd-sp-qr { margin: 0; text-align: center; }
.wd-sp-qr img { width: 200px; height: 200px; padding: 12px; border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-panel); background: #fff; }
.wd-sp-qr figcaption { margin-top: 8px; font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-sp-share-acts { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1199.98px) {
    .wd-sp { grid-template-columns: 264px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 991.98px) {
    .wd-sp { grid-template-columns: 1fr; gap: 16px; }
    .wd-sp-pool { position: static; max-height: 44vh; }
    .wd-sp-tables { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
    .wd-sp-toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 767.98px) {
    .wd-rp-stats--sp { grid-template-columns: 1fr 1fr; }
    .wd-rp-stats--sp > :nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--wd-hairline); }
    .wd-rp-head .acts > .wd-ev-btn { flex: 1; justify-content: center; }
    .wd-sp-tables { grid-template-columns: 1fr; }
    .wd-sp-rule-form { grid-template-columns: 1fr; }
    .wd-sp-rule-and { display: none; }
    .wd-sp-rule-seg, .wd-sp-rule-form .wd-ev-btn--primary { grid-column: 1; justify-self: stretch; }
    .wd-sp-rule-seg label { flex: 1; }
    .wd-sp-rule-seg span { width: 100%; justify-content: center; }
    .wd-sp-rule-form .wd-ev-btn--primary { justify-content: center; }
    .wd-sp-modal .modal-content { border-radius: 0; }
}

/* ============================================================
   ATELIER DE SALLE 3D — plein écran au-dessus du dossier (z 1080),
   ouvert depuis le chapitre Plan de table. Barre blanche de 60 px :
   retour, titre, outils (ajouter, mur, zone, aimant · annuler, refaire ·
   sol), points de vue en segments, invités, plein écran. Réglages de
   l'objet et liste des invités en cartes flottantes sur la scène.
   L'or reste réservé aux poignées d'édition (coins, rotation, ouvertures).
   ============================================================ */
.ep-s3d { position: fixed; inset: 0; z-index: 1080; display: flex; flex-direction: column; background: #fff; font-family: var(--wd-font-sans); color: var(--wd-onyx); }
.ep-s3d[hidden] { display: none; }
.ep-s3d-bar { position: relative; z-index: 3; flex: none; height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 10px; border-bottom: 1px solid var(--wd-hairline); background: #fff; }
.ep-s3d-back { flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: var(--wd-r-ctl); display: grid; place-items: center; background: transparent; color: var(--wd-onyx); transition: background 150ms var(--wd-ease); }
.ep-s3d-back:hover { background: var(--wd-papier); }
.ep-s3d-back .ms { font-size: 22px; transition: transform 200ms var(--wd-ease); }
.ep-s3d-back:hover .ms { transform: translateX(-2px); }
.ep-s3d-bar-title { min-width: 0; margin-right: 6px; line-height: 1.15; }
.ep-s3d-bar-title strong { display: block; font-family: var(--wd-font-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.ep-s3d-bar-title small { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; color: var(--ep-text-muted); }
.ep-s3d-tools { display: flex; align-items: center; gap: 4px; height: 36px; padding-left: 12px; border-left: 1px solid var(--wd-hairline); }
.ep-s3d-sep { flex: none; width: 1px; height: 22px; margin: 0 4px; background: var(--wd-hairline); }
.ep-s3d-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ep-s3d-floor { position: relative; }
.ep-s3d-floor-btn { height: 36px; padding: 0 11px; border: 1px solid transparent; border-radius: var(--wd-r-ctl); display: inline-flex; align-items: center; gap: 6px; background: transparent; font: inherit; font-size: 0.86rem; font-weight: 500; color: var(--wd-onyx); white-space: nowrap; cursor: pointer; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease), border-color 150ms var(--wd-ease); }
.ep-s3d-floor-btn .ms { font-size: 19px; color: var(--ep-text-secondary); transition: color 150ms var(--wd-ease), transform 200ms var(--wd-ease); }
.ep-s3d-floor-btn:hover:not(:disabled) { background: var(--wd-papier); }
.ep-s3d-floor-btn:hover:not(:disabled) .ms { color: var(--wd-onyx); }
.ep-s3d-floor-btn:disabled { opacity: 0.32; cursor: default; }
.ep-s3d-ico { width: 36px; padding: 0; justify-content: center; }
.ep-s3d-caret { margin: 0 -4px 0 -3px; font-size: 17px !important; }
.ep-s3d-right > .ep-s3d-floor-btn { border-color: var(--wd-hairline-2); }
/* Outil de tracé en cours (mur, zone) : noir ; l'aimant est un interrupteur, plus discret */
.ep-s3d-tool.is-active, .ep-s3d-tool.is-active:hover:not(:disabled) { background: var(--wd-onyx); color: #fff; }
.ep-s3d-tool.is-active .ms, .ep-s3d-tool.is-active:hover .ms { color: #fff; }
.ep-s3d-tool[data-seating-3d-target="snapBtn"].is-active { background: var(--wd-papier); color: var(--wd-onyx); }
.ep-s3d-tool[data-seating-3d-target="snapBtn"].is-active .ms { color: var(--wd-onyx); font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.ep-s3d-views { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--wd-papier); }
.ep-s3d-views button { height: 30px; padding: 0 10px; border: 0; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; background: transparent; font: inherit; font-size: 0.84rem; font-weight: 500; color: var(--ep-text-secondary); cursor: pointer; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.ep-s3d-views button .ms { font-size: 18px; }
.ep-s3d-views button:hover { color: var(--wd-onyx); }
.ep-s3d-views button.is-active { background: #fff; color: var(--wd-onyx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

/* Menus Ajouter et Sol */
.ep-s3d-floor-menu { position: absolute; top: calc(100% + 10px); left: 0; z-index: 5; width: 320px; padding: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #fff; border: 1px solid var(--wd-hairline); border-radius: var(--wd-r-panel); box-shadow: var(--wd-shadow-lift); }
.ep-s3d-floor-menu[hidden] { display: none; }
.ep-s3d-add-menu { display: block; width: 240px; max-height: calc(100vh - 90px); overflow-y: auto; }
.ep-s3d-add-item { width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; display: flex; align-items: center; gap: 10px; background: transparent; font: inherit; font-size: 0.86rem; color: var(--wd-onyx); text-align: left; cursor: pointer; }
.ep-s3d-add-item .ms { font-size: 19px; color: var(--ep-text-secondary); }
.ep-s3d-add-item:hover { background: var(--wd-papier); }
.ep-s3d-add-sep { padding: 10px 10px 4px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ep-text-muted); }
.ep-s3d-add-sep:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--wd-hairline); }
.ep-s3d-swatch { padding: 6px 8px; border: 0; border-radius: 8px; display: flex; align-items: center; gap: 10px; background: transparent; font: inherit; font-size: 0.86rem; color: var(--wd-onyx); text-align: left; cursor: pointer; }
.ep-s3d-swatch:hover { background: var(--wd-papier); }
.ep-s3d-swatch.is-active { background: var(--wd-papier); font-weight: 600; }
.ep-s3d-swatch-thumb { flex: none; width: 32px; height: 32px; border-radius: 7px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.ep-s3d-swatch--plain .ep-s3d-swatch-thumb { background: #F4F1EC; }
.ep-s3d-swatch.is-active .ep-s3d-swatch-thumb { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--wd-onyx); }
.ep-s3d-zone-textures { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }

/* Scène et indice */
.ep-s3d-body { position: relative; flex: 1; min-height: 0; display: flex; background: #F4F2EE; }
.ep-s3d-stage { position: relative; flex: 1; overflow: hidden; isolation: isolate; }   /* les étiquettes CSS2D se trient en z-index : elles restent sous les cartes */
.ep-s3d-stage canvas { display: block; }
.ep-s3d-hint { position: absolute; left: 50%; bottom: 18px; z-index: 2; max-width: calc(100% - 32px); margin: 0; padding: 8px 14px; transform: translateX(-50%); border-radius: 10px; background: rgba(27, 24, 22, 0.82); font-size: 0.82rem; line-height: 1.35; color: #fff; text-align: center; pointer-events: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ep-s3d-hint:empty { display: none; }

/* Cartes flottantes : réglages de l'objet (droite), invités (gauche) */
.ep-s3d-panel, .ep-s3d-guests { position: absolute; top: 16px; bottom: 16px; z-index: 4; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: 0 1px 2px rgba(27, 24, 22, 0.06), 0 24px 48px -20px rgba(27, 24, 22, 0.35); }
.ep-s3d-panel { right: 16px; width: 330px; }
.ep-s3d-guests { left: 16px; width: 300px; }
.ep-s3d-panel[hidden], .ep-s3d-guests[hidden] { display: none; }
.ep-s3d-panel-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 12px 12px 18px; border-bottom: 1px solid var(--wd-hairline); }
.ep-s3d-panel-title { font-family: var(--wd-font-display); font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }
.ep-s3d-panel-count { margin-left: 6px; font-size: 0.84rem; color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; }
.ep-s3d-panel-close { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; display: grid; place-items: center; background: transparent; color: var(--ep-text-secondary); cursor: pointer; }
.ep-s3d-panel-close:hover { background: var(--wd-papier); color: var(--wd-onyx); }
.ep-s3d-panel-close .ms { font-size: 20px; }
.ep-s3d-panel-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 18px; overscroll-behavior: contain; }
.ep-s3d-panel-sec { margin-top: 16px; }
.ep-s3d-panel-h { display: flex; align-items: baseline; gap: 6px; margin: 0 0 8px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ep-text-muted); }
.ep-s3d-panel-scroll > .ep-s3d-panel-h { margin-top: 14px; }
.ep-s3d-h-sub { font-size: 0.78rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ep-text-muted); font-variant-numeric: tabular-nums; }
.ep-s3d-h-cancel { margin-left: auto; padding: 0; border: 0; background: none; font: inherit; font-size: 0.78rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--wd-onyx); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); cursor: pointer; }
.ep-s3d-empty { margin: 0; padding: 2px 2px 8px; font-size: 0.84rem; color: var(--ep-text-secondary); }
.ep-s3d-guest { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 2px 4px 2px 8px; border-radius: 9px; font-size: 0.86rem; }
.ep-s3d-guest:hover { background: var(--wd-papier); }
.ep-s3d-guest > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wd-onyx); }
.ep-s3d-guest > span:first-child { flex: 1; }
.ep-s3d-guest > span .ms { margin-right: 4px; font-size: 16px; vertical-align: -3px; color: var(--ep-text-muted); }
.ep-s3d-guest button { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; display: grid; place-items: center; background: transparent; color: var(--ep-text-secondary); cursor: pointer; transition: background 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.ep-s3d-guest button .ms { font-size: 18px; }
.ep-s3d-guest button:hover:not(:disabled) { background: var(--wd-onyx); color: #fff; }
.ep-s3d-guest button[data-gact="unassign"]:hover, .ep-s3d-guest button[data-act="del-opening"]:hover { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.ep-s3d-guest button:disabled { opacity: 0.3; cursor: not-allowed; }
.ep-s3d-guest-table { flex: none; font-size: 0.76rem; color: var(--ep-text-muted) !important; }
.ep-s3d-guests-search { flex: none; height: 36px; margin: 12px 16px 2px; padding: 0 12px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); font: inherit; font-size: 0.86rem; color: var(--wd-onyx); outline: none; }
.ep-s3d-guests-search:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }

/* Réglages : modèle, taille, chaises, couleurs, dimensions */
.ep-s3d-opt-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-s3d-opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ep-s3d-opt-btn { flex: 1; min-height: 40px; padding: 6px 8px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: #fff; font: inherit; font-size: 0.84rem; font-weight: 500; line-height: 1.2; color: var(--wd-onyx); text-align: center; cursor: pointer; transition: background 150ms var(--wd-ease), border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.ep-s3d-opt-btn .ms { font-size: 18px; }
.ep-s3d-opt-btn span:not(.ms) { font-size: 0.72rem; font-weight: 400; color: var(--ep-text-muted); }
.ep-s3d-opt-btn:hover { background: var(--wd-papier); }
.ep-s3d-opt-btn.is-active { border-color: var(--wd-onyx); box-shadow: inset 0 0 0 1px var(--wd-onyx); font-weight: 600; }
.ep-s3d-seatmap { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ep-s3d-seat { min-width: 0; padding: 6px 8px; border: 1px dashed var(--wd-hairline-2); border-radius: 9px; display: flex; align-items: center; gap: 8px; background: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color 150ms var(--wd-ease), background 150ms var(--wd-ease); }
.ep-s3d-seat:hover { border-color: var(--wd-onyx); }
.ep-s3d-seat-no { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--wd-papier); font-size: 0.68rem; font-weight: 600; color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; }
.ep-s3d-seat-empty { font-size: 0.78rem; color: var(--ep-text-muted); }
.ep-s3d-seat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8rem; color: var(--wd-onyx); }
.ep-s3d-seat-x { flex: none; margin-left: auto; font-size: 15px !important; color: var(--ep-text-muted); }
.ep-s3d-seat.is-taken { border-style: solid; border-color: var(--wd-hairline); background: #FBFAF7; }
.ep-s3d-seat.is-taken .ep-s3d-seat-no { background: var(--wd-onyx); color: #fff; }
.ep-s3d-seat.is-taken:hover { border-color: var(--wd-st-danger); }
.ep-s3d-seat.is-taken:hover .ep-s3d-seat-x { color: var(--wd-st-danger); }
.ep-s3d-seat.is-active { border-style: solid; border-color: var(--wd-jaune); background: var(--wd-jaune-pale); }
.ep-s3d-seat.is-active .ep-s3d-seat-empty { font-weight: 600; color: #6B4F22; }
.ep-s3d-name-input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; font: inherit; font-size: 0.9rem; color: var(--wd-onyx); outline: none; }
.ep-s3d-name-input::placeholder { color: var(--ep-text-muted); }
.ep-s3d-name-input:focus { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.ep-s3d-finishes { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px; }
.ep-s3d-finish { width: 28px; height: 28px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--wd-hairline-2); cursor: pointer; transition: transform 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.ep-s3d-finish:hover { transform: scale(1.08); }
.ep-s3d-finish.is-active { box-shadow: 0 0 0 2px var(--wd-onyx); }
.ep-s3d-dim { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.ep-s3d-dim-label { font-size: 0.86rem; }
.ep-s3d-dim-ctrl { display: flex; align-items: center; gap: 6px; }
.ep-s3d-dim-val { min-width: 64px; text-align: center; font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.ep-s3d-dim-ctrl button { width: 30px; height: 30px; padding: 0; border: 1px solid var(--wd-hairline-2); border-radius: 9px; display: grid; place-items: center; background: #fff; font-size: 1.05rem; line-height: 1; color: var(--wd-onyx); cursor: pointer; }
.ep-s3d-dim-ctrl button:hover { background: var(--wd-papier); }
.ep-s3d-actions-row { display: flex; gap: 8px; }
.ep-s3d-actions-row > * { flex: 1; }
.ep-s3d-apply-all, .ep-s3d-dup-btn, .ep-s3d-del-btn { width: 100%; height: 38px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #fff; font: inherit; font-size: 0.86rem; font-weight: 500; color: var(--wd-onyx); cursor: pointer; transition: background 150ms var(--wd-ease), border-color 150ms var(--wd-ease), color 150ms var(--wd-ease); }
.ep-s3d-apply-all .ms, .ep-s3d-dup-btn .ms, .ep-s3d-del-btn .ms { font-size: 18px; }
.ep-s3d-apply-all:hover, .ep-s3d-dup-btn:hover { background: var(--wd-papier); }
.ep-s3d-del-btn { color: var(--wd-st-danger); }
.ep-s3d-del-btn:hover { background: var(--wd-st-danger-bg); border-color: var(--wd-st-danger-bg); }

/* Étiquettes posées dans la scène (CSS2D) : nom des tables, prénom à chaque place */
.ep-s3d-label { padding: 3px 9px; border-radius: 7px; background: rgba(255, 255, 255, 0.94); font-family: var(--wd-font-display); font-size: 12px; font-weight: 600; color: var(--wd-onyx); white-space: nowrap; box-shadow: 0 1px 2px rgba(27, 24, 22, 0.12), 0 4px 12px -4px rgba(27, 24, 22, 0.2); user-select: none; }
.ep-s3d-seat-name-3d { max-width: 96px; padding: 1px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 999px; background: rgba(27, 24, 22, 0.82); font-size: 10.5px; font-weight: 500; color: #fff; user-select: none; pointer-events: none; }
/* Poignées d'édition : le seul or de la scène */
.ep-s3d-vtx-icon, .ep-s3d-edge-icon, .ep-s3d-open-icon, .ep-s3d-rot-icon { width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; display: grid; place-items: center; background: var(--wd-jaune); color: #fff; box-shadow: 0 2px 8px rgba(27, 24, 22, 0.35); cursor: grab; user-select: none; }
.ep-s3d-edge-icon { background: #A9844A; }
.ep-s3d-open-icon { width: 28px; height: 28px; }
.ep-s3d-open-icon .ms, .ep-s3d-rot-icon .ms { font-size: 16px; }

@media (max-width: 1279.98px) {
    .ep-s3d-tools .lbl, .ep-s3d-right .lbl { display: none; }
    .ep-s3d-tools .ep-s3d-floor-btn, .ep-s3d-right > .ep-s3d-floor-btn { min-width: 36px; padding: 0 8px; justify-content: center; }
}
@media (max-width: 767.98px) {
    .ep-s3d-bar { gap: 6px; padding: 0 8px 0 4px; overflow-x: auto; scrollbar-width: none; }
    .ep-s3d-bar::-webkit-scrollbar { display: none; }
    .ep-s3d-bar > * { flex-shrink: 0; }
    .ep-s3d-bar-title small { display: none; }
    .ep-s3d-tools { padding-left: 6px; }
    .ep-s3d-right { margin-left: 4px; }
    /* La barre défile : ses menus quittent son cadre pour ne pas être coupés */
    .ep-s3d-floor-menu { position: fixed; top: 68px; left: 12px; right: 12px; width: auto; max-height: calc(100dvh - 90px); overflow-y: auto; }
    .ep-s3d-hint { display: none; }   /* astuces à la souris, sans objet au doigt */
    .ep-s3d-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 52%; border-radius: var(--wd-r-card) var(--wd-r-card) 0 0; }
    .ep-s3d-guests { top: 0; left: 0; bottom: 0; width: min(320px, 86vw); border-radius: 0 var(--wd-r-card) var(--wd-r-card) 0; }
}

/* ── Réglages › Formules et tarifs (24/10/2026) ── */
.wd-px-h { font-family: var(--wd-font-display); font-size: 1.02rem; font-weight: 600; margin: 26px 0 10px; }
.wd-adm-set .wd-set-head + .wd-px-h, .wd-adm-set .wd-set-head + form + .wd-px-h, .wd-adm-set .wd-set-head + p + .wd-px-h { margin-top: 0; }
.wd-px-warn { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--wd-st-warn-bg); color: var(--wd-st-warn); font-size: 0.86rem; }
.wd-px-warn .ms { font-size: 19px; }
.wd-px-old { color: var(--wd-st-warn) !important; }
.wd-px-refresh { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 6px; padding: 12px 16px; border: 1px solid var(--wd-hairline); border-radius: 14px; background: #FDFCFA; }
.wd-px-refresh > .ms { font-size: 21px; color: var(--ep-text-muted); }
.wd-px-refresh p { flex: 1 1 260px; margin: 0; font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-px-refresh p b { color: var(--wd-onyx); font-weight: 600; }
.wd-px-link { margin-left: auto; text-decoration: none; }
.wd-px-link .ms { font-size: 18px; }

.wd-px-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 20px; }
.wd-px-price { margin: 0; }
.wd-px-input { display: flex; align-items: center; height: 46px; border: 1px solid var(--wd-hairline-2); border-radius: var(--wd-r-ctl); background: #fff; overflow: hidden; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-px-input:focus-within { border-color: var(--wd-onyx); box-shadow: 0 0 0 3px rgba(27, 24, 22, 0.08); }
.wd-px-input .form-control { border: 0; box-shadow: none !important; height: 44px; width: 110px; flex: none; font-family: var(--wd-font-display); font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; padding: 0 6px 0 14px; background: transparent; }
.wd-px-input span { flex: 1; font-size: 0.86rem; color: var(--ep-text-secondary); white-space: nowrap; padding-right: 12px; }
.wd-px-price.has-error .wd-px-input { border-color: var(--wd-st-danger); }
.wd-px-err { margin: 6px 0 0; font-size: 0.8rem; color: var(--wd-st-danger); }
.wd-px-stripe { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; font-size: 0.78rem; color: var(--ep-text-secondary); min-width: 0; }
.wd-px-stripe i { width: 7px; height: 7px; border-radius: 50%; background: var(--wd-hairline-2); flex: none; }
.wd-px-stripe i.is-ok { background: var(--wd-st-ok); }
.wd-px-stripe code { font-size: 0.74rem; color: var(--ep-text-secondary); background: var(--wd-papier); padding: 1px 6px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.wd-px-group + .wd-px-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--wd-hairline); }
.wd-px-group h3 { font-size: 0.92rem; font-weight: 600; margin: 0 0 6px; }
.wd-px-group h3 small { display: block; margin-top: 2px; font-size: 0.82rem; font-weight: 400; color: var(--ep-text-secondary); }
.wd-px-unknown { margin: 8px 0 0; font-size: 0.84rem; color: var(--ep-text-secondary); }
.wd-px-inline { margin: 14px 0 0; }
.wd-px-inline .ms { font-size: 18px; }
.wd-px-history code { font-size: 0.72rem; }
@media (max-width: 767.98px) {
    .wd-px-link { margin-left: 0; }
}
/* Registres de l'admin : le nom se tronque plutôt que de pousser les colonnes hors du cadre */
.wd-adm-reg .board-cell.cell-name { min-width: 0; overflow: hidden; }
.wd-adm-reg .board-cell.cell-name .wd-cell-stack { min-width: 0; }
.board.wd-adm-reg { grid-template-columns: minmax(0, 1fr); }

/* ============================================================
   RUBRIQUE « VENTES » (audit UX du 25/10/2026, proposition A)
   En-tête commun (_partials/_sales_head.html.twig) : le titre et un seul
   bouton, les onglets des registres (Devis · Contrats · Cessions ·
   Factures | Recettes), puis la rangée d'outils du registre courant.
   ============================================================ */
.wd-page-header.wd-sales-head { margin-bottom: 0; }
.wd-sales-tabs { margin: 12px 0 14px; }
.wd-sales-tools.board-toolbar { margin: 0 0 14px; padding: 0; gap: 6px; flex-wrap: wrap; }
.wd-sales-tools .board-toolbar-separator { display: none; }
.wd-rp-head.wd-sales-tools { margin: 0 0 18px; }
.wd-rb-title { font-family: var(--wd-font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
/* Feuille « Plus » (mobile) : l'entrée de la page courante */
.wd-sheet-item.active { background: var(--wd-papier); color: var(--wd-onyx); font-weight: 600; }
.wd-sheet-item.active i { opacity: 1; }
@media (max-width: 767.98px) {
    /* Les quatre onglets tiennent dans 390 px : marges serrées, compteurs masqués sauf les retards */
    .wd-sales-tabs a { padding: 0 10px; }
    .wd-sales-tabs a em:not(.late) { display: none; }
    .wd-sales-tabs .sep { margin: 10px 4px; }
    .wd-sales-tools .board-toolbar-search { flex: 1 1 140px; }
    /* Le titre et le bouton restent sur une ligne (la règle des registres met le titre en pleine largeur) */
    .wd-page-header.wd-sales-head { flex-wrap: nowrap; }
    .wd-page-header.wd-sales-head .wd-page-title { width: auto; }
    .wd-sales-head .board-toolbar { width: auto; margin-left: auto; flex-wrap: nowrap; }
}

/* ============================================================
   E-REPORTING — relié : repères de la plateforme, factures à reprendre,
   dernières transmissions ; sinon, pourquoi relier. Puis les montants
   mois par mois (relevé pour le comptable, pas une déclaration).
   ============================================================ */
.wd-er .wd-health-card { cursor: default; }
.wd-er .wd-health-card:hover { transform: none; box-shadow: var(--wd-card-shadow); }
.wd-er .wd-now { margin-top: 18px; }
.wd-er .wd-now-rows .d { color: var(--ep-text-secondary); font-size: 0.86rem; }
.wd-er .wd-now-rows .d .wd-st { height: 22px; font-size: 0.74rem; margin-right: 6px; }
.wd-er-alert { margin: 14px 4px 0; font-size: 0.86rem; color: var(--wd-st-danger); }
.wd-er-intro p { max-width: 60ch; margin: 0 auto 12px; }
.wd-er-intro form { display: inline-block; margin-top: 4px; }
.wd-er-intro .wd-er-publisher { margin-top: 10px; font-size: 0.82rem; color: var(--ep-text-muted); }
.wd-er-months { margin-top: 32px; }
.wd-er-h { font-size: 1rem; font-weight: 600; color: var(--wd-onyx); margin: 0 4px 12px; }
.wd-er-h small { font-weight: 400; font-size: 0.82rem; color: var(--ep-text-secondary); margin-left: 6px; }
.wd-er-empty { margin: 0 4px; color: var(--ep-text-muted); font-size: 0.88rem; }
.wd-er-back { display: inline-flex; vertical-align: -3px; margin-right: 8px; color: var(--ep-text-secondary); text-decoration: none; }
.wd-er-back:hover { color: var(--wd-onyx); }

.wd-er-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.wd-er-table th, .wd-er-table td { padding: 12px 14px; vertical-align: middle; }
.wd-er-table thead th { font-size: 0.78rem; font-weight: 500; color: var(--ep-text-secondary); border-bottom: 1px solid var(--wd-hairline); white-space: nowrap; }
.wd-er-table .c-who { padding-left: 22px; text-align: left; }
.wd-er-table .c-who a { color: var(--wd-onyx); font-weight: 500; text-decoration: none; }
.wd-er-table .c-who a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--wd-jaune); }
.wd-er-table .c-n, .wd-er-table .c-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wd-er-table .c-num:last-child { padding-right: 22px; }
.wd-er-table .c-dl { width: 52px; text-align: center; padding-right: 16px; }
.wd-er-table .c-dl a { display: inline-flex; color: var(--ep-text-secondary); }
.wd-er-table .c-dl a:hover { color: var(--wd-onyx); }
.wd-er-row { border-top: 1px solid var(--wd-hairline); }
.wd-er-table thead + tbody .wd-er-row:first-child, .wd-er-q + .wd-er-row { border-top: 0; }
.wd-er-row:hover { background: #FDFCFA; }
.wd-er-q th { background: var(--wd-papier); border-top: 1px solid var(--wd-hairline); padding-left: 22px; font-weight: 400; font-size: 0.86rem; color: var(--ep-text-secondary); text-align: left; }
.wd-er-table thead + tbody .wd-er-q th { border-top: 0; }
.wd-er-q b { color: var(--wd-onyx); font-weight: 600; margin-right: 6px; }
.wd-er-none td { padding: 12px 22px; font-size: 0.84rem; color: var(--ep-text-muted); }
/* Où en est chaque mois chez SuperPDP : un mot sous le nom du mois, le détail sur sa fiche */
.wd-er-st { margin-left: 8px; font-size: 0.72rem; vertical-align: 1px; }
.wd-er-st.is-before { font-size: 0.78rem; color: var(--ep-text-muted); }
.wd-er-decl { margin-top: 32px; }
.wd-er-decl .wd-now { margin-bottom: 16px; }
.wd-er-why { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 4px; }
@media (max-width: 575.98px) {
    /* Sous le nom du mois ; un tableau trop large défile au lieu d'être coupé */
    .wd-er-st { display: table; margin: 4px 0 0; padding: 0 7px; font-size: 0.68rem; }
    .wd-er-table th, .wd-er-table td { padding-left: 6px; padding-right: 6px; }
    .wd-er .wd-rb-reg { overflow-x: auto; }
    .wd-er-decl .wd-now { padding: 6px 14px; }
    .wd-er-decl .wd-now-rows li { height: auto; min-height: 44px; flex-wrap: wrap; row-gap: 2px; padding: 8px 0; }
    .wd-er-decl .wd-now-rows .t { flex-basis: 100%; }
    .wd-er-why { max-width: 100%; white-space: normal; }
}
@media (max-width: 575.98px) {
    .wd-er-table { font-size: 0.84rem; }
    .wd-er-table th, .wd-er-table td { padding: 10px 8px; }
    .wd-er-table .c-who, .wd-er-q th { padding-left: 14px; }
    .wd-er-table .c-num:last-child { padding-right: 14px; }
    .wd-er-table .c-dl { width: 40px; padding-right: 10px; }
}

/* ============================================================
   FACTURES REÇUES — registre des factures fournisseurs arrivées par la
   plateforme agréée, fiche avec la réponse à donner (approuver, refuser
   avec un motif, signaler le paiement).
   ============================================================ */
.wd-ri-lead { margin: 0 4px 16px; font-size: 0.9rem; color: var(--ep-text-secondary); }
.wd-ri-table .wd-cell-sub { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--ep-text-muted); font-weight: 400; }
.wd-ri-table .c-date { width: 120px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wd-ri-table .c-state { width: 130px; padding-right: 22px; text-align: right; }
.wd-ri-table .c-state .wd-st { height: 22px; font-size: 0.74rem; }
.wd-ri .is-late { color: var(--wd-st-danger); font-weight: 600; }
.wd-ri-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 20px; align-items: start; }
.wd-ri-side { display: grid; gap: 20px; }
.wd-ri-refuse { margin-top: 14px; border-top: 1px solid var(--wd-hairline); padding-top: 12px; }
.wd-ri-refuse summary { cursor: pointer; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-ri-refuse summary:hover { color: var(--wd-onyx); }
.wd-ri-refuse form { display: grid; gap: 8px; margin-top: 10px; }
.wd-ri-refuse label { font-size: 0.8rem; font-weight: 500; color: var(--ep-text-secondary); }
.wd-ri-refuse label small { font-weight: 400; color: var(--ep-text-muted); margin-left: 4px; }
.wd-ri-refuse .form-select { height: 36px; font-size: 0.88rem; }
.wd-ri-refuse-btn { justify-self: start; color: var(--wd-st-danger); }
.wd-ri .wd-doc-einv-steps { margin-top: 16px; }
.wd-ri-cost .wd-doc-einv-note a { color: var(--wd-onyx); }
.wd-ri-cost-form { display: grid; gap: 6px; margin-top: 10px; }
.wd-ri-cost-form .form-label { font-size: 0.8rem; font-weight: 500; color: var(--ep-text-secondary); margin: 4px 0 0; }
.wd-ri-cost-form .form-select { height: 36px; font-size: 0.88rem; }
.wd-ri-cost-form .wd-ev-btn { justify-self: start; margin-top: 6px; }
.wd-pf-main small a { color: var(--ep-text-secondary); }
@media (max-width: 991.98px) {
    .wd-ri-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
    .wd-ri-table .c-date { display: none; }
    .wd-ri-table .c-state { width: auto; padding-right: 14px; }
}

/* ============================================================
   AVIS CLIENTS — registre (/reviews) : note moyenne, segments par statut,
   une carte RELIEF par avis, actions dépliées sur place (<details>).
   Étoiles à l'or chaud : une jauge, jamais un aplat.
   ============================================================ */
.wd-rv-stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.wd-rv-stars svg { width: var(--rv-star, 16px); height: var(--rv-star, 16px); fill: var(--wd-fumee); }
.wd-rv-stars svg.on { fill: var(--wd-jaune); }
.wd-rv-score { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0 4px 18px; }
.wd-rv-score strong { font-family: var(--wd-font-display); font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.wd-rv-score > span:last-child { font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-rv-score a { color: var(--wd-onyx); }
.wd-rv-first p { max-width: 520px; margin: 0 auto 14px; }
.wd-rv-segs .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.wd-rv-segs .seg::-webkit-scrollbar { display: none; }
.wd-rv-segs .seg a { white-space: nowrap; flex: none; }
.wd-rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.wd-rv-card {
    background: var(--wd-card-bg); border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card);
    box-shadow: var(--wd-card-shadow); padding: 18px 20px;
    scroll-margin-top: 90px;
}
.wd-rv-card:target { border-color: var(--wd-jaune); }
.wd-rv-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.wd-rv-author { font-weight: 600; font-size: 0.95rem; }
.wd-rv-top .wd-st { margin-left: auto; height: 22px; font-size: 0.74rem; }
.wd-rv-av { width: 30px; height: 30px; border-radius: 50%; background: var(--wd-papier); display: inline-flex; align-items: center; justify-content: center; }
.wd-rv-av .ms { font-size: 17px; color: var(--ep-text-secondary); }
.wd-rv-body { margin: 10px 0 0; font-size: 0.94rem; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.wd-rv-meta { margin: 8px 0 0; font-size: 0.82rem; color: var(--ep-text-muted); }
.wd-rv-meta a { color: var(--ep-text-secondary); }
.wd-rv-why { color: var(--wd-st-danger); }
.wd-rv-reply { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--wd-jaune); background: var(--wd-gold-wash); border-radius: 0 10px 10px 0; }
.wd-rv-reply b { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ep-text-secondary); margin-bottom: 2px; }
.wd-rv-reply p { margin: 0; font-size: 0.88rem; white-space: pre-line; overflow-wrap: anywhere; }
.wd-rv-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 14px; }
.wd-rv-actions form { margin: 0; }
.wd-rv-fold > summary { list-style: none; cursor: pointer; }
.wd-rv-fold > summary::-webkit-details-marker { display: none; }
.wd-rv-fold[open] > summary { background: var(--wd-papier); }
.wd-rv-fold[open] { flex-basis: 100%; }
.wd-rv-form { display: grid; gap: 8px; margin-top: 10px; max-width: 560px; }
.wd-rv-form .form-label { font-size: 0.8rem; font-weight: 500; color: var(--ep-text-secondary); margin: 0; }
.wd-rv-form .form-label small { font-weight: 400; color: var(--ep-text-muted); margin-left: 4px; }
.wd-rv-hint { margin: 0 0 2px; font-size: 0.82rem; color: var(--ep-text-secondary); }
.wd-rv-reason { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; cursor: pointer; }
.wd-rv-reason input { accent-color: var(--wd-onyx); }
.wd-rv-danger { color: var(--wd-st-danger); }
.wd-rv-danger:hover { color: var(--wd-st-danger); }
@media (max-width: 575.98px) {
    .wd-rv-card { padding: 16px; }
    .wd-rv-top .wd-st { margin-left: 0; }
}

/* ============================================================
   SUIVI DES DEMANDES — Clients › Suivi (/clients/suivi) : chiffres de la
   période, prospects en colonnes (grammaire du tableau des tâches .wd-kb),
   puis sources et motifs de perte en barres.
   ============================================================ */
.wd-pl-periods { margin: 0 0 4px; }
.wd-rp-stats--pl { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 10px; }
.wd-rp-stats--pl .wd-rp-stat .w b { color: var(--wd-onyx); font-weight: 600; }
.wd-rp-stats--pl .wd-rp-stat .g i { background: var(--wd-jaune); }
.wd-rp-stats--pl .is-quiet .v { color: var(--ep-text-muted); }
.wd-pl .wd-kb-col.is-new .dot { background: var(--wd-st-info); }
.wd-pl .wd-kb-col.is-discussion .dot { background: var(--wd-jaune); }
.wd-pl .wd-kb-col.is-confirmed .dot { background: var(--wd-st-ok); }
.wd-pl .wd-kb-col.is-lost .dot { background: var(--wd-st-danger); }
.wd-pl-card .wd-kb-meta { flex-wrap: wrap; row-gap: 4px; }
.wd-pl-card .wd-kb-meta .ms { font-size: 15px; }
.wd-pl-card .wd-kb-meta .is-late { color: var(--wd-st-danger); font-weight: 600; }
.wd-pl-src { max-width: 100%; padding: 1px 8px; border-radius: 999px; background: var(--wd-papier); color: var(--ep-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-pl-unread { display: inline-flex; align-items: center; gap: 3px; color: var(--wd-st-info); font-weight: 600; }
.wd-pl-facts { list-style: none; margin: 10px 0 0; padding: 9px 0 0; border-top: 1px solid var(--wd-hairline); display: grid; gap: 5px; }
.wd-pl-facts li { display: flex; align-items: flex-start; gap: 7px; min-width: 0; font-size: 0.78rem; line-height: 1.4; color: var(--ep-text-secondary); }
.wd-pl-facts li .ms { font-size: 15px; margin-top: 1px; flex: none; }
.wd-pl-facts li > span:last-child { overflow-wrap: anywhere; }
.wd-pl-day { display: inline-block; margin-left: 2px; padding: 0 7px; border-radius: 999px; font-style: normal; font-size: 0.72rem; font-weight: 500; white-space: nowrap; background: var(--wd-st-mute-bg); color: var(--wd-st-mute); }
.wd-pl-day.is-ok { background: var(--wd-st-ok-bg); color: var(--wd-st-ok); }
.wd-pl-day.is-warn { background: var(--wd-st-warn-bg); color: var(--wd-st-warn); }
.wd-pl-day.is-danger { background: var(--wd-st-danger-bg); color: var(--wd-st-danger); }
.wd-pl-day.is-own { background: var(--wd-st-info-bg); color: var(--wd-st-info); }
.wd-pl-facts li.is-chase { color: #8A5A12; font-weight: 600; }
.wd-pl-facts li.is-reason { color: var(--wd-st-danger); }
.wd-pl-card.is-chase { box-shadow: inset 3px 0 0 var(--wd-jaune), 0 1px 2px rgba(27, 24, 22, 0.05), 0 10px 20px -16px rgba(27, 24, 22, 0.28); }
.wd-pl-card.is-saving { opacity: 0.6; pointer-events: none; }
.wd-pl-note { margin: 10px 0 0; text-align: center; font-size: 0.76rem; color: var(--ep-text-muted); }
.wd-pl-hint { display: flex; align-items: center; gap: 6px; margin: 4px 4px 0; font-size: 0.8rem; color: var(--ep-text-muted); }
.wd-pl-hint .ms { font-size: 17px; }
.wd-pl-dialog { width: min(420px, calc(100vw - 32px)); border: 0; border-radius: var(--wd-r-card); padding: 22px 22px 18px; box-shadow: var(--wd-shadow-lift); color: var(--wd-onyx); }
.wd-pl-dialog::backdrop { background: rgba(27, 24, 22, 0.35); }
.wd-pl-dialog h2 { font-size: 1.1rem; margin: 0 0 6px; }
.wd-pl-dialog p { margin: 0 0 12px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-pl-reason { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 0.9rem; cursor: pointer; }
.wd-pl-reason input { accent-color: var(--wd-onyx); width: 16px; height: 16px; }
.wd-pl-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.wd-pl-insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.wd-pl-panel { background: var(--wd-card-bg); border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); padding: 18px 20px; min-width: 0; }
.wd-pl-panel h2 { font-size: 0.98rem; margin: 0 0 14px; }
.wd-pl-panel h2 small { font-family: var(--wd-font-sans); font-weight: 400; font-size: 0.8rem; color: var(--ep-text-muted); margin-left: 6px; letter-spacing: 0; }
.wd-pl-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wd-pl-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 0.86rem; }
.wd-pl-bars .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.wd-pl-bars .n { color: var(--ep-text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-pl-bars .bar { grid-column: 1 / -1; position: relative; height: 6px; border-radius: 3px; background: var(--wd-papier); overflow: hidden; }
.wd-pl-bars .bar i, .wd-pl-bars .bar b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.wd-pl-bars .bar i { background: var(--wd-or-pale); }
.wd-pl-bars .bar b { background: var(--wd-jaune); }
.wd-pl-bars .bar.is-lost i { background: #E6B8B0; }
.wd-pl-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin: 14px 0 0; font-size: 0.76rem; color: var(--ep-text-muted); }
.wd-pl-legend i { display: inline-block; width: 10px; height: 6px; border-radius: 3px; }
.wd-pl-legend i.k-all { background: var(--wd-or-pale); }
.wd-pl-legend i.k-won { background: var(--wd-jaune); margin-left: 6px; }
.wd-pl-none { margin: 0; font-size: 0.86rem; color: var(--ep-text-muted); }
@media (max-width: 991.98px) {
    .wd-rp-stats--pl { grid-template-columns: 1fr 1fr; }
    .wd-rp-stats--pl .wd-rp-stat:nth-child(3) { border-left: 0; }
    .wd-rp-stats--pl .wd-rp-stat:nth-child(n+3) { border-top: 1px solid var(--wd-hairline); }
    .wd-pl-insights { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================
   RENTABILITÉ — chapitre du dossier (/events/{id}/rentabilite) et vue de
   l'année (Ventes › Rentabilité) : bande de chiffres .wd-rp-stats, puis
   dépenses et temps passé en lignes, formulaires repliés.
   ============================================================ */
.wd-rp-stats--pf { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wd-rp-stats--pf .wd-rp-stat .w b { color: var(--wd-onyx); font-weight: 600; }
.wd-rp-stats--pf .wd-rp-stat .g i { background: var(--wd-jaune); }
.wd-pf-note { display: flex; align-items: flex-start; gap: 8px; margin: -4px 4px 18px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-pf-note .ms { font-size: 18px; color: var(--ep-text-muted); }
.wd-pf-note a { color: var(--wd-onyx); }
.wd-pf { margin-bottom: 18px; scroll-margin-top: 90px; }
.wd-pf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wd-pf-head h2 { font-size: 1.05rem; margin: 0; }
.wd-pf-head h2 small { font-family: var(--wd-font-sans); font-size: 0.86rem; font-weight: 500; color: var(--ep-text-secondary); letter-spacing: 0; margin-left: 8px; font-variant-numeric: tabular-nums; }
.wd-pf-hint { margin: 6px 0 12px; font-size: 0.82rem; color: var(--ep-text-muted); }
.wd-pf-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; align-items: end; padding: 14px 0 16px; border-bottom: 1px solid var(--wd-hairline); margin-bottom: 4px; }
.wd-pf-f { min-width: 0; }
.wd-pf-f .form-label { font-size: 0.78rem; font-weight: 500; color: var(--ep-text-secondary); margin-bottom: 4px; }
.wd-pf-f .form-label small { font-weight: 400; color: var(--ep-text-muted); margin-left: 4px; }
.wd-pf-f--wide { grid-column: span 2; }
.wd-pf-f--submit { display: flex; justify-content: flex-end; }
.wd-pf-eur, .wd-pf-dur { display: flex; align-items: center; gap: 6px; }
.wd-pf-eur span, .wd-pf-dur span { font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-pf-dur .form-control { width: 64px; }
.wd-pf-list { list-style: none; margin: 0; padding: 0; }
.wd-pf-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--wd-hairline); flex-wrap: wrap; }
.wd-pf-list .wd-pf-row:first-child { border-top: 0; }
.wd-pf-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--wd-papier); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.wd-pf-ic .ms { font-size: 18px; color: var(--ep-text-secondary); }
.wd-pf-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.wd-pf-main b { font-weight: 600; font-size: 0.92rem; overflow-wrap: anywhere; }
.wd-pf-main small { font-size: 0.8rem; color: var(--ep-text-muted); }
.wd-pf-amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-pf-row form { margin: 0; }
.wd-pf-more > summary { list-style: none; cursor: pointer; }
.wd-pf-more > summary::-webkit-details-marker { display: none; }
.wd-pf-more[open] { flex-basis: 100%; order: 10; }
.wd-pf-more[open] > summary { margin-left: auto; background: var(--wd-papier); }
.wd-pf-pop { margin-top: 6px; }
.wd-pf-pop .wd-pf-form { border-bottom: 0; padding-bottom: 8px; }
.wd-pf-del { color: var(--wd-st-danger); text-decoration-color: currentColor; font-size: 0.84rem; }
.wd-pf-empty { margin: 0; font-size: 0.86rem; color: var(--ep-text-muted); }
.wd-pf-table-wrap { overflow-x: auto; border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); background: var(--wd-card-bg); }
.wd-pf-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.wd-pf-table th, .wd-pf-table td { padding: 12px 16px; border-top: 1px solid var(--wd-hairline); text-align: left; vertical-align: top; }
.wd-pf-table thead th { border-top: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ep-text-muted); white-space: nowrap; }
.wd-pf-table tbody th { font-weight: 600; min-width: 200px; }
.wd-pf-table tbody th a { color: var(--wd-onyx); text-decoration: none; }
.wd-pf-table tbody th a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wd-jaune); }
.wd-pf-table small { display: block; font-weight: 400; font-size: 0.78rem; color: var(--ep-text-muted); margin-top: 2px; }
.wd-pf-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-pf-table .num.is-bad b { color: var(--wd-st-danger); }
.wd-pf-foot { margin: 10px 4px 0; }
@media (max-width: 991.98px) {
    .wd-rp-stats--pf { grid-template-columns: 1fr 1fr; }
    .wd-rp-stats--pf .wd-rp-stat:nth-child(3) { border-left: 0; }
    .wd-rp-stats--pf .wd-rp-stat:nth-child(n+3) { border-top: 1px solid var(--wd-hairline); }
    .wd-pf-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575.98px) {
    .wd-pf-form { grid-template-columns: minmax(0, 1fr); }
    .wd-pf-f--wide { grid-column: auto; }
    .wd-pf-f--submit { justify-content: stretch; }
    .wd-pf-f--submit .wd-ev-btn { flex: 1; justify-content: center; }
    .wd-pf-table .c-time { display: none; }
}

/* ============================================================
   E-MAILS AUX INVITÉS — écran partagé par le prestataire (Invités ›
   E-mails) et le couple (Invitations › Par e-mail) : types en cartes,
   rédaction, puis l'historique des envois.
   ============================================================ */
.wd-sw-pagehd > .wd-sw-hd-acts { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.wd-gm { max-width: 860px; }
.wd-gm-lead { margin: 0 4px 14px; font-size: 0.9rem; color: var(--ep-text-secondary); }
.wd-gm-lead b { color: var(--wd-onyx); }
.wd-gm-lead a { color: var(--wd-onyx); margin-left: 4px; }
.wd-gm-kinds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.wd-gm-kind { display: flex; flex-direction: column; gap: 3px; padding: 14px; border: 1px solid var(--wd-card-border); border-radius: 14px; background: #fff; color: var(--wd-onyx); text-decoration: none; transition: border-color 150ms var(--wd-ease), box-shadow 150ms var(--wd-ease); }
.wd-gm-kind:hover { color: var(--wd-onyx); box-shadow: var(--wd-card-shadow); }
.wd-gm-kind .ms { font-size: 20px; color: var(--ep-text-secondary); margin-bottom: 4px; }
.wd-gm-kind b { font-size: 0.88rem; font-weight: 600; line-height: 1.3; }
.wd-gm-kind small { font-size: 0.76rem; color: var(--ep-text-muted); }
.wd-gm-kind.is-on { border-color: var(--wd-onyx); box-shadow: inset 0 0 0 1px var(--wd-onyx); }
.wd-gm-kind.is-on .ms { color: var(--wd-onyx); }
.wd-gm-kind.is-off:not(.is-on) b { color: var(--ep-text-secondary); }
.wd-gm-compose, .wd-gm-history { background: var(--wd-card-bg); border: 1px solid var(--wd-card-border); border-radius: var(--wd-r-card); box-shadow: var(--wd-card-shadow); padding: 20px 22px; margin-bottom: 18px; }
.wd-gm-compose h2, .wd-gm-history h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 0 0 4px; }
.wd-gm-compose h2 .ms { font-size: 20px; }
.wd-gm-for { margin: 0 0 12px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-gm-block { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--wd-papier); font-size: 0.88rem; color: var(--ep-text-secondary); }
.wd-gm-block .ms { font-size: 18px; }
.wd-gm-to { margin: 0 0 6px; font-size: 0.9rem; }
.wd-gm-to summary { cursor: pointer; list-style: none; }
.wd-gm-to summary::-webkit-details-marker { display: none; }
.wd-gm-to summary span { margin-left: 6px; font-size: 0.82rem; color: var(--ep-text-secondary); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--wd-jaune); }
.wd-gm-to ul { list-style: none; margin: 8px 0 0; padding: 10px 12px; max-height: 220px; overflow-y: auto; border-radius: 10px; background: var(--wd-gold-wash); columns: 2; column-gap: 20px; }
.wd-gm-to li { font-size: 0.84rem; padding: 2px 0; break-inside: avoid; }
.wd-gm-to li small { color: var(--ep-text-muted); margin-left: 4px; }
.wd-gm-skip { margin: 0 0 12px; font-size: 0.8rem; color: var(--ep-text-muted); }
.wd-gm-form { display: grid; gap: 6px; }
.wd-gm-form .form-label { font-size: 0.8rem; font-weight: 500; color: var(--ep-text-secondary); margin: 8px 0 0; }
.wd-gm-form .form-label small { font-weight: 400; color: var(--ep-text-muted); margin-left: 4px; }
.wd-gm-auto { display: flex; align-items: flex-start; gap: 7px; margin: 6px 0 0; font-size: 0.8rem; color: var(--ep-text-muted); }
.wd-gm-auto .ms { font-size: 16px; color: var(--wd-jaune); margin-top: 1px; }
.wd-gm-acts { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wd-gm-history ul { list-style: none; margin: 8px 0 0; padding: 0; }
.wd-gm-history li { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-top: 1px solid var(--wd-hairline); flex-wrap: wrap; }
.wd-gm-history li:first-child { border-top: 0; }
.wd-gm-history li > .ms { font-size: 19px; color: var(--ep-text-secondary); margin-top: 1px; }
.wd-gm-h-main { flex: 1 1 260px; min-width: 0; font-size: 0.88rem; overflow-wrap: anywhere; }
.wd-gm-h-main small { display: block; font-size: 0.78rem; color: var(--ep-text-muted); margin-top: 2px; }
.wd-gm-h-n { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-gm-h-n .wd-st { height: 22px; font-size: 0.74rem; }
.wd-gm-none { margin: 4px 0 0; font-size: 0.86rem; color: var(--ep-text-muted); }
.wd-gm-legal { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--wd-hairline); font-size: 0.78rem; color: var(--ep-text-muted); }
@media (max-width: 991.98px) {
    .wd-gm-kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .wd-gm-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wd-gm-to ul { columns: 1; }
    .wd-gm-compose, .wd-gm-history { padding: 16px; }
    .wd-gm-acts .wd-ev-btn { flex: 1; justify-content: center; }
}

/* ── Paramètres › Devis et factures : délais des relances, sur une ligne ── */
.wd-gf-delays { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: -2px 0 16px; padding-left: 56px; font-size: 0.86rem; color: var(--ep-text-secondary); }
.wd-gf-delays .wd-gf-comma { margin-left: -6px; }
.wd-gf-delays .form-control.wd-gf-days { width: 68px; height: 34px; padding: 4px 8px; text-align: center; font-variant-numeric: tabular-nums; }
.wd-gf-delays + .invalid-feedback, .wd-gf-delays ~ .invalid-feedback { display: block; padding-left: 56px; margin: -10px 0 12px; }
@media (max-width: 575.98px) { .wd-gf-delays, .wd-gf-delays ~ .invalid-feedback { padding-left: 0; } }
