@import url('https://fonts.googleapis.com/css?family=Oswald:500&display=swap');
@import url('https://fonts.googleapis.com/css?family=Anton:400&display=swap');
@import url('https://fonts.googleapis.com/css?family=Open+Sans:600&display=swap');

body { 
  font-family: Arial, sans-serif; 
  background: #262551; 
  margin: 0; 
}

.container { 
  display: flex; 
  margin: 60px 0 40px 0; /* supprime auto pour aligner à gauche */
  margin-left: 40px;
  margin-right: 40px;
  background: #fff; 
  border-radius: 8px; 
  box-shadow: 0 2px 8px #0001; 
  justify-content: flex-start; /* aligne le contenu à gauche */
}

.player-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0001;
  padding: 20px;
  flex: 3 1 0%; /* occupe plus d'espace dans le flex */
  min-width: 320px;
  max-width: 1260px; /* permet d'utiliser toute la largeur disponible */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player { 
  aspect-ratio: 16/9;
  width: 100%;
  max-width: 1250px; /* vidéo encore plus large sur grands écrans */
  min-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player iframe {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  display: block;
}

.question-form { 
  background: #f9f9f9; 
  border-radius: 8px; 
  box-shadow: 0 2px 12px #0002; 
  padding: 30px; 
  width: 100%;
  max-width: 340px;
  margin-bottom: 50px;
  border-left: none;
  box-sizing: border-box; /* Ajouté pour garantir des paddings égaux à gauche et à droite */
}

.question-form-float {
  position: absolute;
  top: 60px;
  right: 40px;
  width: 340px;
  z-index: 10;
}

.question-form h2 { 
  margin-top: 0; 
  text-align: center;
}

.question-form input, .question-form textarea { 
  width: 100%; 
  margin-bottom: 10px; 
  padding: 8px; 
  border-radius: 4px; 
  border: 1px solid #ccc; 
  box-sizing: border-box; /* Ajouté pour garantir que le padding ne réduit pas l'espace à droite */
}

.question-form input {
  font-family: inherit;
  font-size: 14px;
}

.question-form textarea {
  font-family: inherit;
  font-size: 14px;
  resize: none;
  height: 200px;
}

.question-form button { 
  width: 100%; 
  padding: 10px; 
  background: #d6bb1e; 
  color: #fff; 
  border: none; 
  border-radius: 25px; 
  font-size: 16px; 
  cursor: pointer; 
  font-weight: bold;
  margin-top: 10px;
}

.question-form label {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-weight: bold;
}

.question-form button:hover { 
  background: #b49d1a; 
}

#formMessage { 
  margin-top: 15px; 
  color: green; 
  font-weight: bold; 
  text-align: center;
}

.admin-container { 
  max-width: 1200px; /* Augmente la largeur max pour lecture confortable */
  margin: 40px auto; 
  background: #fff; 
  border-radius: 8px; 
  box-shadow: 0 2px 8px #0001; 
  padding: 30px; 
}

#questions-list { 
  margin-top: 20px; 
}

.question-item { 
  padding: 15px; 
  border-bottom: 1px solid #eee; 
  display: flex; 
  align-items: flex-start; 
  justify-content: space-between; 
  margin-bottom: 10px; 
  line-height: 1.6; 
  word-break: break-word; /* cassage des mots trop longs avant débordement du conteneur */
}

.question-meta { 
  font-size: 13px; 
  color: #888; 
  display: block; 
  margin-top: 12px; 
}

.status-badge { 
  padding: 4px 10px; 
  border-radius: 12px; 
  font-size: 13px; 
  color: #fff; 
  margin-right: 10px; 
}

.status-0 { 
  background: #fff; 
  color: #333; 
  border: 1px solid #ccc; 
}

.status-1 { 
  background: #4caf50; 
}

.status-2 { 
  background: #2196f3; 
}

.status-3 { 
  background: #e53935; 
}

.status-actions { 
  min-width: 140px; 
  display: flex; 
  flex-direction: row; 
  justify-content: flex-end; 
  flex-shrink: 0; 
  gap: 6px; 
}

.status-actions button { 
  margin-left: 5px; 
  padding: 4px 8px; 
  border: none; 
  border-radius: 4px; 
  cursor: pointer; 
}

.status-actions .delete { 
  background: #e53935; 
  color: #fff; 
}

.status-actions .archive { 
  background: #888; 
  color: #fff; 
}

#loginForm input[type="password"] {
  margin-bottom: 15px;
}

.lang-switch {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0001;
  padding: 8px 18px;
  position: absolute;
  top: 30px;
  right: 40px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-switch a {
  text-decoration: none;
  color: #0078d7;
  font-weight: bold;
}

.mdm-logo {
  display: block;
  margin: 0 auto;
  max-width: 150px; /* Augmenté depuis 120px */
  height: auto;
}

.main-header {
  text-align: center;
  background: none;
  color: #edca00;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 1px;
  margin: 30px auto 30px auto;
  width: 100%;
  width: 900px;
  margin-left: auto;
  margin-right: auto;
  font-family: 'Anton', Arial, sans-serif;
  font-weight: 400;
}

.main-subtitle {
  color: #fff;
  font-size: 1.15rem;
  font-weight: normal;
  margin-top: 10px;
  letter-spacing: 0.5px;
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 600;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 30px;
  margin-bottom: 30px;
}

.main-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 48px;
  max-width: 1800px; /* augmente la largeur max du contenu principal */
  margin: 0 auto 40px auto;
  width: 100%;
}

body, html {
  min-width: 1000px;
  overflow-x: auto;
}

@media (max-width: 1000px) {
  body, html {
    min-width: 500px;
  }
  .main-content {
    flex-direction: column;
    align-items: center;
    gap: 32px; /* Ajoute un espace vertical entre les blocs */
  }
  .main-header {
    max-width: 500px;   /* Repassage à 500px sur petits écrans pour forcer le retour à la ligne */
  }
  .player-container, .form-container {
    min-width: 0;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .form-container {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .question-form {
    margin-bottom: 16px;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    display: block;
  }
  .mdm-logo {
    margin-top: 10px;
  }
  .question-form-float {
    position: static;
    width: 100%;
    margin: 30px auto 0 auto;
  }
  .container {
    max-width: 100%;
  }
  .container {
    margin-left: 10px;
    margin-right: 0;
    max-width: 100vw;
  }
}

.admin-container h2 {
  text-align: center;
}

#admin-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 340px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 12px #0002;
  padding: 30px;
}

#admin-login h2 {
  text-align: center;
  margin-top: 0;
}

#loginForm {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#loginForm input[type="password"] {
  width: 100%;
  margin-bottom: 15px;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

#loginForm button {
  width: 100%;
  padding: 10px;
  background: #d6bb1e;
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
  transition: background 0.2s;
}

#loginForm button:hover {
  background: #b49d1a;
}

#loginMessage {
  margin-top: 15px;
  color: #e53935;
  font-weight: bold;
  text-align: center;
}