@import url('https://fonts.googleapis.com/css2?family=Teachers:wght@400;500;600;700;800&display=swap');


* { box-sizing: border-box; }
body {
  overflow: hidden; /* disables scroll on entire page */
  height: 100vh;     /* prevents iOS/body bouncing */
  font: 16px/1.4 system-ui, sans-serif;
  margin: 0;
  padding:  2% 3%;
  font-family: 'Teachers', sans-serif;
  user-select: none;
   -webkit-user-select: none;   /* Safari, iOS */
  -ms-user-select: none;       /* IE10+ */
}

main { display: flex; gap: 2rem; align-items: flex-start; }


@media (max-width: 767px) {
  body{
  overflow: auto !important; /* disables scroll on entire page */
  width: 100vw !important;
}
}

main {
    display: flex;
    flex-direction: column;
}

#adminDiv{
  overflow: auto;
}

#wrapper, main  {
  width: 100%;
}

#wrapperLogin {
  margin: 0 auto auto auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

#header a h1{
    font-weight: 400;
    font-size: 1.6em;
    text-decoration: none;
}


#wrapperLogin form{
  max-height: 400px;
}

#wrapperLogin h2{
  font-weight: 400;
}

.data {
  max-width:730px;
  padding-left: 5%;
  flex-shrink: 2;
}

.data h1{
  margin-top: 0;
  padding-top: 0;
}

@media (max-width: 767px) {

.data{
  width: 100%;
  padding: 5%;
}

#wrapperLogin {
  position: relative;
  top: 8%;
}

}

#lang-switch{
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  padding-bottom: 5%;
  justify-content: flex-end;
}

#lang-switch button{
  /* margin: 1%; */
  background-color: white;
  color: black;
  border-radius: 0;
  padding: 0 2%;
  font-size: 1.2em;
}


.activeBtn {
    font-weight: 700;
  }

#lang-fr {
  border-right: black solid 2px;
}

#data-german {
  display: none;
}

main{
  height: 100%;
}

h2 {
 font-size: 2em;
}


/* ____________________________ Loader */

#loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  z-index: 9999;
}

.dot {
  width: 1.5rem;
  height: 1.5rem;
  background: black;
  border-radius: 50%;
  opacity: 0;
  animation: fade 1.5s infinite;
}

.dot:nth-child(1) {
  animation-delay: 0s;
}
.dot:nth-child(2) {
  animation-delay: 0.2s;
}
.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes fade {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

#loader-overlay.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}


/* ____________________________ Organisation */

#wrapper, #wrapperMenu, #contentWrapper, #sequence, #contentsequence {
  display: flex;
}

#wrapper {
  display: flex;
  flex-direction: row;
  justify-content: left;
  height: 85%;
    position: absolute;
  top: 15%;
}

#wrapperMenu {
  margin: 0 auto;
  flex-direction: row;
  gap:  100px 300px;
  font-size: 3em;
  text-decoration: underline;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  position: absolute;
  height: 90%;
  top: 10%;
  width: 100%;
}



@media (max-width: 767px) {

  #wrapper  {    width: 350px;
    margin: auto;
  }

#wrapperMenu {
    top: 15% !important;
    height: 85%;
    width: 100%;
  gap:  20px 50px;
}

#wrapperMenu div {
  text-align: center;
  font-size: 1rem;
  padding: 5%;
  }
}


#wrapperMenu div h1{
  margin: 2%;
}

 	

@keyframes light-scale {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

#wrapperMenu div {
  animation: light-scale 2s ease-in-out infinite;
  flex-shrink: 3;
}

@media (max-width: 767px) {
  #wrapper {
  flex-direction: column !important;
  width: 100%;
  top:12%;
  left: 0;
  padding: 4%;
}

#wrapperMenu div {
  animation: light-scale 2s ease-in-out infinite;
  flex-shrink: 3;
}
}

.section {
  padding: 3%;
  padding-top: 0
  ;
}

#leftsection{
  box-sizing:content-box;
  /* border-right: black solid 1px; */
  padding-top: 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* ensures items align to the top */
  height: auto; /* allow height to grow */
  width: 400px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  #leftsection {
    height: auto !important;
  }

  .sectionR{  margin: 0 6% 0 0;}
}

@media (max-width: 768px) {
  #leftsection{
  }
}


