/* Component styles - Boutons, formulaires, cartes, etc. */

/* Boutons */
.psu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid var(--psu-blue);
  border-radius: 4px;
  background: var(--psu-blue);
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 40px;
}

.psu-btn:hover {
  background: #0d47a1;
  border-color: #0d47a1;
  text-decoration: none;
  color: white;
}

.psu-btn:active {
  transform: translateY(1px);
}

.psu-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.psu-btn-secondary {
  background: white;
  color: var(--psu-blue);
  border-color: var(--psu-blue);
}

.psu-btn-secondary:hover {
  background: var(--psu-blue);
  color: white;
}

.psu-btn-outline {
  background: transparent;
  color: var(--psu-blue);
  border-color: var(--psu-blue);
}

.psu-btn-outline:hover {
  background: var(--psu-blue);
  color: white;
}

.psu-btn-danger {
  background: var(--psu-red);
  border-color: var(--psu-red);
}

.psu-btn-danger:hover {
  background: #c62828;
  border-color: #c62828;
}

.psu-btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  min-height: 32px;
}

.psu-btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  min-height: 48px;
}

/* Formulaires */
.psu-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.psu-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.psu-form-row {
  display: flex;
  gap: 1rem;
  align-items: end;
}

.psu-form-inline {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.psu-label {
  font-weight: 500;
  color: #333;
  margin-bottom: 0.25rem;
}

.psu-input,
.psu-select,
.psu-textarea {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.psu-input:focus,
.psu-select:focus,
.psu-textarea:focus {
  outline: none;
  border-color: var(--psu-blue);
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.2);
}

.psu-input.error,
.psu-select.error,
.psu-textarea.error {
  border-color: var(--psu-red);
}

.psu-input-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.psu-input-lg {
  padding: 0.75rem;
  font-size: 1rem;
}

.psu-checkbox,
.psu-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.psu-checkbox input,
.psu-radio input {
  margin: 0;
}

.psu-fieldset {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
}

.psu-legend {
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
}

/* Cartes */
.psu-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.psu-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.psu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.psu-card-title {
  font-weight: 600;
  color: #333;
}

.psu-card-body {
  color: #666;
}

.psu-card-footer {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Cartes de comparaison */
.psu-card--high {
  border-left: 5px solid #4caf50;
  background: linear-gradient(135deg, #f1f8e9 0%, #ffffff 100%);
}

.psu-card--med {
  border-left: 5px solid #ff9800;
  background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
}

.psu-card--low {
  border-left: 5px solid #f44336;
  background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
}

.psu-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  font-weight: 600;
}

.psu-card-head a {
  color: #1565c0;
  font-size: 0.95rem;
}

.psu-card-body {
  list-style: none;
  padding: 0.25rem 0 0;
  margin: 0;
  font-size: 0.9rem;
  color: #b71c1c;
}

.psu-card--high .psu-score {
  color: #2e7d32;
  font-weight: 700;
  font-size: 1.1rem;
}

.psu-card--med .psu-score {
  color: #f57c00;
  font-weight: 600;
}

.psu-card--low .psu-score {
  color: #d32f2f;
  font-weight: 600;
}

.psu-icon-x {
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  line-height: 18px;
  padding: 0;
  cursor: pointer;
  background: #fff;
}

/* Badges */
.psu-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 12px;
  text-transform: uppercase;
}

.psu-badge-primary {
  background: var(--psu-blue);
  color: white;
}

.psu-badge-secondary {
  background: #6c757d;
  color: white;
}

.psu-badge-success {
  background: var(--psu-green);
  color: white;
}

.psu-badge-danger {
  background: var(--psu-red);
  color: white;
}

.psu-badge-warning {
  background: #ff9800;
  color: white;
}

/* Tables */
.psu-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.psu-table th,
.psu-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.psu-table th {
  font-weight: 600;
  background: #f8f9fa;
  color: #333;
}

.psu-table tr:hover {
  background: #f8f9fa;
}

.psu-table-striped tr:nth-child(even) {
  background: #f8f9fa;
}

/* Alerts */
.psu-alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.psu-alert-info {
  background: #e3f2fd;
  border: 1px solid #2196f3;
  color: #0d47a1;
}

.psu-alert-success {
  background: #e8f5e8;
  border: 1px solid #4caf50;
  color: #2e7d32;
}

.psu-alert-warning {
  background: #fff3e0;
  border: 1px solid #ff9800;
  color: #e65100;
}

.psu-alert-danger {
  background: #ffebee;
  border: 1px solid #f44336;
  color: #c62828;
}
