/* ═══════════════════════════════════════════════════════
   VARIABLES CSS — Toutes les couleurs et valeurs en un seul endroit
   💡 Change les couleurs ici pour re-themer tout le site !
═══════════════════════════════════════════════════════ */
:root {
  --color-bg: #0d0d0d;
  --color-bg-alt: #141414;
  --color-surface: #1a1a1a;
  --color-border: #2a2a2a;

  --color-accent: #c8f04a;       /* Vert-jaune : couleur principale */
  --color-accent-dim: #a8cc30;   /* Variante sombre pour les hovers */

  --color-text: #f0ede6;         /* Blanc cassé pour le texte principal */
  --color-text-muted: #888;      /* Gris pour les textes secondaires */

  --font-display: 'DM Serif Display', serif;   /* Police des titres */
  --font-body: 'DM Sans', sans-serif;          /* Police du corps de texte */

  --radius: 12px;
  --radius-sm: 6px;
  --transition: 0.25s ease;

  /* Espacements cohérents sur tout le site */
  --section-padding: 100px 0;
  --container-width: 1100px;
}

/* ═══════════════════════════════════════════════════════
   RESET — Supprime les styles par défaut des navigateurs
═══════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;  /* Inclut padding et border dans la largeur */
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* Défilement fluide pour les liens ancre (#) */
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden; /* Empêche le scroll horizontal */
}


/* ═══════════════════════════════════════════════════════
   UTILITAIRES — Classes réutilisables partout
═══════════════════════════════════════════════════════ */

/* Le container centre le contenu et le limite en largeur */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Version étroite pour les formulaires */
.container-narrow {
  max-width: 680px;
}

/* Sections génériques */
.section {
  padding: var(--section-padding);
}

/* Fond légèrement différent pour alterner les sections */
.section-alt {
  background-color: var(--color-bg-alt);
}

/* Petite étiquette au-dessus des titres de section */
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

/* Titre de section */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px); /* S'adapte à la largeur de l'écran */
  line-height: 1.1;
  margin-bottom: 48px;
}


/* ═══════════════════════════════════════════════════════
   BOUTONS
═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
}

/* Bouton principal : fond vert-jaune */
.btn-primary {
  background-color: var(--color-accent);
  color: #0d0d0d;
}
.btn-primary:hover {
  background-color: var(--color-accent-dim);
  transform: translateY(-2px); /* Légère élévation au survol */
}

/* Bouton secondaire : bordure */
.btn-secondary {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-secondary:hover {
  border-color: var(--color-text-muted);
  transform: translateY(-2px);
}

/* Bouton outline (CV) */
.btn-outline {
  background-color: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.btn-outline:hover {
  background-color: var(--color-accent);
  color: #0d0d0d;
}

/* Petit bouton pour les cartes projets */
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-sm);
}
.btn-sm:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Variante fantôme (texte seul) */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover {
  color: var(--color-text);
  background: transparent;
}

/* Bouton pleine largeur pour le formulaire */
.btn-full { width: 100%; justify-content: center; }


/* ═══════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════ */
.nav {
  position: fixed; /* Reste en haut même quand on scroll */
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  /* backdrop-filter crée un effet verre dépoli */
  backdrop-filter: blur(12px);
  background-color: rgba(13, 13, 13, 0.85);
  border-bottom: 1px solid var(--color-border);
  transition: padding var(--transition);
}

/* Quand on scroll, la nav rétrécit un peu (géré par JS) */
.nav.scrolled {
  padding: 12px 40px;
}

/* Logo / initiales */
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  text-decoration: none;
  color: var(--color-text);
}
.nav-logo span {
  color: var(--color-accent); /* Le point en couleur accent */
}

/* Liste des liens de navigation */
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 14px;
  transition: color var(--transition);
}
.nav-links a:hover {
  color: var(--color-accent);
}

/* Bouton hamburger (visible seulement sur mobile) */
.nav-toggle {
  display: none; /* Caché sur desktop */
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}


/* ═══════════════════════════════════════════════════════
   HERO — Section d'accueil
═══════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh; /* Prend toute la hauteur de l'écran */
  display: flex;
  align-items: center;
  padding: 120px 40px 60px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: var(--container-width);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1; /* Au-dessus des décorations */

  /* Animation d'entrée : fade + montée depuis le bas */
  animation: fadeUp 0.8s ease both;
}

/* Badge "disponible" en haut du hero */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-accent);
  margin-bottom: 24px;
  padding: 6px 14px;
  border: 1px solid rgba(200, 240, 74, 0.3);
  border-radius: 100px;
}
/* Le petit point vert qui pulse */
.hero-tag::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s infinite; /* Animation infinie définie plus bas */
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1.0;
  margin-bottom: 24px;
}

/* Le prénom en italique avec la police serif */
.hero-title em {
  font-style: italic;
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap; /* Sur mobile, les boutons passent à la ligne */
}

/* ——— Décorations du hero (cercles en arrière-plan) ——— */
.hero-deco {
  position: absolute;
  inset: 0; /* Couvre tout le hero */
  pointer-events: none; /* On peut cliquer à travers */
}

/* Chaque cercle est positionné de façon absolue */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(200, 240, 74, 0.07);
}
.c1 { width: 600px; height: 600px; right: -100px; top: -100px; }
.c2 { width: 400px; height: 400px; right: 100px; top: 100px; border-color: rgba(200, 240, 74, 0.05); }
.c3 { width: 200px; height: 200px; right: 250px; top: 250px; border-color: rgba(200, 240, 74, 0.12); background: rgba(200, 240, 74, 0.03); }