/* Default: hide mobile version */
.mobile-only {
  display: none;
  padding: 0;
}

/* Mobile: hide flex version, show dropdown */
@media (max-width: 768px) {

#calendarWrappers {
    margin: auto;
}

  #leftsection {
    flex: 0 0 320px;  /* or whatever fixed or flexible width */
    /* display: block !important; */
  }

  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: block;
    width: 100%;
  }

  #te-dropdown {
    width: 100%;
    font-size: 2rem;
    display: block;
    margin:0;
    font-weight: 700;
    border: 3px solid;
    box-sizing: border-box;
    background-color: white;
    font-family: 'Teachers', sans-serif;
  }

  #te-dropdown option {
    padding: 3%;
    font-family: 'Teachers', sans-serif;
    font-size: 1.5rem;
  }


  #te-details h3 {
    margin: 0;;
  padding-bottom: 0.8rem;
  }

  .download,   #te-details + .mobile-only,   #te-details a{
    margin: 0 !important;
    padding: 0 !important;
  }


  
}

.leftsectionAdmin{
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.borderRight {
  border-right: black solid 1px;
}



@media (max-width: 767px) {

#leftsection{
  width: 100%;
  border-right: none;
}
}

#rightsection-vacances, #rightsection-camps {
  display: none;
}


#rightsection-vacances img, #rightsection-camps img {
  width: 50%;
  height: auto;
  margin: auto;
  position: relative;
}

.bold{
  font-weight: 900;
}

.underline{
  text-decoration: underline;
}

.sectionR{
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 0.8;
  overflow-y: auto;  /* enables vertical scroll */
  scrollbar-width: thin;         /* Firefox */
  scrollbar-color: #888 #eee;    /* Firefox */
  -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
  padding-right: 0;
}

.sectionRadmin{
  height: fit-content !important;
}

@media (max-width: 767px) {
  #rightsection, #rightsection-vacances{
  height: auto !important;
  overflow-y: visible;
}

/* 
  #rightsection-vacances{
  margin-top: 20%;
} */

/* #rightsection{
  margin-top: 40%;
} */

.section {
  padding: 0;
}
}


#contentsequence div {
  flex-grow: 1;
}

#corrections {
  display: flex !important; 
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-content: space-between;
}


.video-wrapper{
  box-sizing:border-box;
  width: 49.5%;
  flex-grow: 0 !important;
}

#contentsequence{
  display: flex;
  flex-direction: column;
  height: auto;
}

#contentsequence div {
  display: block;
  height: auto;      /* ✅ Grow to fit content (default) */
  overflow: visible; /* ✅ Don't clip overflowing content */
}

#sequence{
  font-size: 3em;
  text-decoration: underline;
  margin: 0;
  line-height: normal;
  display: inline-block;
}

.download {
  height: 0.75em;                 /* match font size */
  vertical-align: baseline;    /* align with text baseline */
  margin-left: 0.25em;
}

#objectifs {
  margin-left: 0;
  padding: 0;
  list-style-position: inside; /* bullets inside the padding box */
}

li {
  font-size: 1.25em;
}

iframe{
  width: 100%;
  aspect-ratio:  16 / 9;
}

#anecdoteTitle{
  width: 360px;
  background-color: black;
  color: white;
  font-size: 20px !important;
  margin: 0;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  position: relative;
  opacity: 0;
  transition: opacity 1s;
}

#anecdoteTitle:hover {
  cursor: pointer;
}


.anecdotearrow {
  position: absolute;
  right: 2%;
  bottom: 30%;
}

#anecdotearrowMobile{
  display: none;
  top: 1%;
  
}

#anecdotearrowDesktop{
  display: block;
}

#anecdoteTitle img {
  filter: invert(100);
  width: 1em;
  margin: 1% 2% auto 2%;
}

#anecdote {
  text-wrap-mode:wrap;
  font-weight: 400;
  width: 360px;
  /* height: 35%; */
  overflow-y: auto !important;  /* enables vertical scroll */
  scrollbar-width:none;         /* Firefox */
  -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
  flex-grow: 0;
  border: solid 1px white;
  transition: max-height 0.5s ease-out, border-color var(--border-transition-duration, 0.5s) ease-out, height 0.5s, opacity 0.5;
  z-index: 99;
  background-color: white;
  height: 0;
  overflow: hidden;
  transition: height 0.4s ease;
  opacity: 0;
}

