/* ============================================================
   WEDORIA PROGRAMME DU JOUR J (2026-08)
   Le déroulé se lit comme une partition : une colonne d'heures en
   chiffres tabulaires, un rail continu, et des étapes sans carte —
   la page respire, l'élévation ne sert qu'au survol. Les moments de
   la journée et les battements structurent la lecture.
   Scope : .wd-tl (planner) et .wd-portal (portail couple).
   ============================================================ */

/* ── 1. Ligne de méta sous le titre ─────────────────────────── */
.wd-tl-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 1.6rem;
    font-size: 0.8rem;
    color: var(--ep-text-secondary);
}
.wd-tl-meta-line span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}
.wd-tl-meta-line i {
    font-size: 0.82rem;
    color: var(--wd-or-profond);
    opacity: 0.7;
}
.wd-tl-meta-line .tabular { font-variant-numeric: tabular-nums; }
.wd-tl-meta-line .is-gold { color: var(--wd-or-profond); }
.wd-tl-meta-line .is-gold i { opacity: 1; }

/* ── 3. Le déroulé ──────────────────────────────────────────── */
.wd-tl-day {
    position: relative;
    max-width: 940px;
    /* L'en-tête a besoin d'air avant que la journée ne commence */
    margin-top: 2.4rem;
}
.wd-tl-day > .wd-tl-moment:first-child { margin-top: 0; }
@media (max-width: 767.98px) {
    .wd-tl-day { margin-top: 1.6rem; }
}

/* Moment de la journée : une respiration, pas un titre de section */
.wd-tl-moment {
    margin: 2rem 0 0.6rem;
    padding-left: calc(74px + 1.1rem + 11px);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ep-text-muted);
}
.wd-tl-moment .gap {
    margin-left: 0.7rem;
    font-size: 0.65rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ep-text-muted);
}
.wd-tl-moment .gap::before { content: '· '; }

/* Battement : le rail se pointille et l'attente se dit */
.wd-tl-gap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0.55rem 0 0.55rem calc(74px + 1.1rem);
    font-size: 0.68rem;
    font-style: italic;
    color: var(--ep-text-muted);
}
.wd-tl-gap::before {
    content: '';
    flex: none;
    width: 22px;
    height: 0;
    margin-left: -11px;
    border-top: 1px dashed var(--wd-hairline-2);
    transform: rotate(90deg);
}

/* ── 4. L'étape ─────────────────────────────────────────────── */
.wd-tl-step {
    display: grid;
    grid-template-columns: 74px 22px 1fr;
    gap: 1.1rem;
    padding: 0.55rem 0.9rem 0.75rem 0;
    border-radius: 12px;
    scroll-margin-top: 90px;
    transition: background 240ms var(--wd-ease), box-shadow 240ms var(--wd-ease);
}
.wd-tl-step:hover {
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--wd-shadow-soft);
}

/* Heure : chiffres tabulaires, la fin en retrait */
.wd-tl-when {
    text-align: right;
    padding-top: 0.35rem;
    line-height: 1.15;
}
.wd-tl-when .start {
    display: block;
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--wd-onyx);
    font-variant-numeric: tabular-nums;
}
.wd-tl-when .end {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    color: var(--ep-text-muted);
    font-variant-numeric: tabular-nums;
}
.wd-tl-when .end::before { content: '→ '; opacity: 0.6; }
.wd-tl-step--highlight .wd-tl-when .start { color: var(--wd-or-profond); }

/* Rail continu + point */
.wd-tl-rail {
    position: relative;
    display: flex;
    justify-content: center;
}
.wd-tl-rail::before {
    content: '';
    position: absolute;
    top: -1.2rem;
    bottom: -1.2rem;
    left: 50%;
    width: 1px;
    background: var(--wd-hairline-2);
    transform: translateX(-50%);
}
.wd-tl-day > .wd-tl-step:first-of-type .wd-tl-rail::before { top: 0.75rem; }
.wd-tl-day > .wd-tl-step:last-child .wd-tl-rail::before { bottom: 50%; }
.wd-tl-rail .dot {
    position: relative;
    z-index: 1;
    width: 9px;
    height: 9px;
    margin-top: 0.7rem;
    border-radius: 50%;
    background: var(--wd-ivoire);
    box-shadow: inset 0 0 0 1.5px var(--wd-fumee-fonce);
    transition: box-shadow 240ms var(--wd-ease), transform 240ms var(--wd-ease);
}
.wd-tl-step:hover .wd-tl-rail .dot { transform: scale(1.15); }
.wd-tl-step--highlight .wd-tl-rail .dot {
    background: var(--wd-or);
    box-shadow: inset 0 0 0 1.5px var(--wd-or-profond), 0 0 0 4px rgba(184, 154, 94, 0.18);
}

