/* définition des variables de couleur */
:root {
  --primary-color: #ffce00;
  --secondary-color: #7287fc;
  --background-color: #b71c1c;
  --background-color2: #111;
  --text-color1: #fff;
  --text-color2: #111;
  --border-color: #e3e7f0;
  --hover-color: #7287fc;
  --active-color: #b4b6b8;
  --error-color: #be2222;
  --success-color: #3a8d3e;
  --shadow-color: rgba(150,150,180,0.10);
  --shadow-light: rgba(110,110,120,0.06);
  --font-family: 'Verdana', 'Geneva', 'Tahoma', sans-serif;
}
/* Style général */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}
body {
  margin: 0;
  padding: 0;
  background: var(--background-color2);
  color: var(--text-color2);
  padding-top:100px; /* Pour laisser de la place à la navbar en bas */
  font-family:Verdana, Geneva, Tahoma, sans-serif;
  font-size:14px;
}
.logo{
  position:absolute;
  top:0;
  /* centré horizontalement */
  left:50%;
  transform:translateX(-50%);
  width: 150px;
  height: 150px;
}

.login-container{
  padding:20px;
  width: 80%;
  margin-right:auto;
  margin-left:auto;
  max-width: 350px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 18px 3px rgba(150,150,180,0.10), 0 1.5px 5px 1px rgba(110,110,120,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.dashboard-container {
  width: 100%;
}

h1, h2 {
  color: #222;
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label {
  color: var(--primary-color);
  text-align: left;
  margin-bottom: 4px;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 13px 10px;
  background: #f5f6fa;
  border: 1.5px solid #e3e7f0;
  border-radius: 9px;
  color: #222;
  margin-top: 3px;
  outline: none;
  transition: border .18s;
  box-sizing: border-box;
}

input[type="email"]:focus,
input[type="password"]:focus {
  border-color: #b4b6b8;
  background: #ffffff;
}

button[type="submit"],
.dashboard-container nav button, 
.dashboard-container nav a {
  background: linear-gradient(90deg, var(--background-color) 50%, var(--background-color2) 100%);
  color: #fff;
  border: none;
  padding: 13px 0;
  font-weight: 600;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
  box-shadow: 0 2px 6px 0 rgb(168 177 248 / 15%);
  transition: background 0.16s, transform 0.08s;
  display: block;
  text-align: center;
  text-decoration: none;
}

button[type="submit"]:hover,
.dashboard-container nav a:hover {
  background: linear-gradient(90deg, #7287fc 40%, #b4b6b8 100%);
  transform: scale(1.018);
}

#login-result {
  margin-top: 9px;
  min-height: 1.2em;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.2px;
}

#login-result.error { color: #be2222; }
#login-result.success { color: #3a8d3e; }

/* Dashboard UI */
.dashboard-container nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  display: flex;
  justify-content: space-around;
  width: 100%;
  gap: 0.5rem;
}
.dashboard-container nav li {
  flex: 1 1 auto;
}
.dashboard-container nav a {
  padding: 11px 0;
  font-weight: 500;
  border-radius: 7px;
  background: linear-gradient(90deg, #f1f2f6 60%, #e6e9f0 100%);
  color: #5361b6;
  box-shadow: 0 1px 2px 0 rgba(100,110,140,0.06);
  margin: 0 2px;
  transition: all 0.17s;
}

.dashboard-container nav a:hover,
.dashboard-container nav a.active {
  background: linear-gradient(90deg, #7287fc 70%, #b4b6b8 100%);
  color: #fff;
}
#user-panel {
  color: #364fc7;
  background: #f4f6ff;
  padding: 7px 10px;
  margin-bottom: 18px;
  margin-top: -8px;
  border-radius: 8px;
  font-weight: 500;
}

/* Responsive : mobile bien lisible, zone réduite max, padding adapté */
@media (max-width: 500px) {
  .login-container, .dashboard-container {
    min-width: 0;
  }
  h1, h2 {
  }
  nav ul { flex-direction: column; gap: 0 }
  nav li { margin-bottom: 2px }
}

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 67px;
  background: var(--background-color);
  border-top: 1.5px solid #e3e2ef;
  display: flex;
  z-index: 22;
  box-shadow: 0 -2px 7px 0 rgba(80,85,120,0.09);
}

.bottom-nav .nav-btn {
  background: none;
  border: none;
  outline: none;
  flex: 1 1 0;
  color: var(--text-color1);
  text-align: center;
  padding: 4px 0 2px 0;
  cursor: pointer;
  transition: color 0.18s, background .15s;
  border-radius: 0;
  min-width: 0;
}
.bottom-nav .nav-btn.active,
.bottom-nav .nav-btn:active {
  color: #222 !important;
  background: #ecefff;
  font-weight: 600;
}
.bottom-nav .nav-btn span {
  display: block;
}
body { 
  padding-bottom:72px; 
  /*
  background-image: url(/img/fond.jpeg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;*/

} /* Pour éviter d'être masqué par la navbar sur mobile */

#dash-header{
  /* fixe en top du navigateur*/
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--background-color);
  color: var(--text-color1);
  border-bottom: 1.5px solid #e3e2ef;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  box-shadow: 0 -2px 7px 0 rgba(80,85,120,0.09);
  padding:10px;
}