@media (max-width: 767px) {

  #anecdoteTitle{
      margin: 0 auto;
  }

  #anecdotearrowDesktop {
    display: none;
  }

  #anecdotearrowMobile{
    display: block;
  }

  #anecdote{
    position: relative;
}


#anecdote.open {
  height: auto !important;
  overflow: auto;
  margin: auto;

}

#wrapper {
    position: relative !important; /* remove absolute positioning */
    flex-direction: column !important;
    width: 100%;
    top: 10%;
    left: auto;
    padding: 4%;
    padding: 0;
    flex-wrap: nowrap;
  }

  #leftsection {
    width: 100%;
    height: auto !important;
    margin-bottom: 2rem; /* add spacing below anecdote section */
  }

  #rightsection {
    height: auto !important;
    overflow: visible !important;
  }

  #anecdote.open {
    max-height: none !important; /* allow full height */
  }

  #anecdote {
    height: 0;
  }

  .marginfix {
    margin-top: 0 !important;
    margin-bottom: 20% !important;
  }


}


#anecdote.open {
  flex-grow: 3;
  border-color: black;
  --border-transition-duration: 0.2s;
  height: 350px;
  opacity: 1;
}

/* Closed state with slower border transition */
#anecdote.closing {
  --border-transition-duration: 0.7s;
}

#anecdote img {
  width: 100%;
  display: block;
}



/* ____________________________ Page header */


#header {
    width: 100%;
    height: 10%;
    display: flex;
    flex-direction: row;
    position: relative;
    top: 0;
    flex-wrap: wrap;
    align-items: center;
      /* flex: 1 1 200px;  */
  min-width: 0;    /* important to allow wrapping */
  box-sizing: border-box;
  align-items: flex-start; /* ensures items align to the top */
  height: 15%; /* allow height to grow */
  }

.error {
    background-color: #ffdddd;
    border: 1px solid #ff5c5c;
    color: #a94442;
    padding: 10px;
    margin-top: 10px;
    width: fit-content;
}

#login {
  margin-left: auto;
  font-weight: 400;
}


@media (max-width: 767px) {
.login-buttons{
  width: 100%;
  text-align: center;
  justify-content: center;
}
#header{
    z-index: 99;
}
}

.login-buttons {
    margin-left: auto;
  display: flex;
  gap: 1rem; /* space between buttons */
}

.login-buttons h1 {
  margin: 0;
  font-size: 1.2rem;
}

.login-buttons a {
  text-decoration: none;
  color: inherit;
}



@media (max-width: 767px) {

#header {
    position: absolute;
    left: 0;
}

}

#rubiks, twisty-player{
    height: 10vh;
    width: 10vh;
}


a {
  color: black;
  text-decoration: none;
}


/* ____________________________ Monkey */

#monkey {
  position: absolute;
  width: 100px;
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 0.5s linear;
  pointer-events: none;
  z-index: 99999;

}

/* ____________________________ Calender */

.dayLabel {
  margin: 0;
  padding: 0;
  font-size: 2em;
}

#viewer {
  width: 300px;
  height: 300px;
  margin-top: 10px;
}

#scramble-text {
  font-size: 1.2rem;
  color: #333;
}

/* Header */
#calHeader {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: -0.2rem;
  text-align: center;
    justify-content: space-between; /* spread children */
}



#monthlabel {
  margin: 0;
  font-size: 2em;
  font-weight: 700;
  text-align: center;
}

#calHeader h1 {
  font-size: 4rem;
  margin: 0 1rem 0 1rem;
  flex: 1; text-align:
  left;
  flex-grow: 1;            /* fill available space */
  text-align: center;   
}
#calHeader button {
  padding: .25rem .5rem; 
  background-color: transparent;
  border: none;
}

.today {
  background-color: black !important;
  color: white;
}

/* Grid */
#calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: auto repeat(6, 1fr); /* 1 header row + 6 week rows */
  min-width: 350px;
  max-width: 350px;
  user-select: none;
  gap: 1px;                 /* thin grid lines */
  background: #ffffff;         /* grid lines color */
}

#calendarWrapper{
  height: 45%;
}