/* Contenu */
.wd-tl-body { min-width: 0; padding-top: 0.15rem; }
.wd-tl-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.wd-tl-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
    color: var(--wd-onyx);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.wd-tl-title > i {
    font-size: 0.9rem;
    color: var(--wd-or-profond);
    opacity: 0.85;
}
.wd-tl-flag {
    height: 19px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--wd-gold-wash);
    color: var(--wd-or-profond);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
}
.wd-tl-desc {
    margin: 0.35rem 0 0;
    max-width: 68ch;
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--ep-text-secondary);
    text-wrap: pretty;
}
.wd-tl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1.2rem;
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: var(--ep-text-muted);
}
.wd-tl-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.wd-tl-meta i { font-size: 0.75rem; color: var(--wd-or-profond); opacity: 0.6; }

/* Actions : au survol de l'étape, jamais au repos */
.wd-tl-actions {
    flex: none;
    display: flex;
    gap: 0.25rem;
}
.wd-tl-actions form { display: contents; }
.wd-tl-act {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--ep-text-muted);
    font-size: 0.76rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 200ms var(--wd-ease), transform 200ms var(--wd-ease),
                background 200ms var(--wd-ease), color 200ms var(--wd-ease);
}
.wd-tl-step:hover .wd-tl-act,
.wd-tl-step:focus-within .wd-tl-act { opacity: 1; transform: translateY(0); }
.wd-tl-act:hover { background: rgba(26, 26, 31, 0.06); color: var(--wd-onyx); }
.wd-tl-act:active { transform: scale(0.94); }
.wd-tl-act--danger:hover { background: rgba(178, 90, 74, 0.1); color: var(--ep-danger); }

/* ── 5. Pied : ajouter sans remonter en haut de page ────────── */
.wd-tl-foot {
    max-width: 940px;
    padding-left: calc(74px + 1.1rem);
    margin-top: 0.4rem;
}
.wd-tl-add {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.05rem;
    border: 1px dashed var(--wd-hairline-2);
    border-radius: 999px;
    background: transparent;
    color: var(--ep-text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 200ms var(--wd-ease), background 200ms var(--wd-ease),
                color 200ms var(--wd-ease);
}
.wd-tl-add:hover {
    border-color: var(--wd-or-pale);
    background: #fff;
    color: var(--wd-onyx);
}
.wd-tl-add i { color: var(--wd-or-profond); }

/* ── 6. Programme vide : une invitation ─────────────────────── */
.wd-tl-blank {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    max-width: 940px;
    padding: 3.4rem 1.5rem;
    margin-top: 2rem;
    border: 1.5px dashed var(--wd-hairline-2);
    border-radius: var(--wd-r-card);
    background: rgba(255, 255, 255, 0.5);
    text-align: center;
}
.wd-tl-blank-ico {
    width: 58px;
    height: 58px;
    margin-bottom: 0.5rem;
    border-radius: 50%;
    background: var(--wd-gold-wash);
    color: var(--wd-or-profond);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wd-tl-blank strong { font-size: 1rem; font-weight: 600; }
.wd-tl-blank p {
    margin: 0;
    max-width: 52ch;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--ep-text-secondary);
}
.wd-tl-blank .btn { margin-top: 0.8rem; border-radius: 999px !important; }

/* ── 7. Modale d'étape ──────────────────────────────────────── */
.wd-tl-modal .modal-content {
    border: none;
    border-radius: var(--wd-r-card);
    box-shadow: var(--wd-shadow-lift);
}
.wd-tl-modal .modal-header {
    padding: 1.05rem 1.35rem 0.85rem;
    border-bottom: 1px solid var(--wd-hairline);
}
.wd-tl-modal .modal-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ep-text-secondary);
}
.wd-tl-modal .modal-footer {
    padding: 0.9rem 1.35rem;
    border-top: 1px solid var(--wd-hairline);
}
.wd-tl-modal .modal-footer .btn { border-radius: 999px !important; font-weight: 600; }
.wd-tl-modal .modal-footer .btn-primary {
    background: var(--wd-onyx);
    border-color: var(--wd-onyx);
    color: var(--wd-ivoire);
}
.wd-tl-modal .modal-footer .btn-primary:hover { background: var(--wd-onyx); opacity: 0.92; }
.wd-tl-modal .modal-footer .btn-primary i { color: var(--wd-or); }
.wd-tl-form { padding: 1.15rem 1.35rem 1.35rem; }