#next-rencontre,.next-rencontre-card{
  margin-top:20px;
  padding:10px;
  background-color:var(--background-color2);
  color:var(--text-color1);
  border-radius: 8px;
  box-shadow: 0 2px 6px 0 rgba(150,150,180,0.10), 0 1.5px 5px 1px rgba(110,110,120,0.06);
}
span.leger{
  color: #888;
}
div.participationOk,
div.participationNok,
div.participationInterogation {
  display: inline-block;
  text-align: center;
  width:30px;
  line-height: 30px;
  margin-left: 5px;
  border-radius:5px;
  color:#fff;
  float:right;
}
div.participationOk {
  background-color: #3a8d3e;
}
div.participationNok {
  background-color: #be2222;
}
div.participationInterogation {
  background-color: #888;
}
button.present,
button.absent{
  border: none;
  padding: 5px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  height:30px;
}
button.present.active{
  background-color: #3a8d3e;
  color: #fff;
}
button.absent.active{
  background-color: #be2222;
  color: #fff;
}
hr{
  margin: 20px 0;
  border: none;
  border-top: 1px solid #e3e2ef;
}
#last-messages,#forum-list{
  margin-top: 20px;
  padding: 10px;
  background-color: var(--background-color2);
  color: var(--text-color1);
  border-radius: 8px;
  box-shadow: 0 2px 6px 0 rgba(150,150,180,0.10), 0 1.5px 5px 1px rgba(110,110,120,0.06);
}

#admin-badge{
  margin-left:10px;
  padding:2px 8px;
  border-radius:5px;
  background-color:var(--background-color2);
  color:var(--text-color1);
  font-size:0.9rem;font-weight:500;
}


.forum-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 15px;
}

.forum-msg {
  padding: 11px 14px;
  margin: 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  background-color:var(--background-color2);
  color:var(--text-color1);
  border-bottom:1px solid var(--background-color);
}

.forum-msg.alt {
  text-align:right;
}

.forum-msg-user {
  opacity:0.5;
  color: var(--text-color1);
  font-weight: 600;
  font-size: 1.02em;
}

.forum-msg-date {
  opacity:0.5;
  font-size: .93em;
  color: var(--text-color1);
  margin-left: 6px;
}

.forum-msg-content {
  margin-top: 3px;
  word-break: break-word;
}

.forum-img {
  max-width: 85px;
  max-height: 70px;
  border-radius: 8px;
  margin-top: 3px;
  cursor: pointer;
  border: 1.5px solid #ececec;
}

