/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

body {
  background: linear-gradient(135deg, #e7f2f1, #eef1f7);
  color: #1f2937;
    overflow: hidden;
}

/* HEADER */
.topbar {
    padding: 16px 24px;
    display: grid;
    grid-template-columns: 200px 1fr 250px;
}
.topbar > div {
    text-align: right;
    display: flex;
}
.topbar i {
    font-size: 26px;
    cursor: pointer;
    margin-left: 30px;    
}
.topbar div DIV {
    position: relative;
}
.topbar div DIV i.fa-1, .topbar div DIV i.fa-2 {
    position: absolute;
    font-size: 10px;
    border: 1px solid #000;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: grid;
    text-align: center;
    align-content: center;
    background-color: #fff;    
    top: calc(50% - 17px);
    left: 9px;
}

.hidden {
    display: none;
}
.phases {
  display: inline-flex;
  background: rgba(255,255,255,0.6);
  border-radius: 30px;
  padding: 4px;
}
.phases SPAN {
    cursor: pointer;
}
.phase {
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 500;
  cursor: default;
  color: #6b7280;
}

.phase.active {
  background: white;
  color: #111827;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}



.dashboard {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 550px;
    gap: 24px;
    transition: opacity 0.3s ease;
}
.open.dashboard {
    display: block;
}
.open .rankingg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}


.index {
  display: grid;
  grid-template-columns: 1fr 0fr;
  transition: grid-template-columns 0.45s ease;
  height: 100vh;
}

.live {
  overflow: hidden;
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.3s ease,
    transform 0.4s ease;
}
.index.open {
  grid-template-columns: 850px 1fr;
}

.index.open .live {
  opacity: 1;
  transform: translateX(0);
}











.card {
  background: rgba(255,255,255,0.7);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card.full {
  grid-column: 1 / -1;
}

.card h2 {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
}

/* MATCHES TABLE */
.matches {
  width: 100%;
  border-collapse: collapse;
}
.matches td {
    padding: 10px;
    border-top: 1px solid rgba(0,0,0,0.05);
    height: 55px;
}
.matches td .btn, .matches td SPAN {
    cursor: pointer;
}
.matches tr:first-child td {
  border-top: none;
}

/* STATUS */
.status-live {
  background-color: #16a34a;
  font-weight: 600;
    color: #fff;
}
.status-sel {
    background-color: #637cc8;
    font-weight: 600;
    color: #fff;
}
.status-finished {
  color: #6b7280;
}

.btn-live {
  background: #10b981;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
    cursor: pointer;
}

.btn-live:hover {
  background: #059669;
}


/* cacher le header timer sur la page live */
.hide-on-live {
  display: none;
}

.live-board .ll {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    padding: 20px;
    color: #fff;    
    height: 500px;
}
.live-board P {
    margin: 0;
    padding: 0;
}
.team {
    text-align: center;
    display: grid;
    align-content: center;
    height: 100px;
    font-size: 36px;
    font-weight: bold;
    background-color: #ff6600;
}
.bleu {
    background-color: #0164b7;
}
.orange {
    background-color: #ff6600;
}
.deux {
    display: grid;
    grid-template-columns: 1fr 2fr;
    margin-top: 20px;
    gap: 20px;
}
.droite .deux {
    grid-template-columns: 2fr 1fr;
}
.bleu {
    height: 200px;
}
.gauche .bleu {
    height: 200px;    
}
.droite .bleu {
    height: 200px;
}
.score {
    height: 200px;
}



.score P {
    font-size: 200px;
}
.bleu P {
    font-size: 100px;
}
LABEL {
    font-size: 20px;
    position: absolute;
    left: 10px;
    top: 10px;
}
.score, .bleu {
    display: grid;
    align-content: center;
    text-align: center;
    position: relative;    
}

.deux.button > DIV {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 80px;  
    align-content: center;
}
.deux.button DIV DIV {
    font-size: 50px;
    display: grid;
    align-content: center;
    text-align: center;
    color: #fff;
    height: 80px;
    width: 100%;
    cursor: pointer;
}



.timer, .timer2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 20px;
    gap: 20px;
    margin-top: 50px;
}
.timer DIV {    
    background-color: #d0d0d0;
    height: 200px;
    align-content: center;
    text-align: center;
}
.timer .time {
    background-color: #303030;
    color: #fff;
    font-size: 150px;
}
.timer i {
    cursor: pointer;
    font-size: 80px;
}
.timer2 #timer-extra {
    background-color: #616161;
    color: #fff;
    font-size: 50px;
    height: 100px;
    margin-top: -30px;
    align-content: center;
    text-align: center;
    display: none;
}


.ranking-row.header {
    margin-top: 10px;
    background-color: #dedede;
}
.ranking-row {
    display: grid;
    grid-template-columns: 20px 1fr repeat(7, 35px);
    align-items: center;
    height: 40px;
    text-align: center;
    border-bottom: 1px solid #dedede;
}
.ranking-row DIV:nth-child(2) {
    text-align: left;
    padding-left: 10px;
}
.open .ranking-row {
    grid-template-columns: 20px 1fr repeat(7, 25px);
}
.gears .ranking-row {
    grid-template-columns: 50px 1fr repeat(7, 50px);
}
.gears .ranking-row INPUT {
    width: 50px;
    text-align: center;
}


.modal {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.4);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

.modal.hidden {
	display: none;
}

.modal-box {
	background: #fff;
	padding: 20px;
	border-radius: 10px;
	min-width: 260px;
	text-align: center;
}

.modal-box h3 {
	margin-top: 0;
}

.scores {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin: 15px 0;
}

.scores input {
	width: 60px;
	font-size: 20px;
	text-align: center;
}

.actions {
	display: flex;
	justify-content: space-between;
	gap: 10px;
}

.actions button {
	flex: 1;
	padding: 8px;
}

.actions .primary {
	background: #4b9df0;
	color: #fff;
	border: none;
}



.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-overlay .mod {
    position: relative;
    width: min(40%);
    background-color: #fff;
}
.modal-overlay.hidden {
  display: none;
}
.modal-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  width: min(90%, 420px);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
  animation: pop .2s ease-out;
}
.modal-overlay .mod .modal-card {
    width: 100%;
    height: 50svh;    
}

@keyframes pop {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
  to   { transform: scale(1); opacity: 1; }
}
.modal-overlay .headerr {
    position: absolute;
    top: 10px;
    right: 10px;    
}
.modal-overlay .header i {
    font-size: 26px;  
    z-index: 99999;
    cursor: pointer;
}




.modal-icon {
  font-size: 42px;
  color: #e63946;
  margin-bottom: 12px;
}

.modal-card h3 {
  margin: 10px 0;
  font-size: 22px;
}

.modal-card p {
  color: #555;
  font-size: 15px;
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.modal-actions .btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  cursor: pointer;
}

.btn.cancel {
  background: #e0e0e0;
}

.btn.danger {
  background: #e63946;
  color: #fff;
}

.btn.danger:hover {
  background: #d62828;
}


.teams INPUT, .teams SELECT {
    border: 1px solid #dedede;
    border-radius: 6px;
    padding: 10px;
    margin-right: 10px;
}
.teams INPUT {
    width: 400px;
}
.teams button {
    background-color: #0164B7;
    padding: 10px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
}