/* ═══════════════════════════════════════════════════════
   SECTION À PROPOS
═══════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Deux colonnes égales */
  gap: 60px;
  align-items: start;
}

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

/* Grille des stats (3 cartes côte à côte) */
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition);
}
.stat-card:hover {
  border-color: var(--color-accent);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--color-accent);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--color-text-muted);
}


/* ═══════════════════════════════════════════════════════
   SECTION COMPÉTENCES
═══════════════════════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.skill-category {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}

.skill-category h3 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 24px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-name {
  font-size: 14px;
  color: var(--color-text);
}

/* Barre de compétence : la largeur est définie via --w dans le HTML */
.skill-bar {
  height: 4px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  width: var(--w); /* Récupère la valeur de --w définie inline dans le HTML */
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dim));
  border-radius: 4px;
  /* Animation : la barre se remplit progressivement au chargement */
  animation: fillBar 1.2s ease both;
  animation-delay: 0.3s;
}


/* ═══════════════════════════════════════════════════════
   SECTION PROJETS
═══════════════════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden; /* Clip l'image dans les coins arrondis */
  transition: transform var(--transition), border-color var(--transition);
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(200, 240, 74, 0.3);
}

/* Zone image du projet */
.project-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Couleurs différentes pour chaque projet */
.project-img-1 { background: linear-gradient(135deg, #1a2a1a, #2a4a2a); }
.project-img-2 { background: linear-gradient(135deg, #1a1a2a, #2a2a4a); }
.project-img-3 { background: linear-gradient(135deg, #2a1a1a, #4a2a2a); }

.project-img-placeholder {
  font-family: var(--font-display);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.2);
}
/* 💡 Pour mettre une vraie image :
   <img src="assets/screenshot-meteo.png" alt="App météo" class="project-screenshot" />
   Ajoute en CSS : .project-screenshot { width: 100%; height: 100%; object-fit: cover; }
*/

.project-info {
  padding: 20px;
}

/* Tags technos sur chaque projet */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.tag {
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(200, 240, 74, 0.08);
  color: var(--color-accent);
  border-radius: 4px;
  border: 1px solid rgba(200, 240, 74, 0.2);
}

.project-info h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.project-info p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-links {
  display: flex;
  gap: 10px;
}


/* ═══════════════════════════════════════════════════════
   SECTION CONTACT
═══════════════════════════════════════════════════════ */
.contact-intro {
  font-size: 18px;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  margin-top: -24px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Deux champs côte à côte */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Style des champs de formulaire */
.form-group input,
.form-group textarea {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  transition: border-color var(--transition);
  resize: vertical; /* Pour le textarea : redimensionnable verticalement */
  outline: none;
}
/* Quand le champ est focalisé (cliqué) */
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200, 240, 74, 0.1);
}

/* Message d'erreur de validation (affiché par JS) */
.error-msg {
  font-size: 12px;
  color: #ff6b6b;
  min-height: 16px; /* Réserve l'espace même quand vide */
}

/* Message de succès (caché par défaut) */
.form-success {
  display: none; /* JS change ça en flex */
  padding: 16px;
  background: rgba(200, 240, 74, 0.1);
  border: 1px solid rgba(200, 240, 74, 0.3);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  text-align: center;
  font-size: 14px;
}

/* Liens réseaux sociaux sous le formulaire */
.social-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.social-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 14px;
  transition: color var(--transition);
}
.social-links a:hover {
  color: var(--color-accent);
}


/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
.footer {
  text-align: center;
  padding: 32px;
  font-size: 13px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}


/* ═══════════════════════════════════════════════════════
   ANIMATIONS KEYFRAMES
   (définition des animations utilisées plus haut)
═══════════════════════════════════════════════════════ */

/* Apparition depuis le bas avec fade */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulsation du point vert dans le badge hero */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.6; }
}

/* Remplissage des barres de compétences */
@keyframes fillBar {
  from { width: 0; }
  to   { width: var(--w); }
}


/* ═══════════════════════════════════════════════════════
   RESPONSIVE — Adaptations pour tablette et mobile
   💡 "max-width" = styles appliqués EN DESSOUS de cette largeur
═══════════════════════════════════════════════════════ */

/* ——— Tablette (≤ 900px) ——— */
@media (max-width: 900px) {
  .about-grid       { grid-template-columns: 1fr; }
  .about-stats      { grid-template-columns: repeat(3, 1fr); }
  .skills-grid      { grid-template-columns: 1fr; }
  .projects-grid    { grid-template-columns: 1fr 1fr; }
}

/* ——— Mobile (≤ 600px) ——— */
@media (max-width: 600px) {
  /* Navigation : affiche le hamburger, cache les liens */
  .nav-links    { display: none; }
  .nav-toggle   { display: flex; }

  /* Quand le menu est ouvert (classe ajoutée par JS) */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    align-items: center;
    justify-content: center;
    gap: 40px;
    font-size: 24px;
    z-index: 99;
  }

  .hero         { padding: 100px 24px 60px; }
  .form-row     { grid-template-columns: 1fr; }
  .projects-grid{ grid-template-columns: 1fr; }
  .about-stats  { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; }
  .btn          { text-align: center; justify-content: center; }
}
