/* ================= VARIABLES GLOBALES ================= */
/* Ici on définit toutes les couleurs principales du thème.
   Ça permet de modifier tout le design en changeant juste ces valeurs. */

:root {
  --bg: #0b1220;           /* Couleur de fond principale du site */
  --bg-alt: #0f1a2f;       /* Fond des sections alternées */
  --card: #16233d;         /* Fond des cartes (projets, profil, etc.) */
  --text: #f9fafc;         /* Couleur du texte principal */
  --muted: #acbcd4;        /* Texte secondaire / plus discret */
  --accent: #335bbf;       /* Couleur principale (boutons, éléments importants) */
  --accent-soft: #b9c5d7;  /* Variante plus douce du bleu */
  --border: rgba(255,255,255,0.06); /* Couleur des bordures */
}

/* ================= RESET CSS ================= */
/* On enlève les marges et paddings par défaut des navigateurs
   pour partir d’une base propre */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Inclut padding et border dans la largeur totale */
}

/* ================= STYLE GLOBAL DU BODY ================= */
/* Définit la police, le fond général et le style global */

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6; /* Espacement vertical entre lignes */
}

/* ================= CONTENEUR CENTRAL ================= */
/* Centre le contenu et limite la largeur max */

.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

/* ================= NAVBAR ================= */
/* Barre de navigation en haut */

.nav {
  position: sticky; /* Reste en haut quand on scroll */
  top: 0;
  backdrop-filter: blur(8px); /* Effet flou derrière */
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

/* Organisation interne de la navbar */
.nav-inner {
  display: flex;
  justify-content: space-between; /* Espace entre logo et liens */
  align-items: center;
  padding: 18px 0;
}

/* Nom dans la navbar */
.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  font-size: 18px;
  margin-left: 10px;
}

/* Liens de navigation */
.links a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--muted);
  transition: 0.3s;
}

/* Effet hover sur les liens */
.links a:hover {
  color: var(--text);
}

/* ================= HERO (SECTION PRINCIPALE) ================= */
/* Partie d’introduction avec ton nom */

.hero {
  padding: 80px 0;
}

/* Organisation en grille : texte + carte profil */
.hero-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
}

/* Ton nom en grand */
h1 {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  color: var(--text);
}

/* Sous-titre */
.subtitle {
  color: var(--muted);
  margin-bottom: 20px;
}

/* Petit paragraphe d’intro */
.intro {
  margin-bottom: 25px;
  max-width: 500px;
}

/* Conteneur des boutons */
.cta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* ================= BOUTONS ================= */

.btn {
  background: var(--accent);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

/* Effet au survol */
.btn:hover {
  opacity: 0.9;
  color: rgb(188, 232, 234);
}

/* Bouton transparent */
.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

/* Petit bouton (dans les cartes projets) */
.btn.small {
  padding: 8px 14px;
  font-size: 14px;
}

/* ================= CARTES ================= */
/* Utilisées pour projets, profil, compétences */

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  transition: 0.3s;
}


/* Carte profil */
.profile {
  background: var(--bg-alt);
  border: none;
  border-radius: 0;
  padding: 25px;
  box-shadow: none;
}



/* Texte de la carte profil */
.profile-text p {
  margin-bottom: 6px;
  color: var(--muted);
}

/* ================= SECTIONS ================= */
/* Espacement vertical entre sections */

.section {
  padding: 70px 0;
}

/* Sections avec fond alterné */
.section.alt {
  background: var(--bg-alt);
}

/* Titres de sections */
h2 {
  margin-bottom: 25px;
  font-size: 28px;
}

h3 {
  margin-bottom: 10px;
}

/* Listes (on enlève les puces) */
ul {
  list-style: none;
}

ul li {
  margin-bottom: 8px;
  color: var(--muted);
}
a {
  color: var(--text); 
  text-decoration: none;
}

a:hover {
  color: var(--accent); /* devient bleu au survol */
}


/* ================= GRID ================= */
/* Utilisée pour afficher les cartes en colonnes */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

/* ================= TAGS (technologies) ================= */

.tags {
  margin: 12px 0;
}

.tags span {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  margin-right: 6px;
}

/* ================= FOOTER ================= */

.footer {
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

/* ================= TEXTE DISCRET ================= */

.muted {
  color: var(--muted);
  margin-bottom: 20px;
}

/* ================= RESPONSIVE ================= */
/* Adaptation mobile */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr; /* Passe en colonne */
  }

  .grid {
    grid-template-columns: 1fr; /* 1 carte par ligne */
  }

  h1 {
    font-size: 32px; /* Nom plus petit sur mobile */
  }
}