.forum-add { 
display: flex; align-items: flex-end; gap: 10px; width: 80%; 
margin-left:auto;
margin-right:auto;
margin-bottom: 0.65em;
}
.forum-add textarea {
width: 100%; border-radius: 12px;
padding: 13px 12px; font-size: 1em; margin-bottom: 7px;
border:1.8px solid #e2e6ef; resize:vertical;
}
.forum-add-img-label {
width: 100%; display: block; background: #e8f5fd; color: #2e71be; 
padding: 6px 0; text-align: center; border-radius: 8px; cursor:pointer; margin-bottom:3px;
}
.forum-add button[type="submit"], #add-rencontre-btn, #btn-add-user,.profil-form button,#btn-edit-player {
background: var(--primary-color); border: none; border-radius:13px;
color:var(--text-color2);font-weight:600;
margin-bottom:11px;
padding: 13px 20px;
}
#img-preview { width:98px;max-height:75px; border-radius:7px;margin-top:6px;margin-left:2px; }
@media (max-width: 520px){
.forum-add { flex-direction: column; align-items: stretch; }
.forum-add button[type="submit"] { width: 100%; margin: 0;}
}

/* Modale image */
#modal-img {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  justify-content: center;
  align-items: center;
  background: rgba(37, 41, 46, 0.95);
}

#modal-img img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 10px;
  border: 6px solid #fff;
}

#modal-img .close {
  position: absolute;
  top: 16px;
  right: 18px;
  background-color: #fff;
  color: #c46e2f;
  border: none;
  font-size: 2.1em;
  border-radius: 14px;
  padding: 2px 14px;
  cursor: pointer;
}

.forum-msg .forum-img {
  transition: box-shadow .17s;
}

.forum-msg .forum-img:hover {
  box-shadow: 0 4px 24px #9edfff;
}
.equipe-table{
  color:var(--text-color1);
}
.equipe-table th, .equipe-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--background-color);
}

.profil-form {max-width: 350px; margin-left:auto;margin-right:auto;}
.profil-form label {display:block; margin-bottom:3px;font-weight:500;}
.profil-form input, .profil-form select {
  padding:11px 12px;border-radius:8px;margin-bottom:12px;border:1.5px solid #dee1ec;
  font-size:1.04em; background:#fafbfe;}
.profil-form input[readonly] {background:#f3f3f3;color:#888;}

#profil-msg {margin-top:11px;font-size:.98em;}

#match-info{
  color:var(--text-color1);
}
#main-content h3,#present-list,#absent-list, #interro-list {
  color:var(--text-color1);
}

#player-info{
  margin-top: 20px;
  padding: 10px;
  background-color: var(--background-color2);
  color: var(--text-color1);
  border-radius: 8px;
  box-shadow: 0 2px 6px 0 rgba(150,150,180,0.10), 0 1.5px 5px 1px rgba(110,110,120,0.06);
}
#personal-info {
  margin-top: 20px;
  padding: 10px;
  background-color: var(--background-color2);
  color: var(--text-color1);
  border-radius: 8px;
  box-shadow: 0 2px 6px 0 rgba(150,150,180,0.10), 0 1.5px 5px 1px rgba(110,110,120,0.06);
}
#positions-info{
  margin-top: 20px;
  padding: 10px;
  background-color: var(--background-color2);
  color: var(--text-color1);
  border-radius: 8px;
  box-shadow: 0 2px 6px 0 rgba(150,150,180,0.10), 0 1.5px 5px 1px rgba(110,110,120,0.06);
}
#emergency-contact {
  margin-top: 20px;
  padding: 10px;
  background-color: var(--background-color2);
  color: var(--text-color1);
  border-radius: 8px;
  box-shadow: 0 2px 6px 0 rgba(150,150,180,0.10), 0 1.5px 5px 1px rgba(110,110,120,0.06);
}