/* --------------------------------------------------------------------------
   RESET GÉNÉRAL
--------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Utilisation des variables de thème */
:root {
  --bg-primary: #fff;
  --bg-secondary: #f9f9f9;
  --text-primary: #333;
  --text-secondary: #555;
  --accent-color: #e91e63;
  --header-bg: #fff;
  --card-bg: #f2f2f2;
  --card-shadow: rgba(0,0,0,0.1);
  --border-color: #333;
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --accent-color: #ff4081;
  --header-bg: #1a1a1a;
  --card-bg: #333333;
  --card-shadow: rgba(0,0,0,0.3);
  --border-color: #ffffff;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   HEADER
--------------------------------------------------------------------------- */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 40px;
  background: var(--header-bg);
  box-shadow: 0 2px 10px var(--card-shadow);
}

header .logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   SECTION PROJETS
--------------------------------------------------------------------------- */
.projects {
  padding: 2rem;
}

.projects .container {
  max-width: 1200px;
  margin: auto;
}

.projects h1 {
  font-size: 2.8rem;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.projects p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   GRILLE DES PROJETS
--------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   CARTE PROJET
--------------------------------------------------------------------------- */
.project-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-info {
  padding: 1.5rem;
}

.project-info h2 {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.project-info p {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 15px;
}

/* --------------------------------------------------------------------------
   TECH USED - BADGES DE TECHNOLOGIES
--------------------------------------------------------------------------- */
.tech-used {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-badge {
  background: var(--accent-color);
  color: var(--text-color);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
--------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .project-card img {
    height: 150px;
  }
  .project-info h2 {
    font-size: 1.3rem;
  }
  .project-info p {
    font-size: 0.9rem;
  }
  .tech-badge {
    font-size: 0.8rem;
  }
}

/* Bouton retour */
.back-button {
  position: fixed;
  top: 20px;
  left: 20px;
  padding: 10px 20px;
  background: var(--card-bg);
  color: var(--accent-color);
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 2px 8px var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--card-shadow);
}

.back-button::before {
  content: "←";
  font-size: 1.2em;
}

/* Styles pour la modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  position: relative;
  background: var(--card-bg);
  margin: auto;
  padding: 2rem;
  width: 90%;
  max-width: 800px;
  border-radius: 15px;
  max-height: 90vh;
  overflow-y: auto;
}

.close-modal {
  position: absolute;
  right: 1.5rem;
  top: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-color);
  transition: color 0.3s ease;
}

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

.modal-header {
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 2rem;
  color: var(--accent-color);
  margin-right: 2rem;
}

.modal-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.modal-tech-used {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.modal-tech-used .tech-badge {
  background: var(--accent-color);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-description {
  line-height: 1.6;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.modal-description ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.modal-description li {
  margin-bottom: 0.5rem;
}
