*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #e5e5e5;
  color: #222;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: #f3f3f3;
  border-bottom: 1px solid #d0d0d0;
}

.site-header h1 {
  font-size: 1.4rem;
  text-align: center;
  margin: 0;
}

.site-header img {
  max-height: 48px;
}

main {
  max-width: 1100px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
}

.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.04);
}

.card h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1rem;
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

textarea {
  resize: vertical;
}

/* Tabs LV1 / LV2 */
.tabs {
  display: inline-flex;
  border-radius: 999px;
  background: #ddd;
  padding: 0.2rem;
}

.tab-button {
  border: none;
  background: transparent;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
}

.tab-button.active {
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Tab content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Accordéon */
.accordion {
  margin-bottom: 0.75rem;
}

.accordion summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.4rem 0;
}

.help-text {
  font-size: 0.85rem;
  color: #555;
}

/* Table grille */
.grid-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.grid-table th,
.grid-table td {
  border: 1px solid #ddd;
  padding: 0.35rem 0.4rem;
  vertical-align: top;
}

.grid-table th {
  background: #f7f7f7;
}

/* Scores */
.scores {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.4rem;
}

.score-final {
  font-weight: 600;
}

/* Commentaires + micro */
.comment-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.comment-wrapper textarea {
  flex: 1;
}

.mic-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #2ecc71; /* vert */
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  align-self: flex-start;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.mic-button.recording {
  background: #e74c3c; /* rouge */
}

.mic-help {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.4rem;
}

/* Actions */
.actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.actions button {
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  cursor: pointer;
  background: #444;
  color: #fff;
}

.actions button#print-btn {
  background: #c27b39; /* cuivré doux */
}

/* Info box LV2 */
.info-box {
  font-size: 0.85rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: #f7f2ec;
  border: 1px solid #e0c9a8;
}

/* Impression */
@media print {
  body {
    background: #ffffff;
  }
  .actions,
  .tabs,
  #mic-button {
    display: none !important;
  }
  .card {
    box-shadow: none;
    border-radius: 0;
    margin-bottom: 0.5rem;
  }
}

/* Tableau de conversion intégré */
.conversion-reminder {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f7f2ec;
  border: 1px solid #e0c9a8;
  border-radius: 10px;
  font-size: 0.8rem;
}

.conv-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.4rem;
}

.conv-table th,
.conv-table td {
  border: 1px solid #d0b890;
  padding: 0.2rem 0.4rem;
  text-align: center;
}

.conv-table th {
  background: #ede0cc;
}