* { 
  box-sizing: border-box; 
}

body { 
  font-family: 'Courier New', Courier, monospace;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: linear-gradient(135deg, #d4a574 0%, #e8d5b7 100%);
  min-height: 100vh;
}

.container {
  background: #f9f6f0;
  border: 3px double #8b7355;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 0 20px rgba(0,0,0,0.05);
  position: relative;
}

.container::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1px solid #8b7355;
  pointer-events: none;
}

.header {
  text-align: center;
  border-bottom: 2px solid #8b7355;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

h1 { 
  font-family: 'Courier New', Courier, monospace;
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 3px;
  margin: 0 0 10px 0;
  color: #2c1810;
  text-transform: uppercase;
  text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
}

.subtitle {
  font-size: 14px;
  color: #6b5745;
  letter-spacing: 1px;
}

label { 
  display: block;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 2px;
  color: #2c1810;
  margin-bottom: 8px;
  margin-top: 20px;
}

textarea, input, select { 
  width: 100%;
  padding: 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 15px;
  background: #fff;
  border: 2px solid #8b7355;
  color: #2c1810;
  resize: vertical;
}

textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: #6b5745;
  box-shadow: 0 0 5px rgba(107,87,69,0.3);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b7355' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

textarea {
  line-height: 1.6;
}

.row { 
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

button { 
  padding: 14px 30px;
  font-size: 16px;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  background: #8b7355;
  color: #f9f6f0;
  border: 2px solid #6b5745;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: all 0.2s;
}

button:hover {
  background: #6b5745;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0,0,0,0.3);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#copyBtn {
  padding: 10px 20px;
  font-size: 14px;
  background: #6b5745;
  margin-left: auto;
}

#copyBtn:hover {
  background: #5a4835;
}

h2 {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #2c1810;
  border-top: 2px solid #8b7355;
  padding-top: 25px;
  margin-top: 30px;
  margin-bottom: 15px;
}

pre { 
  background: #fff;
  padding: 20px;
  white-space: pre-wrap;
  border: 3px double #8b7355;
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  line-height: 1.8;
  color: #2c1810;
  min-height: 100px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
  position: relative;
}

pre:empty::before {
  content: '⚡ Le télégramme apparaîtra ici...';
  color: #999;
  font-style: italic;
}

.muted { 
  color: #6b5745;
  font-size: 13px;
  letter-spacing: 1px;
}

.stamp {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 60px;
  height: 60px;
  border: 2px solid #8b7355;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transform: rotate(15deg);
  opacity: 0.4;
}
