/*
 * Bureau — pile d’overrides V3.32 à V3.64 extraite sans changement de cascade.
 * Première étape de canonicalisation desktop.
 */

/* V3.32 — ajustements bureau demandés. */
@media (min-width:1051px){
  .desktop-week-mode-indicator{justify-self:center!important;align-self:center!important;text-align:center!important}
.desktop-week-mode-indicator.pointage{background:#2f6fb2!important;color:#fff!important;animation:desktopModeBlink 1.25s ease-in-out infinite!important}
.desktop-pointage-presence-row>.desktop-pointage-actions{grid-row:1!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;min-width:0!important;padding:0!important}
  .desktop-pointage-presence-row.state-present>.desktop-pointage-actions,.desktop-pointage-presence-row.state-excused>.desktop-pointage-actions,.desktop-pointage-presence-row.state-paid>.desktop-pointage-actions{grid-column:3!important;height:0!important;overflow:visible!important}
}

/* V3.33 — version visible uniquement en mode bureau. */
.desktop-version-badge{display:none}
@media (min-width:1100px){
  .desktop-version-badge{
    display:block;
    position:fixed;
    top:4px;
    right:8px;
    z-index:9999;
    font-size:10px;
    line-height:1;
    font-weight:600;
    color:#8b8177;
    opacity:.9;
    pointer-events:none;
    user-select:none;
  }
}

/* V3.34 — bureau : géométrie participants, alertes icônes et popup. */
@media (min-width:1051px){
  .desktop-history-presence-row,
.desktop-history-presence-row>.desktop-presence-identity,
  .desktop-reservation-presence-row>.desktop-presence-identity,
.desktop-history-presence-row>.desktop-presence-alert-col,
.desktop-presence-control-col>.desktop-pointage-actions{overflow:visible!important;
  }
  .desktop-pointage-actions .desktop-pointage-action{white-space:nowrap!important;}
  .desktop-pointage-actions .desktop-pointage-reset{position:static!important;transform:none!important;margin:0!important}
  .desktop-history-presence-row>.desktop-presence-status-col,
  .desktop-reservation-presence-row>.desktop-presence-status-col,
.desktop-history-presence-row>.desktop-presence-payment-col,
  .desktop-reservation-presence-row>.desktop-presence-payment-col,
  .desktop-pointage-presence-row>.desktop-presence-payment-col{justify-self:center!important;
  }
  .desktop-history-presence-row>.desktop-finance-cells,
.desktop-alert-icon{
    width:22px;height:20px;padding:0;border:0;clip-path:polygon(50% 0,100% 100%,0 100%);
    display:inline-flex;align-items:flex-end;justify-content:center;cursor:pointer;flex:0 0 22px;
  }
  .desktop-alert-icon span{color:#fff;font-size:13px;font-weight:950;line-height:1;padding-bottom:2px}
.desktop-alert-icon.warning{background:#dc8b16}
}
.desktop-alert-popup-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.25);display:none;align-items:center;justify-content:center;z-index:10000;padding:20px;
}
.desktop-alert-popup-overlay.show{display:flex}
.desktop-alert-popup{position:relative;max-width:520px;width:min(520px,92vw);background:#fffdfa;border:1px solid #ded4ca;border-radius:14px;box-shadow:0 18px 50px rgba(0,0,0,.22);padding:24px 52px 24px 24px}
.desktop-alert-popup-message{font-size:15px;line-height:1.45;color:#2d2824;font-weight:650}
.desktop-alert-popup-close{position:absolute;right:12px;top:10px;border:0;background:transparent;font-size:26px;line-height:1;cursor:pointer;color:#6f675f}

/* V3.35 — bureau : verrouillage des colonnes participant sans déplacer le retour réservé. */
@media (min-width:1051px){
  .desktop-pointage-presence-row,
  .desktop-history-presence-row,
.desktop-history-presence-row>.desktop-presence-alert-col,
.desktop-presence-payment-col{justify-self:center!important;}
.desktop-pointage-reset{
    margin:0!important;
  }
.desktop-presence-control-col>.desktop-pointage-actions>.desktop-pointage-action{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    white-space:nowrap!important;
  }
.desktop-course-aligned-stats .waiting>strong{color:#c47b18!important}
}

/* V3.36 — bureau : géométrie participant stabilisée et actions pastel. */
@media (min-width:1100px){
  .desktop-pointage-presence-row,
  .desktop-history-presence-row,
.desktop-history-presence-row>.desktop-presence-alert-col,
.desktop-presence-status-col>.desktop-presence-status,
  .desktop-presence-payment-col>*{
    margin:0!important;
  }
  .desktop-finance-cells{
    align-items:center!important;
  }
  .desktop-finance-cells>.desktop-money-cell{
    inset:auto!important;
    text-align:right!important;
  }
.desktop-presence-control-col>.desktop-pointage-actions{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
  }
  .desktop-pointage-action.present,
  .desktop-pointage-action.excused,
  .desktop-pointage-action.paid{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    white-space:nowrap!important;
  }
/* Réservations : nombre réellement bleu marine, distinct du bleu de l'icône. */
.desktop-calendar-action.cancel{
    background:var(--red-soft)!important;
    color:var(--red-text)!important;
    border-color:#ddb2b2!important;
  }
}

/* V3.37 — grille participant bureau : chaque colonne est un enfant direct, aucun wrapper financier. */
@media (min-width:1051px){
  .desktop-pointage-presence-row,
.desktop-presence-payment-col{display:flex!important;justify-content:center!important;}
}

/* V3.38 — alignement définitif participant / entête financier bureau.
   La ligne participant reprend EXACTEMENT la grille 13 colonnes utilisée par l'entête financier.
   Les colonnes 1 à 7 constituent la zone pré-financière ; CA commence donc toujours en colonne 8. */
@media (min-width:1051px){
  .desktop-pointage-presence-row,
.desktop-pointage-presence-row>.desktop-presence-identity,
  .desktop-history-presence-row>.desktop-presence-identity,
.desktop-presence-prefix{grid-row:1!important;
    grid-template-columns:minmax(0,1fr) 92px 112px!important;
  }
  .desktop-presence-prefix>.desktop-presence-control-col,
.desktop-presence-prefix>.desktop-presence-payment-col{justify-content:center!important;}
.desktop-pointage-actions{display:flex!important;gap:7px!important;}
.desktop-money-cell{inset:auto!important;min-width:0!important;text-align:right!important;}
  .desktop-pointage-reset{position:absolute!important;left:14px!important;top:50%!important;transform:translateY(-50%)!important;z-index:3!important;}
}

/* V3.39 — essais compacts bureau : paiements 11px, actions par icône, suppression dans la gouttière gauche. */
@media (min-width:1051px){
  .desktop-presence-payment-col .payment-badge{
    font-size:11px!important;line-height:1.1!important;
    text-transform:none!important;letter-spacing:0!important;white-space:nowrap!important;
  }
  .desktop-presence-payment-col button.payment-badge.payment-toggle{outline:0!important;box-shadow:none!important;
  }
.desktop-pointage-actions .desktop-pointage-action{
    flex:0 0 44px!important;min-width:44px!important;
  }
.desktop-pointage-actions .desktop-pointage-action .ico svg{fill:none!important;stroke:currentColor!important;stroke-width:2.6!important;stroke-linecap:round!important;stroke-linejoin:round!important;
  }
.desktop-pointage-action.paid{border-color:#ddb2b2!important;}
}

/* V3.40 — suppression réservée à la gouttière gauche et aucun reliquat de libellé sur les actions Pointage. */
@media (min-width:1051px){
}

/* V3.41 — action de suppression effectivement rendue dans la gouttière gauche, Réservation + Pointage. */
@media (min-width:1051px){
.desktop-pointage-delete-left{
    position:absolute!important;left:14px!important;top:50%!important;transform:translateY(-50%)!important;
    z-index:10!important;display:inline-flex!important;visibility:visible!important;opacity:1!important;min-width:18px!important;padding:0!important;
    border:0!important;border-radius:50%!important;background:#c84242!important;color:#fff!important;
    align-items:center!important;justify-content:center!important;cursor:pointer!important;
  }
  .desktop-pointage-delete-left svg{width:11px!important;height:11px!important;fill:none!important;stroke:#fff!important;stroke-width:2.8!important;stroke-linecap:round!important;}
}

/* V3.44 — bureau : mnémoniques de mode stabilisés. */
@media (min-width:1051px){
  .desktop-course-header-v325{
    grid-template-columns:24px minmax(300px,1fr) 122px auto 284px 118px!important;
    grid-template-areas:"chev primary mode adds stats action"!important;
  }
  .desktop-course-mode-badge{grid-area:mode!important;justify-self:center!important;align-self:center!important;margin:0!important}
.desktop-course-mode-badge.pointage{background:#2f6fb2!important;color:#fff!important;}
  .desktop-presence-status,.desktop-presence-status-col,.desktop-presence-status.status-reserved{animation:none!important}
}

/* V3.45 — bureau : position fixe des mnémoniques et largeur des actions prestations. */
@media (min-width:1051px){
  /* La colonne Mode a la même abscisse pour tous les{
  }
  .desktop-course-header-v325>.desktop-course-mode-badge{
    align-self:center!important;
    filter:none!important;
  }
.desktop-course-header-v325>.desktop-course-mode-badge.pointage{
    background:#2f6fb2!important;
    color:#fff!important;
  }

  /* Prestations hors cours : même colonne Mode, mais toute la place restante
     est réservée aux boutons métier pour éviter leur écrasement. */
  .desktop-course-header-v325.desktop-calendar-header.no-adds{
    grid-template-columns:24px clamp(360px,31vw,520px) 122px minmax(430px,1fr)!important;
    grid-template-areas:"chev primary mode action"!important;
  }
  .desktop-calendar-header>.desktop-calendar-actions{
    justify-content:flex-end!important;
    gap:10px!important;
  }
  .desktop-calendar-header>.desktop-calendar-actions button{
    flex:0 0 auto!important;
    white-space:nowrap!important;
  }
}

/* V3.46 — bureau : seul le voyant de mode Pointage clignote. */
@media (min-width:1051px){
  .desktop-presence-status,
  .desktop-presence-status-col,
  .desktop-presence-prefix,
  .desktop-presence-status.status-reserved,
  .status-reserved{opacity:1!important}
.desktop-course-mode-badge.pointage{animation:desktopModeBlink 1.25s ease-in-out infinite!important}
}

/* V3.47 — bureau : géométrie d’entête et prestations stabilisées. */
@media (min-width:1051px){
  /* Même abscisse des compteurs en Historique, Pointage et Réservation. */
  .desktop-course-header-v325,
.desktop-course-header-v325>.desktop-course-mode-badge{margin:0!important}
/* Prestations : même colonne de mnémonique que les cours ; actions sur toute la zone droite. */
  .desktop-course-header-v325.desktop-calendar-header.no-adds{
    grid-template-columns:24px minmax(0,1fr) 122px 260px 284px 118px!important;
    grid-template-areas:"chev primary mode action action action"!important;
  }
  .desktop-calendar-header>.desktop-calendar-actions{
    grid-area:action!important;
    min-width:0!important;
    width:100%!important;
    justify-self:stretch!important;
  }

  /* Une prestation annulée reprend exactement le fond gris d'un cours annulé. */
  .desktop-course-node.desktop-course-cancelled>.desktop-course-header-v325,
  .desktop-course-node.desktop-course-cancelled.open>.desktop-course-header-v325{background:#e7e7e7!important}

  /* Espace vertical entre deux cartouches réduit de moitié. */
  .desktop-course-node{margin-bottom:7px!important}

  /* Dates : -3 px dans les cartouches et dans la ligne de totalisation hebdomadaire. */
.desktop-week-course-label>strong{font-size:10px!important}
}

/* V3.48 — corrections bureau ciblées. */
@keyframes desktopPointageBlinkV348{50%{}}
@media (min-width:1051px){
  .desktop-course-primary .desktop-course-date{font-size:15px!important}
  .desktop-week-course-label>strong{font-size:13px!important}
  .desktop-history-finance-total strong{font-size:15px!important}
  .desktop-course-mode-badge.pointage{opacity:1}
}

/* V3.50 — clignotement Pointage bureau. */
@keyframes desktopPointageBlinkV350{50%{}}
@media (min-width:1051px){
  .desktop-course-mode-badge.pointage{animation:desktopPointageBlinkV350 1.15s ease-in-out infinite!important}
}

/* V3.53 — corrections exclusivement mobiles : action avant compteurs + centrage BENEFICE. */


@media (min-width:1051px){
  .course-heading-row.calendar-heading.mobile-action-before-counters #courseStateActions{position:static!important;transform:none!important}
}

/* V3.57 — suppression réservation mobile : bouton rond rouge avec X blanc. */


@media (min-width:1051px){.mobile-reservation-delete{display:none!important}}

/* V3.61 — alignement bureau des alertes et suppressions. */
@media (min-width:1051px){
  .desktop-name-with-alert{gap:8px!important;}
  .desktop-name-with-alert .desktop-presence-alert-col,
  .desktop-name-with-alert .desktop-presence-alert{flex:0 0 auto!important;}
.desktop-pointage-actions .desktop-pointage-delete-left,
  .desktop-reservation-delete-actions .desktop-pointage-delete-left{
    position:static!important;
    min-width:36px!important;
    min-height:36px!important;
    justify-self:center!important;
    align-self:center!important;
    margin:auto!important;
  }
  .desktop-pointage-actions .desktop-pointage-delete-left svg,
  .desktop-reservation-delete-actions .desktop-pointage-delete-left svg{height:22px!important}
  .desktop-reservation-delete-actions{display:grid!important;grid-template-columns:repeat(3,1fr)!important;align-items:center!important;width:100%!important}
}

/* V3.62 — centrage vertical réel des actions bureau dans la hauteur de ligne. */
@media (min-width:1051px){
  .desktop-pointage-presence-row .desktop-presence-control-col,
.desktop-pointage-presence-row .desktop-pointage-actions,
  .desktop-reservation-presence-row .desktop-pointage-actions{
    width:100%!important;
    height:100%!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    align-items:center!important;
    justify-items:center!important;
  }
  .desktop-pointage-presence-row .desktop-pointage-delete-left,
  .desktop-reservation-presence-row .desktop-pointage-delete-left{
    align-self:center!important;
    justify-self:center!important;
    margin:0!important;
    transform:none!important;
  }
}

/* V3.63 — le badge Pointage des entêtes de cours bureau doit toujours clignoter. */
@keyframes desktopPointageBlinkV363{
  0%,100%{}
  50%{opacity:.25}
}
@media (min-width:1051px){
  .desktop-course-row .desktop-course-mode-badge.pointage,
  .desktop-course-header .desktop-course-mode-badge.pointage,
  .desktop-course-mode-badge.pointage{
    animation-name:desktopPointageBlinkV363!important;
    animation-duration:1.15s!important;
    animation-timing-function:ease-in-out!important;
    animation-iteration-count:infinite!important;
  }
  .desktop-course-mode-badge.booking{animation:none!important;opacity:1!important}
}

/* V3.64 — cause racine : ne pas verrouiller l’opacité du badge Pointage. */
@media (min-width:1051px){
  .desktop-course-header-v325>.desktop-course-mode-badge.booking{opacity:1!important;}
  .desktop-course-header-v325>.desktop-course-mode-badge.pointage{animation:desktopPointageBlinkV363 1.15s ease-in-out infinite!important}
}

/* Desktop participant identity — payment badge stays on card summary line. */
@media (min-width:1051px){
  .desktop-presence-meta{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    flex-wrap:wrap;
  }
  .desktop-presence-meta .desktop-presence-card{min-width:0}
  .desktop-presence-meta .payment-badge{
    display:inline-flex;
    align-items:center;
    flex:0 0 auto;
    margin:0;
    font-size:11px;
    line-height:1.1;
    padding:4px 8px;
    text-transform:none;
    letter-spacing:0;
    white-space:nowrap;
  }
  .desktop-presence-meta button.payment-badge.payment-toggle{
    border:0;
    outline:0;
    box-shadow:none;
  }
}

/* Desktop participant identity — restored readable text scale. */
@media (min-width:1051px){
  .desktop-presence-name{
    font-size:15px!important;
    line-height:1.2!important;
  }
  .desktop-presence-card{
    font-size:13px!important;
    line-height:1.25!important;
  }
}

/* Desktop finance grid — canonical 13-column alignment. */
@media (min-width:1051px){
  .desktop-pointage-presence-row,
  .desktop-history-presence-row,
  .desktop-reservation-presence-row{
    grid-template-columns:minmax(330px,2.5fr) minmax(210px,.9fr) repeat(5,29px) repeat(6,minmax(68px,.525fr))!important;
    gap:7px!important;
    padding-left:38px!important;
    padding-right:14px!important;
  }
  .desktop-pointage-presence-row>.desktop-presence-identity,
  .desktop-history-presence-row>.desktop-presence-identity,
  .desktop-reservation-presence-row>.desktop-presence-identity{
    grid-column:1!important;
    grid-row:1!important;
  }
  .desktop-pointage-presence-row>.desktop-presence-prefix,
  .desktop-history-presence-row>.desktop-presence-prefix,
  .desktop-reservation-presence-row>.desktop-presence-prefix{
    grid-column:2 / 8!important;
    grid-row:1!important;
    min-width:0!important;
  }
  .desktop-pointage-presence-row>.desktop-money-cell:nth-last-child(6),
  .desktop-history-presence-row>.desktop-money-cell:nth-last-child(6),
  .desktop-reservation-presence-row>.desktop-money-cell:nth-last-child(6){grid-column:8!important}
  .desktop-pointage-presence-row>.desktop-money-cell:nth-last-child(5),
  .desktop-history-presence-row>.desktop-money-cell:nth-last-child(5),
  .desktop-reservation-presence-row>.desktop-money-cell:nth-last-child(5){grid-column:9!important}
  .desktop-pointage-presence-row>.desktop-money-cell:nth-last-child(4),
  .desktop-history-presence-row>.desktop-money-cell:nth-last-child(4),
  .desktop-reservation-presence-row>.desktop-money-cell:nth-last-child(4){grid-column:10!important}
  .desktop-pointage-presence-row>.desktop-money-cell:nth-last-child(3),
  .desktop-history-presence-row>.desktop-money-cell:nth-last-child(3),
  .desktop-reservation-presence-row>.desktop-money-cell:nth-last-child(3){grid-column:11!important}
  .desktop-pointage-presence-row>.desktop-money-cell:nth-last-child(2),
  .desktop-history-presence-row>.desktop-money-cell:nth-last-child(2),
  .desktop-reservation-presence-row>.desktop-money-cell:nth-last-child(2){grid-column:12!important}
  .desktop-pointage-presence-row>.desktop-money-cell:nth-last-child(1),
  .desktop-history-presence-row>.desktop-money-cell:nth-last-child(1),
  .desktop-reservation-presence-row>.desktop-money-cell:nth-last-child(1){grid-column:13!important}
}

/* Desktop course header — fixed counter X positions across all course modes. */
@media (min-width:1051px){
  .desktop-course-header-v325:not(.desktop-calendar-header){
    grid-template-columns:24px minmax(300px,1fr) 122px 260px 284px 118px!important;
    grid-template-areas:none!important;
    column-gap:6px!important;
  }
  .desktop-course-header-v325:not(.desktop-calendar-header)>.desktop-tree-chevron{grid-column:1!important;grid-row:1!important}
  .desktop-course-header-v325:not(.desktop-calendar-header)>.desktop-course-primary{grid-column:2!important;grid-row:1!important}
  .desktop-course-header-v325:not(.desktop-calendar-header)>.desktop-course-mode-badge{grid-column:3!important;grid-row:1!important}
  .desktop-course-header-v325:not(.desktop-calendar-header)>.desktop-pointage-adds{grid-column:4!important;grid-row:1!important;width:260px!important}
  .desktop-course-header-v325:not(.desktop-calendar-header)>.desktop-course-aligned-stats{
    grid-column:5!important;
    grid-row:1!important;
    width:284px!important;
    justify-self:stretch!important;
    margin:0!important;
  }
  .desktop-course-header-v325:not(.desktop-calendar-header)>.desktop-course-action{
    grid-column:6!important;
    grid-row:1!important;
    justify-self:stretch!important;
    width:118px!important;
    margin:0!important;
  }
}
