/* RESET SIMPLE */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #050510;
  color: #f5f5f5;
  min-height: 100vh;
}

/* BOUTON CHANGEMENT MODE */
.mode-switch-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f5;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s ease, transform 0.1s ease;
}

.mode-switch-btn.secondary {
  background: transparent;
}

.mode-switch-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* TERMINAL MODE */

#terminal-wrapper {
  max-width: 960px;
  margin: 1.5rem auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: radial-gradient(circle at top left, #122033, #050510 50%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.75rem;
  background: linear-gradient(to right, #111827, #020617);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red {
  background: #f97373;
}

.dot.yellow {
  background: #facc15;
}

.dot.green {
  background: #22c55e;
}

.top-bar-title {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: rgba(249, 250, 251, 0.8);
}

#terminal-screen {
  padding: 0.75rem 0.9rem 1rem;
  font-family: "Fira Code", "JetBrains Mono", ui-monospace, SFMono-Regular,
    Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  background: radial-gradient(circle at top, #020617, #020617 45%, #000000);
  min-height: 360px;
}

#terminal-output {
  min-height: 260px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.line {
  white-space: pre-wrap;
  margin-bottom: 0.1rem;
}

.line.command {
  color: #e5e7eb;
}

.line.system {
  color: #a5b4fc;
}

.line.info {
  color: #22c55e;
}

.line.error {
  color: #f97373;
}

.line.muted {
  color: #6b7280;
}

.prompt {
  color: #22c55e;
  margin-right: 0.3rem;
}

#terminal-form {
  display: flex;
  align-items: center;
  margin-top: 0.35rem;
}

#terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f9fafb;
  font-family: inherit;
  font-size: 0.9rem;
}

/* SCROLLBAR */
#terminal-output::-webkit-scrollbar {
  width: 6px;
}
#terminal-output::-webkit-scrollbar-track {
  background: transparent;
}
#terminal-output::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

/* GUI MODE */

.hidden {
  display: none;
}

#gui-wrapper {
  max-width: 1120px;
  margin: 1.5rem auto;
  background: #020617;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

/* HEADER (barre du haut) - propre + responsive */
.gui-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  background: radial-gradient(circle at top left, #1e293b, #020617);
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.gui-header-left h1 {
  font-size: 1.9rem;
  margin-bottom: 0.35rem;
}

.gui-header-left p {
  color: #cbd5f5;
  font-size: 0.95rem;
}

/* Zone droite = menu + bouton */
.gui-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  min-width: 420px;
}

/* Menu */
.gui-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.gui-header nav a {
  text-decoration: none;
  color: #e5e7eb;
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}

.gui-header nav a:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.35);
  transform: translateY(-1px);
}

/* Bouton mode terminal : aligné à droite */
.gui-header-right .mode-switch-btn {
  align-self: flex-end;
}

/* Responsive */
@media (max-width: 920px) {
  .gui-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .gui-header-right {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
  }

  .gui-header nav {
    justify-content: flex-start;
  }

  .gui-header-right .mode-switch-btn {
    align-self: flex-start;
  }
}


.gui-main {
  padding: 1.75rem;
}

.gui-section + .gui-section {
  margin-top: 1.75rem;
}

.gui-section h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid #22c55e;
  padding-left: 0.6rem;
}

.gui-section p {
  margin-bottom: 0.6rem;
  color: #e5e7eb;
  line-height: 1.5;
}

.gui-section ul {
  margin-left: 1.25rem;
  color: #e5e7eb;
}

.gui-section ul li {
  margin-bottom: 0.3rem;
}

/* SKILLS GRID */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.skill-card {
  background: #020617;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 0.9rem;
}

.skill-card h3 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
  color: #bfdbfe;
}

/* PROJECTS */
.project-card {
  margin-top: 0.85rem;
  padding: 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #020617;
}

.project-card h3 {
  margin-bottom: 0.3rem;
  color: #bfdbfe;
}

.project-card p {
  margin-bottom: 0.4rem;
}

/* TAGS PROJETS */
.project-tags {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: #9ca3af;
  font-style: italic;
}

/* TIMELINE */
.timeline {
  border-left: 2px solid rgba(148, 163, 184, 0.6);
  margin-top: 0.5rem;
  padding-left: 1.25rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.1rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.2rem;
  top: 0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.timeline-year {
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 0.2rem;
}

/* CONTACT */
.contact-list {
  margin-top: 0.4rem;
}

/* FOOTER */
.gui-footer {
  padding: 0.8rem 1.75rem 1.3rem;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  #terminal-wrapper,
  #gui-wrapper {
    margin: 0.8rem;
  }

  .gui-main {
    padding: 1.2rem;
  }

  .gui-header {
    align-items: flex-start;
  }

  .gui-header-right {
    align-items: flex-start;
  }
}

.contact-link {
  color: #bfdbfe;
  text-decoration: none;
  border-bottom: 1px dashed rgba(191, 219, 254, 0.6);
}

.contact-link:hover {
  border-bottom-style: solid;
}

/* VEILLE CYBER */
.veille-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 0.9rem;
}

.veille-card {
  background: #020617;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 1rem;
}

.veille-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.veille-card h3 {
  font-size: 1rem;
  color: #bfdbfe;
  line-height: 1.25;
}

.pill {
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: rgba(34, 197, 94, 0.95);
  white-space: nowrap;
}

.veille-sources {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: #9ca3af;
  font-style: italic;
}

.veille-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #cbd5f5;
}

/* Force certaines sections à prendre toute la largeur si gui-main est un grid */
#section-veille,
#section-bts,
#section-parcours,
#section-contact,
#section-projets,
#section-competences,
#section-accueil {
  grid-column: 1 / -1;
}
