* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

.hidden{
  display: none !important; 
}

body {
  background-color: #f5f5f5;
  color: #1a1a1a;
}


h2{
  margin-bottom: 1rem;
}


header nav {
  display: flex;
  align-items: center;   
  justify-content: space-between;
  padding: 2rem 1rem;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}


.logo{
  font-size: 1.5rem;
  font-weight: bold;
  margin-left: 1rem;
}

header nav img {
  margin-right: 1rem;
  max-width: 60%;
  height: auto;
}

header nav ul {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
  gap: 2rem;
  list-style: none;
  background: #ffffff;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

header nav ul li a {
  text-decoration: none;
  color: #1a1a1a;
  font-weight: 600;
  text-transform: uppercase;
}

header nav ul li a:focus {
  border-bottom: 2px solid #000000;
}

header.sticky {
  position: sticky;
  top: 0;
  z-index: 100;
}

section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: auto;
  padding-top: 50px;
}

#a-propos {
  padding: 4rem 2rem;
}

.a-propos-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.a-propos-container .photo {
  flex: 1 1 250px;
  text-align: center;
}

.a-propos-container .photo img {
  width: 100%;
  max-width: 300px;
  border-radius: 5%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.a-propos-container .texte {
  flex: 2 1 300px;
}

.a-propos-container .texte p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.boutons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  background-color: black;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s;
}

.btn:hover {
  background-color: #444;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid black;
  color: black;
}

.btn-outline:hover {
  background-color: black;
  color: white;
}

.grid-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 1rem 1rem 0;
}

.grid-btn {
  background: #eee;
  border: none;
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 1.2rem;
}

.grid-btn.active {
  background: #333;
  color: white;
}

.projects-grid[data-cols="3"] {
  grid-template-columns: repeat(3, 1fr);
}

.projects-grid {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem;
  transition: all 0.3s ease;
}

.projects-grid[data-cols="2"] {
  grid-template-columns: repeat(2, 1fr);
}

.projects-grid[data-cols="3"] {
  grid-template-columns: repeat(3, 1fr);
}

.projects-grid[data-cols="4"] {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive : repasse à 1 colonne sur mobile */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr !important;
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.project-card {
  background: #fff;
  border-radius: 5%;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: scale(1.02);
}

.project-card img {
  width: 100%;
  display: block;
}

.project-info {
  padding: 1rem;
}

#competences {
  padding: 2rem;
  background-color: #f9f9f9;
}

.instruction {
  font-style: italic;
  font-size: 0.95rem;
  color: #777;
  margin-bottom: 1rem;
}

.skills {
  max-width: 600px;
  margin: 0 auto;
}

.skill {
  margin-bottom: 1rem;
}

.skill span {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.skill .description {
  transition: max-height 0.4s ease;
  overflow: hidden;
}

.arrow {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.skill .arrow.rotate {
  transform: rotate(180deg);
}

.bar {
  background-color: #ddd;
  border-radius: 5px;
  overflow: hidden;
  height: 20px;
}

.progress_comp {
  height: 100%;
  background-color: #4CAF50;
  border-radius: 5px;
}

.progress_conc {
  height: 100%;
  background-color: #2196F3;
  border-radius: 5px;
}

.progress_expr {
  height: 100%;
  background-color: #F44336;
  border-radius: 5px;
}

.progress_deve {
  height: 100%;
  background-color: #9C27B0;
  border-radius: 5px;
}

.progress_entre {
  height: 100%;
  background-color: #FF9800;
  border-radius: 5px;
}

.project-counter {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: bold;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  line-height: 1.2;
}

.color-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  vertical-align: middle; 
}


.tag-developper { background-color: #9C27B0; }
.tag-exprimer   { background-color: #F44336; }
.tag-concevoir  { background-color: #2196F3; }
.tag-comprendre { background-color: #4CAF50; }
.tag-entreprendre { background-color: #FF9800; }



.description {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  font-size: 0.95rem;
  margin-top: 10px;
  color: #555;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #ffffff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

form input, form textarea {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

form button {
  background-color: #1a1a1a;
  color: white;
  border: none;
  padding: 1rem;
}


form button:hover {
  background-color: #333;
}

.tags {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  display: flex;
  align-items: center;
  gap: 0.4em;
  background-color: #eee;
  border-radius: 1rem;
  padding: 0.3em 0.8em;
  font-size: 0.85rem;
  font-weight: 500;
  color: #333;
}

.tag::before {
  content: "";
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  display: inline-block;
}

.tag-developper::before { background-color: #8c2eca; }
.tag-concevoir::before { background-color: #2f52c5; }
.tag-exprimer::before { background-color: #c93232; }
.tag-comprendre::before { background-color: #39c03d; }
.tag-entreprendre::before { background-color: #ecb82a; }

#hero {
  width: auto;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #ffffff;
  padding: 2rem;
}



.hero-content h1 {
  font-size: 4rem;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.25rem;
  color: #555;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  background: #1a1a1a;
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 2rem;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease;
}

.cta-button:hover {
  background: #333;
}

#scrollToTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

#scrollToTopBtn.show {
  opacity: 1;
  pointer-events: auto;
}

#scrollToTopBtn:hover {
  background-color: #555;
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 600px) {
  #scrollToTopBtn {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

footer {
  color: black;
  text-align: center;
  margin-bottom: 1rem;
}

#modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow : auto;
  scrollbar-width: thin;
  scrollbar-color: #bbb #f0f0f0; 
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

#modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

#modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

#modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Webkit (Chrome, Safari, Edge) */
.modal::-webkit-scrollbar {
  width: 8px;
}

.modal::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

.modal::-webkit-scrollbar-thumb {
  background-color: #bbb;
  border-radius: 10px;
  border: 2px solid #f0f0f0; /* Pour un effet creux */
}

.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-track img {
  width: 100%;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;        
  padding: 0;             
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 1rem;
}

.carousel-btn.next {
  right: 1rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.form-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  color: #333;
  padding: 1.2rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  font-weight: 500;
  font-size: 1rem;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  max-width: 90%;
  text-align: center;
}

.form-message.success {
  border-left: 5px solid #4CAF50;
  color: #155724;
  background-color: #d4edda;
}

.form-message.error {
  border-left: 5px solid #F44336;
  color: #721c24;
  background-color: #f8d7da;
}

.form-message.show {
  opacity: 1;
  pointer-events: auto;
  animation: fadeInUp 0.4s ease;
}