:root {
  --bg: #f8f9fb;
  --text: #1a1a1a;
  --accent: #007bff;
  --card-bg: #ffffff;
}

.logo{
  width: 3rem;
}

.nav-left{
  display: flex;
  align-items: center;
}
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: 0.3s;
}

.ibmi-text {
  color: #007bff; /* bleu harmonisé avec ton accent principal */
  font-weight: 600;
}


/* --- NAVBAR --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  background: var(--card-bg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 10;
}
.logoText {
  font-weight: 600;
  font-size: 2rem;
}
.nav-link {
  color: var(--text);
  text-decoration: none;
  margin-right: 1.5rem;
}
.nav-link:hover {
  color: var(--accent);
}

/* --- DARK MODE SWITCH --- */
.switch {
  position: relative;
  width: 45px;
  height: 25px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ccc;
  transition: 0.4s;
  border-radius: 30px;
}
.slider:before {
  content: "";
  position: absolute;
  height: 19px;
  width: 19px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.4s;
}
input:checked + .slider {
  background: var(--accent);
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* --- HERO --- */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem;
  text-align: center;
}
.hero-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.hero-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.hero-text h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.hero-text p {
  color: #555;
}
.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: white;
  border-radius: 25px;
  text-decoration: none;
  transition: 0.3s;
}
.btn:hover {
  background: #0056b3;
}

/* --- ABOUT --- */
.about {
  max-width: 900px;
  margin: auto;
  padding: 3rem 1rem;
  text-align: center;
  line-height: 1.7;
}

/* --- SKILLS --- */
.skills {
  background: #f1f3f6;
  padding: 3rem 1rem;
  text-align: center;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.skill-card {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: 0.3s;
}
.skill-card:hover {
  transform: translateY(-5px);
}
.skill-card img {
  width: 50px;
  display: block;
  margin: 0 auto 0.5rem;
}

/* --- PROJECTS --- */
.projects {
  padding: 3rem 1rem;
  text-align: center;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.project-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: 0.3s;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(255, 43, 44, 0.25);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.project-card h3 {
  margin: 1rem 0 0.5rem;
}
.project-card p {
  font-size: 0.9rem;
  padding: 0 1rem;
  color: #555;
}
.btn-small {
  display: inline-block;
  margin: 1rem auto;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 20px;
  transition: 0.3s;
  position: relative;
  z-index: 2;
}

.btn-small:hover {
  background: #0056b3;
}

.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* --- CONTACT --- */
.contact {
  background: #f1f3f6;
  padding: 3rem 1rem;
  text-align: center;
}
.contact form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
input, textarea {
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-family: inherit;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: #777;
}

/* --- DARK MODE --- */
body.dark {
  --bg: #1e1e2f;
  --text: #f1f1f1;
  --card-bg: #2a2a3d;
}

/* === SECTION COMPÉTENCES === */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}
.project-card {
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  text-align: center;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: scale(1.03);
}

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

.project-card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.3rem;
}

.project-card p {
  padding: 0 1rem 1rem;
  font-size: 0.95rem;
  color: #333;
}


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

.skill-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

/* Forcer max 5 logos par ligne */
@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* === SECTION PROJETS === */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Forcer 3 projets par ligne max */
@media (min-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

