* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background: #fff;
  color: #111;
  line-height: 1.6;
}

body::-webkit-scrollbar {
  display: none;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.header{
  margin-top: -80px;
  width: 100%;
}

.hero {
  background-color: #f8f8f8;
  text-align: center;
  padding-top: 1rem;
  padding-bottom: 2rem;
}

.hero img {
  margin-top: 30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
}

.hero h1 {
  font-size: 2.5rem;
  margin: 1rem 0 0.5rem;
}

.hero h2 {
  font-size: 1.3rem;
  color: #555;
  margin-bottom: 1rem;
}

.hero p {
  color: #333;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.buttons a {
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  margin: 0 0.5rem;
  font-weight: 600;
  display: inline-block;
}

.btn-primary {
  background: #009dff;
  color: white;
}

.btn-secondary {
  background: #ffffff;
  color: #111;
  border: 1px solid #ccc;
}

section {
  margin-top: 4rem;
}

section h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.skills span {
  background: #009dff66;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  margin: 0.3rem;
  display: inline-block;
  transition: transform 0.2s ease-in-out;
  cursor: pointer;
}

.skills span:hover {
  transform: scale(1.1);
}



form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin-bottom: 3rem;
}


input, textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button {
  padding: 0.75rem;
  background: #009dff;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: 600;
}

.slider-wrapper {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
  position: relative;
  padding: 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30%; /* zone du dégradé à gauche */
  height: 100%;
  background: linear-gradient(to right, white 0%, transparent 100%);
  pointer-events: none; /* pour ne pas bloquer les clics ou scrolls */
  z-index: 2;
}

.slider-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(to left, white 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}


.projets-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 10px 20px;
  width: 100%;
  padding-left: 15%;
  scroll-padding-left: 15%;
}

.projets-container::-webkit-scrollbar {
  display: none;
}

.projets-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.projet {
  flex: 0 0 300px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.2s ease;
}

.projet:hover {
  transform: translateY(-5px);
}

.projet img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* page admin */
.admin-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
  color: #333;
}

.open-modal-btn {
  display: block;
  margin: 0 auto 20px;
  background-color: #3E7D97;
  color: white;
  padding: 10px 20px;
  border: none;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.open-modal-btn:hover {
  background-color: #2f657b;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: none; /* masqué par défaut */
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.close-modal:hover {
  color: #000;
}


.admin-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 20px;
}

.admin-card {
  width: 300px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease;
}

.admin-card:hover {
  transform: translateY(-5px);
}

.admin-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
}

.admin-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #111;
}

.admin-card p {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 15px;
  line-height: 1.4;
}

.admin-card p strong {
  font-weight: 600;
}

.admin-card-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: auto;
}

.btn-edit,
.btn-delete {
  height: 45px;           /* même hauteur */
  padding: 0 20px;        /* pas de padding vertical */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  color: white;
  cursor: pointer;
  text-align: center;
  line-height: 1;
}


.btn-edit {
  background-color: #e0b25c;
}

.btn-edit:hover {
  background-color: #c49c45;
}

.btn-delete {
  background-color: #c2463d;
}

.btn-delete:hover {
  background-color: #a8342b;
}

@media (max-width: 900px) {
  .admin-cards {
    flex-direction: column;
    align-items: center;
  }
}


@media (max-width: 500px) {
  .admin-cards {
    grid-template-columns: 1fr;
  }
}


.admin-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 0 20px;
}

/* Colonne gauche = projets */
.admin-left {
  flex: 3;
}

/* Colonne droite = boîte mail */
.admin-right {
  flex: 1.2;
  background-color: #f5f5f5;
  padding: 20px;
  border-left: 2px solid #ccc;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.05);
}

.admin-right h3 {
  margin-bottom: 1rem;
}

.message-card {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.message-card h4 {
  margin: 0;
  font-size: 1.05rem;
}

.message-card small {
  color: #555;
  font-size: 0.85rem;
}

.message-card p {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.message-card form {
  margin-top: 10px;
  text-align: right;
}

.message-card .btn-delete {
  background-color: #d9534f;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.message-card .btn-delete:hover {
  background-color: #b52b27;
}

.message-card {
  position: relative;
  background: #fff;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  max-width: 100%;
}

/* Bouton image suppression */
.delete-message-form {
  position: absolute;
  top: 8px;
  right: 8px;
}

.delete-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.delete-icon-btn img {
  width: 18px;
  height: 18px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.delete-icon-btn img:hover {
  opacity: 1;
}


/* Page Login */
.login-container {
  max-width: 400px;
  margin: 100px auto;
  background-color: #f4f4f4;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.login-container label {
  display: block;
  margin-top: 1rem;
}

.login-container input {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.5rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.login-container button {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.75rem;
  background-color: #3e7d97;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.login-container .error {
  color: red;
  margin-bottom: 1rem;
  text-align: center;
}


.logout-icon {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-block;
}

.logout-icon img {
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.logout-icon img:hover {
  opacity: 0.7;
}