@media (max-width: 767px) {
  #calendar {
  min-width: 200px;
  }

#calHeader{
  width: 350px;
}

}

.arrow :hover{
  cursor: pointer;
}

.arrow {
  padding: 0 !important;
  margin: 0 !important;
}

.arrow img{
  width: 50%;
}



.day {
  position: relative;
  aspect-ratio: 1;
  height: 50px;
  width: 50px;
  align-items: flex-start;
  justify-content: left;
  cursor: pointer;
  background: #fff;
  transition: transform .1s;
  outline: 1px solid black;

}
.day:hover   { transform: scale(1.05); }

.date{
  display: inline-block;
  position: relative;
  padding-left: 5%;
}

.te {
  font-size: 1.5em;
  font-weight: 700;
  margin-right: auto;
  margin-left: auto;
  position: relative;
}

.anniv {
  display: inline-block;
  position: relative;
  width: 15px;
  margin-top: 2px;
  margin-left: 2px;
  left:0;
}

.vacs{
  position: absolute;
  right: 0;
  bottom: 0;
  width: 15px;
  margin-right: 2px;
}


/* .selected    { 
  outline: 4px solid black;
  outline-offset: -2px;
  z-index: 9;
} */

.selected    { 
  outline: 2px solid black;
  outline-offset: -2px;
  z-index: 9;
}

.today img {
    filter: invert(100%);
}

.today .te {
  color: white;
}

.weekday {
  font-weight: 600;
  text-align: center;
  padding: 0.25rem 0;
}



/* ____________________________ Correction */

#te-chart {
  background-color: white;
  position: sticky;
  /* position: fixed; */
  top: 0;
}

#graph{
  width: 30%;
  height: auto;
}

.user-block {
    padding: 10px;
    font-weight: bold;
    font-size: 3rem;
    width: 100%;
    padding: 0 !important;
  border-top: 1px solid black;
}

#listeTE {
  margin-top: 10%;
  /*border-top: 1px solid black; */
  width: 100%;
}

#listeTE div{
  margin-top: 2%;
  margin-bottom: 2%;
}

@media (max-width: 767px) {
  #listeTE div{
  border-top: none;
  }
}

.user-block:hover {
    background-color: #e0e0e0;
    cursor: pointer;
}


#te-details .video-wrapper {
  width: 100%;               /* full width of container */
  position: relative;
  padding-top: 56.25%;       /* 16:9 aspect ratio */
}

#te-details .video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;         /* or 'contain' if you prefer */
}

.objectif-block {
  margin-bottom: 1rem;
}

.scale {
  background: #eee;
  height: 20px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.scale .bar {
  background: black;
  height: 100%;
  width: 0;
  transition: width 0.8s ease; /* 👈 smooth animation */
}

.scale .step-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.2);
}

#chartsession {
  display: none;
}

  form {
    max-width: 1500px;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: sans-serif;
  }

  h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    padding-bottom: 0.5rem;
  }

  label {
    display: block;
    color: #444;
    font-weight: 500;
  }

  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="classe"],
  textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
  }

  textarea {
    resize: vertical;
    min-height: 80px;
  }

  button,
  input[type="submit"] {
    background: black;
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  button:hover {
    background: #005f99;
  }

  input[type="file"] {
    padding: 0.4rem 0;
  }

   .notes-table {
    width: 100%;
    border-collapse: collapse;
    font-family: sans-serif;
    background-color: #fff;
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    table-layout: fixed;
  }

  .notes-table th,
  .notes-table td {
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #ddd;
  }

  .notes-table thead {
    background-color: black;
    color: white;
  }

  .notes-table th.narrow,
  .notes-table td:nth-child(1),
  .notes-table td:nth-child(2),
  .notes-table td:last-child {
    width: 80px;
  }

  .notes-table th.wide {
    width: auto;
  }

  .notes-table tbody tr:hover {
    background-color: #f1f9ff;
  }

  input[type="number"],
  input[type="text"],
  textarea {
    width: 100%;
    padding: 0.4rem 0.6rem;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
  }

  textarea {
    min-height: 60px;
    resize: vertical;
  }

  button[type="submit"] {
    background-color: black;
    color: #fff;
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  button[type="submit"]:hover {
    background-color: #005f99;
  }

  @media (max-width: 767px) {
  
}