/* =====================
   CONFIG & VARIABLES
===================== */
:root {
  --primary-color: #0f172a;   /* Bleu nuit très sombre */
  --secondary-color: #334155; /* Gris bleuté */
  --accent-color: #0ea5e9;    /* Bleu électrique (Tech) */
  --bg-color: #f1f5f9;        /* Gris très clair */
  --text-color: #333;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif;
  margin: 0;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* =====================
   HEADER & NAVIGATION
===================== */
header {
  background: var(--primary-color);
  color: var(--white);
  padding: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  padding: 5px 0;
  position: relative;
}

nav a:hover {
  color: var(--accent-color);
}

/* Petit effet de ligne sous le lien au survol */
nav a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s;
}
nav a:hover::after {
  width: 100%;
}

/* =====================
   CONTENU PRINCIPAL
===================== */
main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  min-height: 80vh; /* Pour que le footer reste en bas */
}

h2 {
  color: var(--secondary-color);
  border-left: 5px solid var(--accent-color);
  padding-left: 15px;
  margin-top: 40px;
}

/* =====================
   HERO SECTION (Pour l'accueil)
===================== */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
  border-radius: 12px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.hero h2 {
  color: white;
  border: none;
  padding: 0;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* =====================
   CARTES & GRILLES
===================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive auto */
  gap: 25px;
}

.card {
  background: var(--white);
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e2e8f0;
  height: 100%; /* Uniformise la hauteur */
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-top: 0;
  color: var(--primary-color);
}

/* Liens sur les cartes */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-link:hover .card {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-color);
}

/* =====================
   LISTES & IMAGES
===================== */
ul {
  padding-left: 20px;
}

ul li {
  margin-bottom: 8px;
}

.img-project {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

/* =====================
   BOUTONS & CONTACT
===================== */
.contact-section {
  text-align: center;
  padding: 50px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.btn-linkedin {
  display: inline-block;
  background-color: #0077b5;
  color: white;
  padding: 12px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background 0.3s;
  margin-top: 20px;
}

.btn-linkedin:hover {
  background-color: #005582;
}

/* =====================
   FOOTER
===================== */
footer {
  background: var(--primary-color);
  color: #94a3b8;
  text-align: center;
  padding: 20px;
  margin-top: 60px;
  font-size: 0.9rem;
}

/* =====================
   RESPONSIVE MOBILE
===================== */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    text-align: center;
  }
  
  nav {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
}