.field-heading{display:grid;grid-template-columns:minmax(0,1fr) 272px auto;align-items:center;gap:18px;margin-bottom:24px}
.field-title{min-width:0}
.field-title h1{font-size:clamp(1.8rem,4vw,3rem);line-height:1.08;letter-spacing:-.035em;overflow-wrap:anywhere;margin:8px 0}
.field-title p{margin:8px 0 0}
.field-clock{min-width:0;text-align:center}
.field-clock .timer{font-size:2.75rem;line-height:1.1;letter-spacing:-.045em;margin:0 0 8px}
.field-clock .progress{height:5px}
.field-timer-actions{display:flex;gap:8px;justify-content:center;margin-top:10px}
.field-timer-actions .button{font-size:.9rem;padding:9px 13px}
.field-workspace{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(245px,1fr);grid-template-areas:'objectives instructions' 'diagrams instructions';gap:16px;align-items:start}
.field-objectives{grid-area:objectives}
.field-diagrams{grid-area:diagrams}
.field-team-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.field-team-list{min-width:0;border:1px solid;border-radius:14px;padding:14px}
.field-team-list h3{margin:0 0 12px}
.field-team-list ul{list-style:none;padding:0;margin:0}
.field-team-list li{padding:10px 0;border-top:1px solid currentColor;overflow-wrap:anywhere}
.field-team-list li span{display:block;font-size:.875rem;margin-top:3px}
@media(max-width:480px){.field-team-columns{grid-template-columns:1fr}}
.field-instructions{grid-area:instructions;align-self:stretch}
.field-workspace h2{font-size:1.12rem}
.field-workspace h3{font-size:1rem;margin:20px 0 8px}
.field-workspace h4{font-size:.92rem;margin:18px 0 6px}
.field-workspace p{margin:10px 0;overflow-wrap:anywhere}
.field-guide-instructions+.field-guide-instructions{margin-top:20px;padding-top:4px;border-top:1px solid var(--line)}
.field-dose{background:var(--bg);padding:10px;border-radius:10px;font-size:.92rem}
.field-extra{margin:16px 0;font-size:.92rem}
.field-extra summary{cursor:pointer;font-weight:700;min-height:30px}
.field-diagram{margin:16px 0 0}
.field-diagram figcaption{font-weight:700;margin:0 0 10px}
.field-diagram img{display:block;width:100%;height:clamp(180px,26dvh,250px);object-fit:contain;background:white;border:1px solid var(--line);border-radius:12px}
.field-diagram-tools{display:flex;justify-content:flex-end;margin-top:10px}
.field-schema-empty{min-height:280px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:20px;background:var(--bg);border-radius:12px;margin-top:16px}
.field-schema-empty>p:first-child{font-weight:700}
.field-footer{display:flex;justify-content:flex-end;align-items:center;gap:20px;margin:18px 0 8px;padding:10px 0;position:sticky;bottom:calc(82px + env(safe-area-inset-bottom));z-index:8;background:var(--bg);border-top:1px solid var(--line)}
.field-footer .button{min-width:180px}
.field-footer .help{text-align:right}
.field-participants{margin-top:18px}
.field-participants ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px;list-style:none;padding:0;margin:0}
.field-participants li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--line);min-width:0}
.field-participants li>div{min-width:0;overflow-wrap:anywhere}
.field-participants li .meta{display:block;margin-top:4px}
@media(max-width:540px){.field-participants ul{grid-template-columns:1fr}}
.field-feedback-form{padding:0;max-height:none}
dialog form.field-feedback-form{padding:0;overflow:visible;max-height:none}
.field-feedback-form textarea{min-height:130px}
.field-feedback-form .toolbar{margin-bottom:0}
.phase-feedback{font-size:.875rem;margin-top:9px;max-width:100%}
.sequence>.phase-feedback{grid-column:2/-1}
.phase-feedback summary{cursor:pointer;font-weight:700}
.phase-feedback p{white-space:pre-wrap;overflow-wrap:anywhere}
dialog.field-image-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;inset:0;margin:0;border-radius:0}
:root dialog.field-image-dialog #dialogContent{height:100dvh;max-height:100dvh;display:flex;flex-direction:column;padding:20px}
.field-image-dialog h2{font-size:1.1rem;margin:0 0 16px;padding-right:50px}
.field-image-dialog .fullscreen-diagram{min-height:0;flex:1;width:100%;height:100%;object-fit:contain;background:#fff;border-radius:10px}
@media(max-width:700px){.field-heading{grid-template-columns:minmax(0,1fr) auto;gap:16px}.field-title{grid-column:1;grid-row:1}.field-exit{grid-column:2;grid-row:1;align-self:start}.field-clock{grid-column:1/-1;width:100%;max-width:360px;justify-self:center}.field-workspace{grid-template-columns:minmax(0,1fr);grid-template-areas:'objectives' 'diagrams' 'instructions'}.field-schema-empty{min-height:180px}.field-footer{flex-direction:column;align-items:stretch;gap:4px}.field-footer .help{text-align:center}.field-footer .button{width:100%}.field-feedback-form .toolbar .button{width:100%}}


/* COACHSL-MEDIA-FILE-UI-1 */

.guide-media-video{
  display:block;
  width:100%;
  max-height:320px;
  margin:12px 0;
  object-fit:contain;
  border-radius:12px;
  background:#000;
}

.field-video-support{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--line);
}

