* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f0e8;
  min-height: 100vh;
  padding: 20px;
}

.dashboard {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  color: #2c3e50;
  font-size: 2rem;
  font-weight: 400;
  font-style: italic;
}

.grid {
  display: grid;
  grid-template-columns: 180px 1fr 380px;
  grid-template-rows: auto auto;
  gap: 16px;
  grid-template-areas:
    "photo form calendar"
    "cv vaccin kpi";
}

.photo-section { grid-area: photo; }
.form-section { grid-area: form; }
.calendar-section { grid-area: calendar; }
.cv-section { grid-area: cv; }
.vaccin-section { grid-area: vaccin; }
.kpi-section { grid-area: kpi; }

.card {
  background: white;
  border: 2px solid #3498db;
  border-radius: 12px;
  padding: 16px;
}

/* Photo section */
.photo-section {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-container {
  width: 100%;
  height: 100%;
  min-height: 120px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cat-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: none;
}

#cat-photo.visible {
  display: block;
}

.photo-placeholder {
  text-align: center;
  color: #7f8c8d;
}

.photo-placeholder span {
  font-size: 2.5rem;
}

.photo-placeholder p {
  margin-top: 8px;
  font-size: 0.9rem;
}

.photo-placeholder.hidden {
  display: none;
}

/* Form section */
.form-section h2 {
  font-size: 1rem;
  color: #2c3e50;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #ecf0f1;
}

.form-section form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafafa;
}

.form-group input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
  background: white;
}

.form-group input::placeholder {
  color: #aaa;
  font-size: 0.85rem;
}

.form-section button {
  padding: 14px 20px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 4px;
}

.form-section button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.form-section button:active {
  transform: translateY(0);
}

/* Calendar section */

.calendar-section h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.year-calendar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.month-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-name {
  width: 45px;
  font-weight: 500;
  color: #2c3e50;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.month-bar {
  flex: 1;
  height: 16px;
  background: #ecf0f1;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.heat-segment {
  position: absolute;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  border-radius: 8px;
}

/* CV section */

.cv-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cv-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cv-field label {
  font-size: 0.8rem;
  color: #2c3e50;
  font-style: italic;
}

.cv-field input,
.cv-field select {
  padding: 6px 8px;
  border: 1px solid #bdc3c7;
  border-radius: 4px;
  font-size: 0.85rem;
  background: #f8f9fa;
  color: #2c3e50;
}

/* Vaccin section */
.vaccin-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vaccin-section h3 {
  color: #2c3e50;
  font-size: 1rem;
  font-weight: 500;
}

.vaccin-section input {
  padding: 10px;
  border: 2px solid #bdc3c7;
  border-radius: 8px;
  font-size: 1rem;
}

/* KPI section */
.kpi-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi label {
  color: #7f8c8d;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 2rem;
  color: #e74c3c;
  font-weight: 700;
}

.symptoms-kpi {
  margin-top: 8px;
}

.symptoms-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.symptom-tag {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.no-symptoms {
  color: #bdc3c7;
  font-style: italic;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  body {
    padding: 16px;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "photo form"
      "calendar calendar"
      "cv vaccin"
      "kpi kpi";
  }

  .card {
    padding: 14px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 12px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
    grid-template-areas:
      "photo"
      "form"
      "calendar"
      "kpi"
      "cv"
      "vaccin";
  }

  .card {
    padding: 16px;
    border-radius: 10px;
  }

  /* Photo mobile */
  .photo-section {
    min-height: 200px;
  }

  .photo-placeholder span {
    font-size: 3rem;
  }

  /* Form mobile */
  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .form-group input {
    padding: 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .form-section button {
    padding: 16px;
    font-size: 1rem;
  }

  /* Calendar mobile */
  .calendar-section {
    overflow-x: auto;
  }

  .year-calendar {
    min-width: 280px;
  }

  .month-row {
    gap: 6px;
  }

  .month-name {
    font-size: 0.65rem;
    width: 40px;
  }

  .month-bar {
    height: 14px;
  }

  /* KPI mobile */
  .kpi-section {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .kpi {
    flex: 1;
    min-width: 120px;
  }

  .kpi-value {
    font-size: 1.8rem;
  }

  .symptoms-kpi {
    flex-basis: 100%;
    margin-top: 0;
  }

  /* CV mobile */
  .cv-field input,
  .cv-field select {
    padding: 10px;
    font-size: 16px;
  }

  /* Vaccin mobile */
  .vaccin-section input {
    font-size: 16px;
    padding: 12px;
  }

  .vaccin-section h3 {
    font-size: 0.9rem;
  }
}

@media (max-width: 380px) {
  body {
    padding: 8px;
  }

  header h1 {
    font-size: 1.3rem;
  }

  .card {
    padding: 12px;
  }

  .kpi-value {
    font-size: 1.5rem;
  }
}
