/* Reset et Base */
@import"https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap";
@import"https://fonts.googleapis.com/css2?family=Inter&display=swap";

:root {
  --bg-gradient-start: #02177a;
  --bg-gradient-end: #62007a;
  --main-text: #e4e4e4 ;
  --transparent-box: #ffffff21;
  --inactive-text:#e4e4e473;
  --title-font: "Bebas Neue";
  --body-font: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  min-height: 100vh;
  color: var(--main-text);
  margin: 0;
  padding: 20px;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--transparent-box);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

h1 {
  text-align: center;
  color: var(--main-text);
  margin-bottom: 20px;
  font-family: var(--title-font);
  letter-spacing: 2px;
}

h2 {
  color: var(--main-text);
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 10px;
  margin-top: 40px;
  margin-bottom: 20px;
  font-family: var(--title-font);
  letter-spacing: 2px;
}

h3 {
  margin-top: 0;
  color: #2980b9;
}

h5 {
  text-align: justify;
  font-size: 90%;
}

/* Formulaires Généraux */
.general-infos {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 15px;
  align-items: center;
  background: var(--transparent-box);
  padding: 20px;
  border-radius: 8px;
}

label {
  font-weight: 600;
  color: var(--main-text);
}

input, select {
  height: 40px;
  width: 100%;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
  background-color: transparent;
  border: 2px var(--main-text) solid;
  color: var(--main-text);
}

::-webkit-input-placeholder {
  color:var(--inactive-text);
}

::-moz-placeholder {
  color:var(--inactive-text);
}

::-ms-placeholder {
  color:var(--inactive-text);
}

::placeholder {
  color:var(--inactive-text);
}

input:focus {
  border-color: #00c51a;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Cartes des Questions */
.question {
  background: var(--transparent-box);
  border: 1px solid #e1e4e8;
  border-left: 5px solid #3498db;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  transition: transform 0.2s;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

/* Options */
.options {
  margin-left: 20px;
  padding-left: 20px;
  border-left: 2px solid #eee;
}

.option {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.option label {
  margin-right: 10px;
  margin-bottom: 0;
  min-width: 30px;
}

/* Boutons */
button {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 10px 20px;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

/* Bouton Ajouter (Primaire) */
.btn-add {
  color: #fff;
  background-color: #27ae60;
  border-color: #27ae60;
}

.btn-add:hover {
  background-color: #219150;
}

/* Bouton Secondaire (Options) */
.btn-secondary {
  background-color: #ecf0f1;
  color: #2c3e50;
  font-size: 0.9rem;
  padding: 6px 12px;
}

.btn-secondary:hover {
  background-color: #bdc3c7;
}

/* Bouton Générer (Action principale) */
.btn-generate {
  display: block;
  width: 100%;
  background-color: #2980b9;
  color: white;
  font-size: 1.2rem;
  padding: 15px;
  margin-top: 30px;
}

.btn-generate:hover {
  background-color: #1f6391;
}

/* Selecteur de Mode (Pillule) */
.mode-toggle {
  text-align: center;
  align-items: center;
  display: flex;
  justify-content: space-evenly;
  background: var(--transparent-box);
  border: 2px solid var(--main-text);
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
  height: 40px;
}

.mode-toggle input {
  display: none;
}

.mode-toggle label {
  padding: 10px 30px;
  width: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0;
  color: var(--main-text);
  font-weight: 600;
}

.mode-toggle input:checked + label {
  background: var(--main-text);
  color: var(--bg-gradient-start);
}

/* Output JSON */
#output {
  background: #2c3e50;
  color: #2ecc71;
  padding: 20px;
  border-radius: 8px;
  margin-top: 30px;
  white-space: pre-wrap;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
}

.info-icon {
  cursor: help;
  margin-left: 5px;
  font-style: normal;
  position: relative;
  display: inline-block;
}
.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
  margin-bottom: 5px;
}
.info-icon:hover::after {
  opacity: 1;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.btn-delete-q {
  background-color: #ff4d4d;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.btn-delete-q:hover {
  background-color: #ff3333;
}
.option {
  background-color: var(--transparent-box);
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #eee;
}

.intro-box {
  background: #ffffff2d;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  margin-bottom: 30px;
  color: #ffffff;
  line-height: 1.6;
}
.intro-welcome {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 25px;
  color: #ffffff;
}
.intro-columns {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.intro-card {
  flex: 1;
  min-width: 280px;
  background: #f8f9fa38;
  padding: 20px;
  border-radius: 8px;
  border-left: 5px solid #3498db;
}
.intro-card.rules {
  border-left-color: #e74c3c;
}
.intro-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.intro-card ul, .intro-card ol {
  padding-left: 20px;
  margin: 0;
}
.intro-card li {
  margin-bottom: 8px;
}
.intro-footer {
  text-align: center;
  margin-top: 25px;
  font-weight: 500;
  color: #27ae60;
  font-size: 1.1rem;
}