.field-video{
  margin:12px 0 0;
}

.field-video figcaption{
  margin:0 0 10px;
  font-weight:700;
}

.field-video video{
  display:block;
  width:100%;
  max-height:clamp(220px,40dvh,430px);
  object-fit:contain;
  background:#000;
  border-radius:12px;
}



/* COACHSL-FIELD-LIVE-MULTI-1 */

.field-live-board{
  margin-bottom:28px;
}

.field-live-board-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.field-live-board-head h1{
  margin:6px 0 8px;
}

.field-live-board-head p{
  margin:0;
}

.field-live-sync{
  flex:none;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  font-size:.85rem;
  font-weight:700;
}

.field-live-grid{
  display:grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(250px,1fr)
    );
  gap:14px;
}

.field-live-card{
  min-width:0;
  padding:16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
}

.field-live-card.is-selected{
  outline:2px solid currentColor;
  outline-offset:2px;
}

.field-live-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.field-live-card h2{
  margin:5px 0 0;
  font-size:1.08rem;
  overflow-wrap:anywhere;
}

.field-live-status{
  flex:none;
  padding:6px 9px;
  border:1px solid currentColor;
  border-radius:999px;
  font-size:.75rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.field-live-owner{
  margin:8px 0 0;
  font-size:.86rem;
}

.field-live-clock{
  margin-top:14px;
}

.field-live-clock strong{
  display:block;
  margin-bottom:7px;
  font-variant-numeric:tabular-nums;
  font-size:1.05rem;
}

.field-live-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

.field-live-actions .button{
  min-width:0;
}

.field-live-selected{
  margin:24px 0 12px;
  padding:12px 14px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.field-live-selected p{
  margin:5px 0 0;
}

.field-live-detail-status{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  margin-bottom:8px;
  font-size:.82rem;
}

.field-live-detail-status strong{
  text-transform:uppercase;
  letter-spacing:.04em;
}

.field-live-detail-status span{
  font-size:.78rem;
}

@media(max-width:700px){
  .field-live-board-head{
    flex-direction:column;
  }

  .field-live-grid{
    grid-template-columns:1fr;
  }

  .field-live-sync{
    align-self:flex-start;
  }
}


/* COACHSL-PHYSICAL-TERRAIN-V1 */

.physical-terrain-list{
  display:grid;
  gap:14px;
}

.physical-exercise-card{
  padding:16px;
  overflow:hidden;
}

.physical-exercise-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}

.physical-exercise-head h2{
  min-width:0;
  margin:0;
  font-size:1.12rem;
  line-height:1.2;
  overflow-wrap:anywhere;
}

.physical-dose-badge{
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:6px 11px;
  border:2px solid currentColor;
  border-radius:999px;
  color:var(--accent,#b5121b);
  background:var(--bg);
  font-size:.82rem;
  font-weight:900;
  white-space:nowrap;
  letter-spacing:.02em;
}

.physical-frame-grid{
  display:grid;
  grid-template-columns:
    repeat(3,minmax(0,1fr));
  gap:8px;
  width:100%;
}

.physical-frame-grid figure{
  min-width:0;
  margin:0;
}

.physical-frame-grid img{
  display:block;
  width:100%;
  height:clamp(115px,18dvh,180px);
  object-fit:contain;
  object-position:center;
  border:1px solid var(--line);
  border-radius:10px;
  background:white;
}

.physical-exercise-tools{
  display:flex;
  justify-content:flex-end;
  margin-top:10px;
}

.physical-fullscreen-open{
  overflow:hidden;
}

.physical-fullscreen-overlay{
  position:fixed;
  inset:0;
  z-index:10000;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:
    max(14px,env(safe-area-inset-top))
    max(14px,env(safe-area-inset-right))
    max(14px,env(safe-area-inset-bottom))
    max(14px,env(safe-area-inset-left));
  background:
    rgba(12,16,22,.97);
}

.physical-fullscreen-head{
  flex:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  color:white;
}

.physical-fullscreen-title{
  min-width:0;
  font-size:1.2rem;
  overflow-wrap:anywhere;
}

.physical-fullscreen-frames{
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns:
    repeat(3,minmax(0,1fr));
  align-items:center;
  gap:12px;
}

.physical-fullscreen-frames figure{
  min-width:0;
  margin:0;
}

.physical-fullscreen-frames img{
  display:block;
  width:100%;
  height:min(65dvh,600px);
  object-fit:contain;
  object-position:center;
  border-radius:12px;
  background:white;
}

@media(max-width:700px){

  .physical-exercise-card{
    padding:12px;
  }

  .physical-exercise-head{
    gap:8px;
    margin-bottom:9px;
  }

  .physical-exercise-head h2{
    font-size:1rem;
  }

  .physical-dose-badge{
    min-height:30px;
    padding:5px 8px;
    font-size:.72rem;
  }

  .physical-frame-grid{
    gap:4px;
  }

  .physical-frame-grid img{
    height:clamp(90px,15dvh,125px);
    border-radius:7px;
  }

  .physical-fullscreen-overlay{
    gap:8px;
    padding:10px;
  }

  .physical-fullscreen-head{
    gap:8px;
  }

  .physical-fullscreen-title{
    font-size:1rem;
  }

  .physical-fullscreen-frames{
    gap:5px;
  }

  .physical-fullscreen-frames img{
    height:50dvh;
    border-radius:8px;
  }
}


/* COACHSL-TERRAIN-TIMING-1 */

.field-live-timing{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  min-height:28px;
  margin:9px 0 2px;
  padding:4px 10px;
  border:1px solid currentColor;
  border-radius:999px;
  font-size:.78rem;
  font-weight:900;
  line-height:1.1;
  white-space:nowrap;
}

.field-live-timing.timing-late{
  color:var(--danger,#b42318);
  background:rgba(180,35,24,.08);
}

.field-live-timing.timing-ahead{
  color:var(--success,#067647);
  background:rgba(6,118,71,.08);
}

.field-live-timing.timing-ontime{
  color:var(--muted,#667085);
  background:transparent;
}

.field-live-selected
.field-live-timing{
  margin-top:8px;
}

@media(max-width:700px){
  .field-live-timing{
    min-height:26px;
    padding:4px 8px;
    font-size:.72rem;
  }
}


/* COACHSL-TERRAIN-FOCUS-1 */

.field-focus-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 18px;
}

.field-focus-nav
.field-live-timing{
  margin:0;
}

.field-focus-back{
  flex:0 0 auto;
}


/*
 * Séquence suivante :
 * une seule ligne sous la barre de progression.
 */
.field-next-summary{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;

  width:100%;
  min-width:0;

  margin-top:10px;
  padding:7px 10px;

  border:1px solid var(--line);
  border-radius:999px;

  background:var(--surface);

  font-size:.72rem;
  line-height:1.1;

  white-space:nowrap;
  overflow:hidden;
}

.field-next-summary strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.field-next-label{
  flex:0 0 auto;

  font-size:.62rem;
  font-weight:900;

  text-transform:uppercase;
  letter-spacing:.04em;
}

.field-next-meta{
  flex:0 0 auto;
}


@media(max-width:700px){

  .field-focus-nav{
    margin-bottom:14px;
  }

  .field-focus-back{
    font-size:.82rem;
    padding:8px 10px;
  }

  .field-next-summary{
    justify-content:flex-start;
    font-size:.67rem;
    padding:7px 8px;
  }

  .field-next-label{
    font-size:.58rem;
  }
}


/* COACHSL-WORKSHOP-MEASURES-V1 */

.workshop-measures-config{
  margin:16px 0;
  padding:16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
}

.workshop-measures-config[hidden]{
  display:none !important;
}

.workshop-measures-config h3{
  margin-top:0;
}

.workshop-measures-main-check{
  margin-top:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
}

.workshop-measures-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
}

.workshop-measures-check input{
  width:auto;
  flex:0 0 auto;
  margin-top:3px;
}

.workshop-measures-check span{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.workshop-measures-check small{
  font-weight:400;
}

.workshop-measures-config-criteria{
  margin:16px 0 0;
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
}

.workshop-measures-config-criteria legend{
  padding:0 6px;
  font-weight:800;
}

.workshop-measures-config-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}


.workshop-measures-panel{
  margin:0 0 16px;
}

.workshop-measures-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.workshop-measures-header h2{
  margin:3px 0 0;
}

.workshop-measures-sync{
  flex:0 0 auto;
}

.workshop-measures-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:16px 0 12px;
}

.workshop-measures-stats>div{
  min-width:0;
  padding:10px 8px;
  border:1px solid var(--line);
  border-radius:12px;
  text-align:center;
  background:var(--bg);
}

.workshop-measures-stats strong{
  display:block;
  font-size:1.35rem;
  line-height:1.1;
}

.workshop-measures-stats span{
  display:block;
  margin-top:3px;
  font-size:.72rem;
}

.workshop-measure-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.workshop-measure-result{
  min-height:54px;
  font-size:1rem;
  font-weight:900;
}

.workshop-measure-criteria-block{
  margin-top:18px;
}

.workshop-measure-criteria-block h3{
  margin:0 0 10px;
  font-size:.9rem;
}

.workshop-measure-criteria{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.workshop-measure-criterion{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:42px;
}

.workshop-measure-criterion strong{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  min-height:24px;
  padding:2px 6px;
  border-radius:999px;
  background:var(--bg);
}

.workshop-measures-footer{
  display:flex;
  justify-content:flex-end;
  margin-top:16px;
}


@media(max-width:700px){

  .workshop-measures-config-grid{
    grid-template-columns:1fr;
  }

  .workshop-measures-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .workshop-measure-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .workshop-measure-result{
    min-height:58px;
    padding-left:8px;
    padding-right:8px;
  }

  .workshop-measure-criteria{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .workshop-measure-criterion{
    width:100%;
    justify-content:space-between;
  }

  .workshop-measures-footer{
    justify-content:stretch;
  }

  .workshop-measures-footer .button{
    width:100%;
  }
}


/* COACHSL-WORKSHOP-SUMMARY-V1 */

.field-workshop-summary{
  margin:12px 0;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--bg);
}

.field-workshop-summary p{
  margin:0;
}

.field-workshop-summary-result{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px;
}

.field-workshop-summary-result strong{
  font-size:.95rem;
}

.field-workshop-summary-result span{
  font-size:.82rem;
}

.field-workshop-summary-corrections{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:5px !important;
  font-size:.82rem;
}

.field-workshop-summary-corrections span{
  font-weight:700;
}

.field-workshop-summary-corrections strong{
  font-weight:700;
}


@media(max-width:700px){

  .field-workshop-summary{
    padding:9px 10px;
  }

  .field-workshop-summary-result,
  .field-workshop-summary-corrections{
    line-height:1.35;
  }
}


/* COACHSL-SESSION-BILAN-INLINE-V1 */

.phase-feedback{
  font-size:.875rem;
  margin-top:12px;
  max-width:100%;
}

.sequence>.phase-feedback{
  grid-column:2/-1;
}

.phase-feedback-head{
  display:flex;
  align-items:baseline;
  gap:6px;
  flex-wrap:wrap;
  line-height:1.4;
}

.session-workshop-measure-result{
  display:inline-flex;
  align-items:baseline;
  gap:4px;
  flex-wrap:wrap;
  font-weight:700;
}

.session-workshop-measure-rate{
  font-weight:900;
}

.phase-feedback-note{
  margin-top:6px;
  line-height:1.4;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}


/*
 * > 90       : vert
 * 61 a 90    : jaune
 * 31 a 60    : orange
 * 0 a 30     : rouge
 */

.workshop-rate-green{
  color:#166534;
}

.workshop-rate-yellow{
  color:#a16207;
}

.workshop-rate-orange{
  color:#c2410c;
}

.workshop-rate-red{
  color:#b91c1c;
}


@media(max-width:700px){

  .phase-feedback-head{
    gap:5px;
  }

  .session-workshop-measure-result{
    gap:3px;
  }
}


/* COACHSL-SESSION-BILAN-DETAILS-V2 */

/*
 * Le Bilan repart sur toute la largeur de la grille
 * et commence donc au meme niveau que les horaires.
 */
.sequence>.phase-feedback{
  grid-column:1/-1;
  width:100%;
  min-width:0;
  margin-top:10px;
}


/*
 * On conserve un vrai <details>/<summary>,
 * donc le Bilan reste developpable/repliable.
 */
.phase-feedback summary{
  display:flex;
  align-items:baseline;
  gap:.35rem;
  width:100%;
  min-width:0;
  margin:0;
  padding:0;
  cursor:pointer;
  list-style:none;
  font-weight:700;
  line-height:1.4;
}

.phase-feedback summary::-webkit-details-marker{
  display:none;
}


/*
 * Triangle de developpement.
 */
.phase-feedback summary::before{
  content:"▶";
  flex:0 0 1em;
  width:1em;
  font-size:.82em;
  line-height:1;
  transform-origin:center;
}

.phase-feedback[open] summary::before{
  transform:rotate(90deg);
}


/*
 * Bilan + resultat sur la premiere ligne.
 */
.phase-feedback-head{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:4px;
  min-width:0;
}


/*
 * Deuxieme ligne.
 *
 * Le retrait correspond exactement a la largeur
 * du triangle + l'espace qui le separe de Bilan.
 * La note commence donc sous le mot Bilan.
 */
.phase-feedback-note{
  display:block;
  min-width:0;
  margin-top:5px;
  padding-left:calc(1em + .35rem);
  line-height:1.45;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
}


/*
 * Le commentaire suit directement :
 * "1/5 etoiles - commentaire"
 * puis revient tout seul a la ligne.
 */
.phase-feedback-comment{
  display:inline;
  font-style:italic;
  font-weight:400;
  white-space:normal;
  overflow-wrap:anywhere;
}


/*
 * Pas d'espace vertical parasite quand le Bilan
 * est replie.
 */
.phase-feedback:not([open]){
  margin-bottom:0;
}


/*
 * On garde le resultat Atelier compact.
 */
.session-workshop-measure-result{
  display:inline-flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:4px;
  min-width:0;
}


@media(max-width:700px){

  .sequence>.phase-feedback{
    grid-column:1/-1;
  }

  .phase-feedback summary{
    gap:.3rem;
  }

  .phase-feedback-note{
    padding-left:calc(1em + .3rem);
  }

  .phase-feedback-head,
  .phase-feedback-note{
    font-size:.9rem;
  }
}
