@import url('https://fonts.googleapis.com/css2?family=Sixtyfour&display=swap');.box {
  width: fit-content;
  margin: 20px auto;
  border: 11px solid green;
  border-image: url('/box_border.png') 11 stretch;
  border-radius: 12px;
  box-shadow: 3px 3px 6px #306b30;
  overflow: hidden;
  min-width: 0;
}

@media (max-width: 750px) {
  .box {
    margin: 10px auto;
  }
}
.button_wrapper {
  width: fit-content;
  margin: 10px auto;
  padding: 0;
  border-radius: 12px;
  background-image: radial-gradient(ellipse at center, #131410 20%, rgb(3, 121, 3));
}

.button_wrapper button {
  border: 11px solid transparent;
  border-radius: 12px;
  background-color: #131410;
  width: fit-content;
  transition: all 150ms;
  color: #4a8b53;
  border-image: url('/button_border.png') 11 stretch;
  cursor: pointer;
}

.button_wrapper button:hover:not([disabled]) {
  box-shadow: 3px 3px 6px #3e8b3e;
  color: #4ac44a;
  background-color: transparent;
}

.button_wrapper button[disabled] {
  border: 11px solid transparent;
  border-radius: 12px;
  border-image: url('/button_border_disabled.png') 11 stretch;
  color: #4e6d52;
  cursor: default;
}

.button_wrapper button[disabled] > span {
  cursor: default;
}
dialog {
  max-width: 32em;
  padding: 0;
  border: 11px solid green;
  background-color: #131410;
  color: #4a8b53;
  border-image: url('/box_border.png') 11 stretch;
  border-radius: 12px;
  box-shadow: 3px 3px 6px #306b30;
  /* z-index:2; */
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
dialog > div {
  padding: 1em;
}
dialog[open] {
  animation: zoom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes zoom {
  from {
    transform: scale(0.95);
  }
  to {
    transform: scale(1);
  }
}
dialog[open]::backdrop {
  animation: fade 0.2s ease-out;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#avatarInput {
  display: none;
}

.prof-pic-wrapper {
  height: 100px;
  width: 100px;
  border-radius: 50px;
  position: relative;
  border: solid;
  overflow: hidden;
  margin: auto;
  padding:0;
}

/* .prof-pic {
  position: absolute;
} */

.prof-file {
  width: 100px;
  height: 100px;
  height: auto;
}header {
	height: 120px;
	background-image: url('/dark2.png');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: left 40px top 0;
	box-shadow: #4a8b53 0px 0px 10px;
	position: relative;
}

header h1 {
	text-align: center;
	margin: 0;
	padding-top: 30px;
	font-size: 50px;
}

.link {
  margin: 0 20px;
}

.logthumb {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 5px 10px;
	border-radius: 5px;
	font-size: 14px;
	& img {
		width: 20px;
		margin-left: 10px;
		cursor: pointer;
	}
	& .logbar {
		display: flex;
		align-items: center;
	}
	& .logLabel {
		display: flex;
		align-items: center;
		cursor: pointer;
		border: none;
		background: none;
		padding: 0;
		font: inherit;
		color: inherit;
		& .logAvatar {
			height: 30px;
			width: 30px;
			border-radius: 15px;
			border: 1px solid;
			overflow: hidden;
			margin-left: 0;
			margin-right: 6px;
		}
	}
	& .logout-btn {
		border: none;
		background: none;
		padding: 0;
		line-height: 0;
		cursor: pointer;
	}
	& .box {
		margin-top: 4px;
		background-color: #131410;
	}
}
.logthumb:not(.expanded) {
	& .box, a, & .box button {
		cursor: unset;
		pointer-events: none;
	}
}

.logMenu {
	margin-top: 6px;
	padding: 0 6px;
	opacity: 0;
	transition: opacity .2s ease-out;
}
.expanded .logMenu {
	opacity: 1;
}

.menuItem {
	padding: 6px 0;
	display:grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .2s ease-out;
  overflow: hidden;
	& span, & button, & a {
		min-height: 0;
	}
}

button.menuItem {
	border: none;
	background: none;
	font: inherit;
	color: inherit;
	width: 100%;
	text-align: left;
	cursor: pointer;
	padding: 0;
}

.logthumb.expanded .menuItem {
	grid-template-rows: 1fr;
}

@media (max-width: 1550px) {
	header h1 {
		font-size: 32px;
		padding-top: 25px;
	}
	header {
		height: 80px;
		background-position: left 20px top 0;
		background-size: 80px;
	}
	.logthumb {
		font-size: 12px;
	}
}

.logMenu-mobile-only {
	display: none;
}

@media (max-width: 1200px) {
	header h1 {
		font-size: 24px;
		padding-top: 20px;
	}
	header {
		height: 60px;
		background-position: left 20px top 0;
		background-size: 60px;
	}
	.logthumb {
		font-size: 10px;
	}
	.logbar {
		justify-content: flex-end;
	}
	.logbar .logout-btn {
		display: none;
	}
	.logbar .logLabel span {
		display: none;
	}
	.logMenu-mobile-only {
		display: grid;
	}
}

@media (max-width: 750px) {
	header {
		height: 40px;
		background-size: 40px;
	}
	header h1 {
		font-size: 16px;
		padding-top: 10px;
	}
	.logthumb {
		top: 6px;
		right: 4px;
		padding: 0;
		& .logLabel .logAvatar {
			height: 26px;
			width: 26px;
			border-radius: 13px;
			margin-right: 0;
		}
	}
}
.switch-wrapper {
  margin: 10px auto;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(max-content, 1fr));
  width: 100%;
  background-color: transparent;
  position: relative;
  cursor: pointer;
  border: 11px solid green;
  border-image: url('/button_border_disabled.png') 11 stretch;
  border-radius: 12px;
}

.switch-wrapper::after {
  content: '';
  display: block;
  width: calc(50% - 11px);
  height: 100%;
  border: 11px solid green;
  border-image: url('/button_border.png') 11 stretch;
  border-radius: 12px;
  box-shadow: 3px 3px 6px #306b30;
  position: absolute;
  top: -11px;
  left: -11px;
  transition: left 0.3s ease-in-out;
}

.switch-wrapper:not(.isFirstActive)::after {
  left: calc(50%);
  transition: left 0.3s ease-in-out;
}

.label {
  padding: 4px;
  text-align: center;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  background-image: linear-gradient(
    to right,
    rgb(11, 112, 36),
    rgb(21, 235, 74) 2% 49%,
    rgb(11, 112, 36) 51%
  );
  transition: background-position 0.3s ease-in-out;
}

.switch-wrapper .label:nth-child(1) {
  margin-right: 15px;
}

.switch-wrapper .label:nth-child(2) {
  margin-left: 15px;
}

.switch-wrapper.isFirstActive .label:nth-child(1) {
  background-position: 0%;
}
.switch-wrapper:not(.isFirstActive) .label:nth-child(1) {
  background-position: -100%;
}

.switch-wrapper.isFirstActive .label:nth-child(2) {
  background-color: rgb(11, 112, 36);
  background-position: 100%;
}
.switch-wrapper:not(.isFirstActive) .label:nth-child(2) {
  background-position: 0%;
}
.login-page {
  width: fit-content;
  margin: auto;
  text-align: left;
  position: relative;
}

.expandable {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
	transition: all .2s ease-out;
  overflow: hidden;
	& div {
		min-height: 0;
    overflow: hidden;
	}
}
.expanded .expandable {
  grid-template-rows: 1fr;
  opacity: 1;
}

form {
  max-width: fit-content;
}

.form-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  column-gap: 30px;
  & input {
    width: 200px;
  }
}

/* Field state wrappers */
.field-wrapper {
  display: grid;
  grid-template-columns: 1fr 20px;
  align-items: center;
}

.field-wrapper .form-line {
  grid-column: 1;
}

.field-wrapper.field-error input {
  border-color: var(--red-border);
}

.field-wrapper.field-valid input {
  border-color: #88ff88;
}

.field-icon {
  grid-column: 2;
  justify-self: center;
}

.field-icon--valid {
  color: #88ff88;
}

.field-icon--invalid {
  color: var(--red-error);
}

/* Collapsible transition (same pattern as .expandable) */
.collapsible {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .2s ease-out, opacity .2s ease-out;
  overflow: hidden;
  & > * {
    min-height: 0;
    overflow: hidden;
  }
}

.collapsible--open {
  grid-template-rows: 1fr;
  opacity: 1;
}

/* Password criteria checklist */
.password-criteria {
  list-style: none;
  margin: 2px 0 6px 0;
  padding: 0 0 0 8px;
  font-size: 0.85rem;
}

.password-criteria .criterion-ok      { color: #88ff88; }
.password-criteria .criterion-ko      { color: var(--red-error); }
.password-criteria .criterion-neutral { color: #4a8b53; }

/* Avatar */
.avatar-preview-container {
  width: 100px;
  height: 100px;
  margin: auto;
}

.avatar-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* Server-side error (post-submit) */
.server-error {
  color: var(--red-error);
  margin-top: 8px;
  font-size: 0.9rem;
}

.avatar-warning {
  margin-top: 12px;
  padding: 10px 14px;
  border-left: 3px solid #f57c00;
  background-color: rgba(245, 124, 0, 0.1);
  font-size: 0.9rem;
  & p {
    margin: 0 0 8px 0;
  }
}

.login-form-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
}

@media (max-width: 750px) {
  .login-page {
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .form-line {
    & input {
      margin-top: 12px;
      margin-bottom: 12px;
    }
  }
}

@media (max-width: 479px) {
  .form-line {
    column-gap: 10px;
    & input {
      width: 150px;
    }
  }
  .avatar-preview-container {
    width: 70px;
    height: 70px;
  }
}
@keyframes typewriter {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

@keyframes fadeDown {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(4px); }
}

.error-message {
  display: inline-block;
  white-space: nowrap;
  color: var(--red-error);
  animation: typewriter 300ms steps(20, end) forwards;
}

.error-message--exit {
  animation: fadeDown 200ms ease-out forwards;
}
.userItem {
  display: flex;
  align-items: center;
  width: fit-content;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.userItem-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 10px;
}

.userItem-pseudo {
  font-size: 0.8rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Sand clock */
.invite-sent {
  display: inline-block;
  width: 24px;
  margin-left: 8px;
}

.sand-top, .sand-bottom, .sand-clock {
  will-change: transform;
  transform-origin: 50% 30px;
}
.sand-clock {
  animation: clock 3s 1.25s ease-in-out infinite;
  transform-origin: 50% 50%;
  height: 16px;
  fill: #4a8b53;
}
.sand-top {
  animation: clock-sand-top 3s ease-in-out infinite;
}
.sand-bottom {
  animation: clock-sand-bottom 3s ease-in-out infinite;
  transform: scale(0);
}

@keyframes clock {
  20%, 50% {
    transform: rotate(180deg);
  }
  70%, 100% {
    transform: rotate(360deg);
  }
}
@keyframes clock-sand-top {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes clock-sand-bottom {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
.invite-received {
  width: 24px;
  margin-left: 8px;
}.userList {
  height: 100%;
  overflow-y: auto;
  box-shadow: 2px 0 10px #4a8b53;
  & .userList-title {
    display: block;
    margin: 15px 10px;
  }
}.notification-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.notification-feed__item {
  padding: 8px 12px;
  border-left: 3px solid #4a8b53;
  background-color: rgba(74, 139, 83, 0.1);
  font-size: 0.9rem;
  animation: notification-slide-in 0.2s ease-out;
}

@keyframes notification-slide-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.dashboard {
  display: grid;
  grid-template-columns: minmax(min-content, 20%) 1fr;
  height: 100%;
  overflow: hidden;
}

.dashboard-right {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.dashboard-main {
  overflow-y: auto;
  padding: 0 20px;
  & h1 {
    padding: 20px 0;
    margin: 0;
  }
  & p {
    text-align: center;
  }
}

.dashboard-stats {
  border: 1px solid #4a8b53;
  margin-bottom: 20px;
  padding: 12px 16px;
  font-size: 0.85rem;
}

.dashboard-stats__tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.dashboard-stats__periods {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.dashboard-stats__tab,
.dashboard-stats__period {
  background: none;
  border: 1px solid #4a8b53;
  color: #4a8b53;
  cursor: pointer;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 0.8rem;

  &:hover {
    color: #88ff88;
    border-color: #88ff88;
  }
}

.dashboard-stats__tab--active,
.dashboard-stats__period--active {
  color: #88ff88;
  border-color: #88ff88;

  &:hover {
    color: #aaffaa;
    border-color: #aaffaa;
  }
}

.dashboard-stats__body {
  color: #4a8b53;
}
.formBox {
  width:300px;
  margin: auto;
}

h1 {
  text-align: center;
}

.profile-page form {
  max-width: fit-content;
}

.collapsible {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .2s ease-out, opacity .2s ease-out;
  overflow: hidden;
  & > * {
    min-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }
}

.collapsible--open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.profile-page .expandable {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .2s ease-out, opacity .2s ease-out;
  overflow: hidden;
  & > div {
    min-height: 0;
    overflow: hidden;
  }
}

.profile-page .expanded .expandable {
  grid-template-rows: 1fr;
  opacity: 1;
}

.avatar-preview {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.actualAvatar, .newAvatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: block;
}

.avatarChange {
  display: block;
}.GameBoard {
  width: min(100cqw, calc(100cqh * var(--cols) / var(--rows)));
  aspect-ratio: var(--cols) / var(--rows);
  border: 11px solid green;
  border-image: url('/box_border.png') 11 stretch;
  border-radius: 12px;
  box-shadow: 3px 3px 6px #306b30;
  overflow: hidden;
  box-sizing: border-box;
  container-type: inline-size;
  container-name: gameboard;
}

.game-grid {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
}

.cells {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: min(5cqi, 2em);
  background: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.reload-handler {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease-out;
  overflow: hidden;
  text-align: center;
}

.reload-handler--open {
  grid-template-rows: 1fr;
}

.reload-handler__inner {
  min-height: 0;
  overflow: hidden;
}

.jouability-guard {
  display: none;
  text-align: center;
  padding: 20px;
}

@container gameboard (max-width: var(--min-playable-width)) {
  .jouability-guard {
    display: block;
  }
  .game-grid {
    display: none;
  }
}
.Morpion {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  height: 100%;
}
.Morpion #game-turn-data {
  text-align: center;
  margin: 20px 0;
}
.Morpion .game-area {
  width: 100%;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  container-type: size;
  container-name: game-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.Morpion .reload-buttons {
  display: flex;
  width: fit-content;
  margin: auto;
}
.Morpion .reload-buttons .button_wrapper {
  margin: 10px;
}.Puissance4 {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  height: 100%;
}
.Puissance4 #game-turn-data {
  text-align: center;
  margin: 20px 0;
}
.Puissance4 .game-area {
  width: 100%;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  container-type: size;
  container-name: game-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.Puissance4 .reload-buttons {
  display: flex;
  width: fit-content;
  margin: auto;
}
.Puissance4 .reload-buttons .button_wrapper {
  margin: 10px;
}.Reversi {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  height: 100%;
}
.Reversi #game-turn-data {
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
  margin: 20px 0;
}
.Reversi .game-area {
  width: 100%;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  container-type: size;
  container-name: game-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.Reversi .reload-handler {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.Reversi .reload-handler .reload-buttons {
  display: flex;
  gap: 12px;
}

:root {
	--red-error: #c52f2f;
	--red-border: #8b2020;
}

html, #root {
	height: 100dvh;
}

.home-layout {
	display: flex;
	flex-direction: column;
	height: 100dvh;
	overflow: hidden;
}

.home-content {
	flex: 1;
	min-height: 0;
	overflow: hidden;
}

body {
	margin: 0;
	padding: 0;
	background-color: #131410;
	color: #4a8b53;
	height: 100dvh;
	overflow: hidden;
}

body,
input,
button {
	font-family: 'Sixtyfour', sans-serif;
	font-optical-sizing: auto;
	font-weight: 400;
	font-style: normal;
	font-variation-settings:
		'BLED' 0,
		'SCAN' 0;
}

a,
a:hover {
	color: #4a8b53;
	text-decoration: none;
}

input {
	background-color: #000000;
	color: #88ff88;
	border-top: 1px solid #222222;
	border-left: 1px solid #222222;
	border-right: 1px solid #224422;
	border-bottom: 1px solid #224422;
	margin: 10px;
	caret-shape: block;
}

input:focus-visible {
	outline: 1px solid #88ff88;
}

input:-webkit-autofill {
	-webkit-box-shadow: 0 0 0 50px #000000 inset; /* Change the color to your own background color */
	-webkit-text-fill-color: #88ff88;
}

@media (max-width: 1550px) {
	body,
	input,
	button {
		font-size: 14px;
	}
}

@media (max-width: 1200px) {
	h1 {
		font-size: 1.4em;
	}
}

@media (max-width: 750px) {
	body,
	input,
	button {
		font-size: 10px;
	}
	h1 {
		font-size: 1.4em;
	}
	input {
		margin: 6px;
	}
}