/* Groupes de champs : titre au-dessus, bloc lavé en dessous */
.wd-tl-form-sub {
    margin: 1.25rem 0 0.5rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ep-text-secondary);
}
.wd-tl-form-sub:first-of-type { margin-top: 0; }
.wd-tl-form-group {
    padding: 0.95rem 1rem 1rem;
    border-radius: 12px;
    background: rgba(26, 26, 31, 0.027);
}
.wd-tl-form-group .form-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ep-text-secondary);
    margin-bottom: 0.3rem;
}
.wd-tl-form-group .form-control,
.wd-tl-form-group .form-select {
    background-color: #fff;
    font-size: 0.85rem;
}
.wd-tl-form-group .form-text { font-size: 0.68rem; color: var(--ep-text-muted); }

/* Choix d'icône : on choisit ce qu'on voit */
.wd-tl-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}
.wd-tl-icon-opt {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0.5rem 0.25rem 0.4rem;
    border: 1px solid var(--wd-hairline);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: border-color 200ms var(--wd-ease), box-shadow 200ms var(--wd-ease);
}
.wd-tl-icon-opt:hover { border-color: var(--wd-or-pale); }
.wd-tl-icon-opt input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
/* Le thème Bootstrap rend déjà un libellé avec le radio : il ferait
   doublon avec le nôtre, posé sous l'icône */
.wd-tl-icon-opt .form-check {
    padding: 0;
    margin: 0;
    min-height: 0;
}
.wd-tl-icon-opt .form-check-label { display: none; }
.wd-tl-icon-opt:has(input:checked) {
    border-color: var(--wd-or);
    box-shadow: 0 0 0 2px rgba(184, 154, 94, 0.22);
}
.wd-tl-icon-opt > i { font-size: 1.05rem; color: var(--wd-onyx); }
.wd-tl-icon-opt span {
    font-size: 0.58rem;
    line-height: 1.15;
    color: var(--ep-text-muted);
}
.wd-tl-icon-opt:has(input:checked) span { color: var(--ep-text-primary); }

/* Interrupteur « moment fort » */
.wd-tl-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding-top: 0.75rem;
    margin: 0;
    border-top: 1px solid var(--wd-hairline);
    cursor: pointer;
}
.wd-tl-switch-text { display: flex; flex-direction: column; gap: 1px; }
.wd-tl-switch-text strong { font-size: 0.8rem; font-weight: 600; }
.wd-tl-switch-text small { font-size: 0.68rem; color: var(--ep-text-muted); line-height: 1.35; }
.wd-tl-switch .form-check-input {
    width: 2.1em;
    height: 1.15em;
    cursor: pointer;
}
.wd-tl-switch .form-check-input:checked {
    background-color: var(--wd-onyx);
    border-color: var(--wd-onyx);
}
/* Le libellé Symfony du champ fait doublon avec la rangée */
.wd-tl-switch .form-check-label { display: none; }

/* Attente de chargement : la forme du formulaire, pas un spinner */
.wd-tl-form-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.4rem 0;
}
.wd-tl-form-skeleton span {
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(100deg, #F1EDE6 30%, #F8F5EF 50%, #F1EDE6 70%);
    background-size: 300% 100%;
    animation: wd-tl-shimmer 1.5s ease-in-out infinite;
}
.wd-tl-form-skeleton span:nth-child(2) { width: 70%; }
.wd-tl-form-skeleton span:nth-child(4) { width: 45%; }
@keyframes wd-tl-shimmer {
    from { background-position: 130% 0; }
    to   { background-position: -30% 0; }
}

/* ── 8. Portail couple : même partition, sans les actions ───── */
.wd-portal .wd-tl-day { max-width: none; }
.wd-portal .wd-tl-step:hover { background: rgba(255, 255, 255, 0.8); }
.wd-portal .wd-tl-rail .dot { background: #fff; }

/* ── 9. Écrans étroits ──────────────────────────────────────── */
@media (max-width: 575.98px) {
    .wd-tl-step {
        grid-template-columns: 52px 18px 1fr;
        gap: 0.7rem;
        padding-right: 0.4rem;
    }
    .wd-tl-when .start { font-size: 0.98rem; }
    .wd-tl-moment { padding-left: calc(52px + 0.7rem + 9px); }
    .wd-tl-gap { padding-left: calc(52px + 0.7rem); }
    .wd-tl-foot { padding-left: calc(52px + 0.7rem); }
    .wd-tl-act { opacity: 1; transform: none; }
}
@media (hover: none) {
    .wd-tl-act { opacity: 1; transform: none; }
}
