/* Reset de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.settings-icon {
  width: 32px;   /* taille de l’image */
  height: 32px;
  object-fit: contain;
}

html, body {
  background: linear-gradient(to bottom right, #1a1f2b, #2a2e45);
  color: #fff;
  height: 100%;
  width: 100%;
}

.exercise-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 320px;  /* limite la taille */
}

.exercise-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}


#chronoOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 5rem;   /* taille plus grande */
  font-weight: bold;
  z-index: 5;
}

.hidden {
  display: none !important;
}

#currentExercise img {
  max-width: 100%;
  max-height: 50vh; /* 50% de la hauteur de l’écran */
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app {
  background: #1f2330;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  width: 100%;
  max-width: 480px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
}

header h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #4fc3f7;
}

main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  align-items: center;
  flex-grow: 1;
}

#daySelector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2c3243;
  padding: 10px 15px;
  border-radius: 12px;
  width: 100%;
}

#selectedDate {
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
  flex: 1;
}

button, .btn, input[type="submit"] {
  background: #4fc3f7;
  color: #000;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.3s;
}

button:hover, .btn:hover, input[type="submit"]:hover {
  background: #29b6f6;
}

.exercicePreview {
  background-color: #2a2f3f;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  width: 100%;
}

#restMessage h2 {
  text-align: center;
  color: #3b82f6;
}

#settingsLink {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 2rem;
  color: white !important;
  text-decoration: none;
  z-index: 1000;
}

#settingsLink:hover {
  color: #4fc3f7;
}

input[type="number"] {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #444;
  background-color: #2c3243;
  color: #fff;
}

label {
  display: block;
  font-weight: bold;
  margin-top: 10px;
}

.back-link {
  margin-top: 20px;
  text-align: center;
}

.hidden {
  display: none;
}

#status {
  text-align: center;
  color: #81c784;
  font-weight: bold;
}

#startButton {
  font-size: 1.4rem;
  padding: 18px 30px;
  margin: 30px auto;
  display: block;
  width: 80%;
  max-width: 320px;
  text-align: center;
  background: #3b82f6;
  color: #000;
  border-radius: 10px;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#dayContent {
  width: 100%;
}

.rest-circle {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 20px auto;
}

.progress-ring {
  width: 200px;
  height: 200px;
}

.progress-ring {
  transform: rotate(-90deg);
}


.progress-ring__bg,
.progress-ring__progress {
  fill: none;
  stroke-width: 10;
  cx: 100;
  cy: 100;
  r: 95;
}

.progress-ring__bg {
  stroke: #ddd;
}

.progress-ring__progress {
  stroke: #4fc3f7;
  stroke-linecap: round;
  stroke-dasharray: 339; /* 2 * PI * 54 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;  /* taille du texte du chrono de repos */
  font-weight: bold;
}



.rest-circle {
  width: 200px;   /* agrandissement */
  height: 200px;
  margin: 20px auto;
}

.progress-ring {
  width: 200px;
  height: 200px;
}

//.image-area {
//  position: relative;
//  width: 100%;
//  max-width: 400px;
//  height: 250px;
//  margin: 0 auto 16px auto;
//  display: flex;
//  align-items: center;
//  justify-content: center;
//  overflow: hidden;
//  background: #2c3243;
//  border-radius: 12px;
//  aspect-ratio: 4 / 3;
//}
/* Zone d’image fixe avec ratio, sans crop */


.image-area {
  width: 85vw;
  height: 280px; /* ou autre hauteur selon tes préférences */
  margin: 0 auto;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #2c3243;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;

}


/* Image non rognée */
#exerciseImage {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
  max-width: 100%;
  max-height: 100%;
}

/* Chrono overlay */
#chronoOverlay,
#restTimer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}


/* Chrono de repos */
#restTimer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  z-index: 10;
}


/* Titre principal et exercice sur une ligne */
header h1, #exerciseName {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.2rem;
  text-align: center;
  padding: 0 10px;
}

#chronoOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
}

.chrono-circle {
  font-size: 3rem;
  color: #fff;
}

h2, p {
  text-align: left;
  margin-left: 10px;
  margin-right: 10px;
}

#controls {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 320px;
  margin-top: 15px;
}

.btn-valid {
  background: #4fc3f7;
  color: #000;
}

.btn-skip {
  background: #1e88e5;
  color: #fff;
}