/* ---------- Couleurs et polices (à modifier ici seulement) ---------- */
:root {
  --page: #0b0d12;        /* fond de la page */
  --surface: #12151c;     /* fond des cartes */
  --code: #07080b;        /* fond des outputs */
  --border: #232834;      /* bordures discrètes */
  --border-hover: #3a4152;
  --text: #e8e8ea;        /* texte principal */
  --muted: #9097a3;       /* texte secondaire */
  --accent: #ffc300;      /* jaune, utilisé avec parcimonie */
  --green: #5cc98a;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

/* le navigateur met sa propre police sur <code> : on garde la nôtre */
code {
  font-family: var(--mono);
}

a {
  color: var(--text);
  text-decoration-color: var(--border-hover);
  text-underline-offset: 3px;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

/* ---------- Conteneur centré ---------- */
.window {
  max-width: 1840px;
  margin: 0 auto;
}

/* Tout le contenu 20 % plus petit (sauf sur mobile, où il faut rester lisible) */
@media (min-width: 601px) {
  .window {
    zoom: 0.8;
  }
}

.screen {
  padding: 96px 48px 48px;
}

/* ---------- Titres de section : petit libellé gris ---------- */
h2 {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

section {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

/* page sans en-tête (a-propos.html) : pas de trait ni de marge en haut */
main:first-child section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* ---------- En-tête ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

/* Photo ronde à droite du nom */
.avatar {
  width: 220px;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: 50%;
  object-fit: cover;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.accent {
  color: var(--muted);
  font-weight: 400;
}

.tagline {
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 1.15rem;
}

.status {
  margin: 0;
  color: var(--green);
  font-size: 0.95rem;
}

/* ---------- Boutons ---------- */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

/* Icônes GitHub / LinkedIn : prennent la couleur du texte */
.icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

/* bouton principal : plein, clair */
.btn-main {
  border-color: var(--text);
  background: var(--text);
  color: var(--page);
}

.btn-main:hover {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--page);
}

/* ---------- Texte ---------- */
#about p,
#contact p {
  color: var(--muted);
}

#about p {
  font-size: 1.1rem;
}

/* ---------- Photo (page à propos) ---------- */
.profile {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.profile p:first-child {
  margin-top: 0;          /* aligne le texte sur le haut de la photo */
}

.photo {
  width: 280px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* Page à propos : texte plus grand */
.about-page main p,
.about-page #about p {
  font-size: 1.2rem;
}

/* ---------- Compétences : libellé à gauche, tags à droite ---------- */
.stack {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px 24px;
  align-items: center;
  margin: 0;
}

.stack dt {
  color: var(--muted);
  font-size: 0.95rem;
}

.stack dd {
  margin: 0;
}

.stack .tags {
  margin: 0;
}

/* ---------- Page CV ---------- */
.cv-summary {
  max-width: 90ch;
  color: var(--muted);
}

.cv-contact {
  font-size: 0.95rem;
  color: var(--muted);
}

.cv-entry {
  margin-bottom: 28px;
}

/* titre à gauche, date à droite */
.cv-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
}

.cv-entry h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
}

.cv-entry h3 a {
  text-decoration: none;
}

.cv-tech {
  margin-left: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 400;
}

.cv-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.cv-list li::marker {
  content: "– ";
  color: var(--border-hover);
}

.cv-other {
  color: var(--muted);
}

.cv-page .stack dd {
  color: var(--text);
}

/* ---------- Tags ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

/* ---------- Cartes projets ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));   /* 3 colonnes égales */
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--border-hover);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
}

.card h3 a {
  text-decoration: none;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Output du programme dans la carte */
.terminal {
  flex: 1;                /* aligne le bas des cartes entre elles */
  margin: 0 0 16px;
  padding: 16px;
  background: var(--code);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #c9cdd4;
  font-family: var(--mono);
  font-size: 0.75rem;     /* 12px : la plus longue ligne (ft_irc) tient sans retour */
  line-height: 1.7;
  white-space: pre-wrap;  /* si l'écran est trop petit, la ligne passe à la ligne au lieu de défiler */
}

/* Capture d'écran affichée dans un output (fract-ol, cub3D) */
div.terminal {
  white-space: normal;    /* pas de pre-wrap : on ignore l'indentation du HTML */
}

.terminal img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 12px;
  border-radius: 4px;
}

.link {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.link:hover {
  color: var(--accent);
}

/* ---------- Parcours ---------- */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 32px 28px;
  border-left: 1px solid var(--border);
}

/* Petit point jaune sur la ligne */
.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.timeline h3 {
  margin: 4px 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Pied de page ---------- */
footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.copyright {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Tablette : 2 projets par ligne ---------- */
@media (max-width: 1500px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .hero {
    flex-direction: column-reverse;   /* photo au-dessus du nom */
    align-items: flex-start;
    gap: 24px;
  }
  .avatar {
    width: 120px;
    height: 120px;
  }
  .stack {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .stack dd {
    margin-bottom: 12px;
  }
  .profile {
    flex-direction: column;
    gap: 24px;
  }
  .screen {
    padding: 48px 16px 32px;
  }
  section {
    margin-top: 56px;
    padding-top: 32px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
}

/* Texte lu par Google et les lecteurs d'écran, mais invisible à l'écran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
