/* ==========================================================================
   HelpDesk — Feuille de style globale
   ========================================================================== */

html {
  background-color: #0f172a;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  max-width: 900px;
  margin: 1.5rem auto;
  background-color: #1e293b;
  color: #f8fafc;
  border: 5px solid #94a3b8;
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  line-height: 1.5;
}

.barre-haut {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #334155;
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  gap: 1rem;
}

.titre-site {
  font-size: 1.6rem;
  font-weight: 700;
  color: #38bdf8;
  margin: 0 0 0.25rem 0;
}

.sous-titre {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0;
}

.barre-liens ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.barre-liens a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  background-color: #0284c7;
  padding: 0.6rem 1rem;
  margin: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.barre-liens a:hover {
  background-color: #334155;
  color: #38bdf8;
}

.centre-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.titre-partie {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  border-bottom: 1px solid #334155;
  padding-bottom: 0.4rem;
  margin: 0 0 0.75rem 0;
}

.fiche-ticket {
  background: #334155;
  border-left: 4px solid #f59e0b;
  padding: 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
}

.fiche-ticket.urgence {
  border-left-color: #ef4444;
}

.titre-probleme {
  font-size: 1.15rem;
  font-weight: bold;
  color: #f8fafc;
  margin: 0 0 0.35rem 0;
}

.meta-ticket {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0 0 0.75rem 0;
}

.description {
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 0.75rem 0;
}

.cote-page {
  background-color: #0f172a;
  border: 1px solid #334155;
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.75rem;
}

.bas-page {
  border-top: 1px solid #334155;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

.bas-page p {
  margin: 0.25rem 0;
}

/* Socle générique pour tableaux et formulaires (TP 2.1.3 & 2.2.1) */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; background-color: #0f172a; border: 1px solid #334155; font-size: 0.9rem; }
caption { caption-side: top; text-align: left; font-size: 0.85rem; font-weight: 600; color: #94a3b8; padding: 0.5rem 0.25rem; }
th, td { padding: 0.75rem 1rem; border: 1px solid #334155; text-align: left; }
thead th { background-color: #1e293b; color: #38bdf8; font-weight: 600; border-bottom: 2px solid #475569; }
tbody th[scope="row"] { background-color: rgba(30, 41, 59, 0.4); color: #e2e8f0; font-weight: 600; }
#incidents tbody tr:nth-child(even) { background-color: #1e293b; }
#incidents tbody tr:hover { background-color: #334155; }
.tableau-planning th, .tableau-planning td { text-align: center; }
form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
label { display: block; font-size: 0.9rem; font-weight: 500; color: #e2e8f0; margin-bottom: 0.25rem; }
input[type="text"], input[type="email"], select, textarea { width: 100%; max-width: 480px; box-sizing: border-box; font-family: inherit; font-size: 0.9rem; padding: 0.45rem 0.65rem; background-color: #0f172a; border: 1px solid #475569; border-radius: 4px; color: #f8fafc; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #f59e0b; }
input[type="email"]:invalid { border-color: #ef4444; }
.groupe-radios { display: flex; gap: 1.25rem; align-items: center; margin-top: 0.25rem; }
.groupe-radios label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; color: #cbd5e1; font-weight: normal; }
button[type="submit"] { align-self: flex-start; background-color: #0284c7; color: #fff; border: none; border-radius: 4px; padding: 0.55rem 1.2rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; }

#infos {
  border-left: 6px solid #38bdf8;
}

/* ==========================================================================
   Règles ajoutées au TP 2.3.1 (Sélecteurs avancés et pseudo-classes)
   ========================================================================== */

/* Mission 1 : Marquer le ticket le plus récent */
#incidents tbody tr:first-child {
  border-left: 5px solid #ef4444;
  background-color: rgba(239, 68, 68, 0.1);
}

/* Mission 2 : Distinguer le dernier lien du menu */
.barre-liens li:last-child a {
  background-color: #475569;
  border: 1px solid #94a3b8;
}

/* Mission 3 : Styliser le bouton radio sélectionné */
.groupe-radios input[type="radio"]:checked {
  accent-color: #38bdf8;
}

/* Mission 4 : Cibler le texte d'introduction sous le titre de section */
.titre-partie + p {
  color: #cbd5e1;
  font-style: italic;
}
