@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* === GLOBAL === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: auto;
  margin: 0;
  padding: 0;
  font-family: "Poppins", "Segoe UI", Roboto, Arial, sans-serif;
  color: #fff;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: scroll; /* ✅ scroll fluide */
  -webkit-overflow-scrolling: touch; /* ✅ inertie fluide mobile */
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: linear-gradient(rgba(0,40,60,0.1), rgba(0,40,60,0.1)),
              url("assets/images1.jpeg") no-repeat center center;
  background-size: cover;
  background-color: #00283c;
  background-attachment: scroll;
  transition: background 0.3s ease;
}

/* ✅ effet fixe seulement sur grand écran */
@media (min-width: 769px) {
  body {
    background-attachment: fixed;
  }
}

/* ✅ Scroll doux sur toutes plateformes */
html {
  scroll-behavior: smooth;
}

/* ✅ Suppression barre de scroll sans bug */
html::-webkit-scrollbar, 
body::-webkit-scrollbar {
  display: none;
}

/* === ACCUEIL === */
#home {
  text-align: center;
  padding: 25px 15px;
  font-size: 14px;
}

.welcome-text,
.action-container {
  opacity: 1;
  transform: none;
  margin-top: 0px;
}

.action-container {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin-top: 30px;
  margin-bottom: 15px;
}

.action-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.2s ease;
  position: relative;
  z-index: 3;
}

.action-icon i {
  font-size: 1.7rem;
  margin-bottom: 5px;
}

.action-icon:hover {
  background: rgba(0, 212, 255, 0.01);
  color: #00d4ff;
}

/* === FORMULAIRES === */
#formContainer {
  position: relative;
  overflow: hidden;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.form-wrapper {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  margin: 20px auto;
  max-width: 500px;
  border-radius: 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
  overflow: visible;
  max-height: none;
}

.form-wrapper.hidden {
  display: none;
}

.form-wrapper h2 {
  margin-bottom: 15px;
  font-size: 14px;
  color: #fff;
  font-weight: 600;
}

form select,
form input,
form button,
form textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px;
  border: none;
  border-radius: 18px;
  background: rgba(255,255,255,0.8);
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  position: relative;
  z-index: 3;
}

form textarea {
  resize: vertical;
  min-height: 140px;
  border-radius: 15px;
}

form button {
  background: #00d4ff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  border: none;
  width: auto;
  padding: 6px 14px;
  font-size: 1rem;
  border-radius: 20px;
  display: inline-block;
  position: relative;
  z-index: 3;
}

form button:hover {
  background: #00aacc;
}

form button + button {
  margin-left: 10px;
}

/* === TOAST === */
#toast {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: #00d4ff;
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: top 0.5s ease, opacity 0.5s ease;
  z-index: 2000;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  font-size: 13.5px;
  text-align: center;
  font-style: italic;
}

#toast.show {
  top: 80px;
  opacity: 1;
  pointer-events: auto;
}

/* === CHAMPS CACHÉS === */
.hidden {
  display: none;
}

/* === SELECTS DYNAMIQUES === */
select {
  transition: none;
  opacity: 1;
  max-height: 200px;
  overflow: hidden;
}

select.hidden {
  max-height: 0;
  opacity: 0;
  padding: 0;
  margin: 0;
  display: none !important;
}


/* === UPLOAD === */
.file-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-file-label {
  display: inline-block;
  padding: 10px 14px;
  background-color: #00d4ff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  border-radius: 20px;
  text-align: center;
  transition: background 0.2s;
}

.custom-file-label:hover {
  background-color: #00b4cc;
}

.file-upload input[type="file"] {
  display: none;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* === FILE UPLOAD PREVIEW === */
.file-item {
  position: relative;
  display: inline-block;
  margin: 8px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* === GLOBAL === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Poppins", "Segoe UI", Roboto, Arial, sans-serif;
  color: #fff;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: linear-gradient(rgba(0,40,60,0.1), rgba(0,40,60,0.1)),
              url("assets/images1.jpeg") no-repeat center center;
  background-size: cover;
  background-color: #00283c;
  transition: background 0.3s ease;
}

@media (min-width: 769px) {
  body {
    background-attachment: fixed;
  }
}

html {
  scroll-behavior: smooth;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

/* === MAIN LAYOUT === */
main {
  flex: 1 0 auto; /* prend l'espace restant */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* === FOOTER === */
footer {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

/* === ACCUEIL === */
#home {
  text-align: center;
  padding: 25px 15px;
  font-size: 14px;
}

.welcome-text,
.action-container {
  opacity: 1;
  transform: none;
  margin-top: 0px;
}

.action-container {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin-top: 30px;
  margin-bottom: 15px;
}

.action-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.2s ease;
  position: relative;
  z-index: 3;
}

.action-icon i {
  font-size: 1.7rem;
  margin-bottom: 5px;
}

.action-icon:hover {
  background: rgba(0, 212, 255, 0.01);
  color: #00d4ff;
}

/* === FORMULAIRES === */
#formContainer {
  position: relative;
  overflow: hidden;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.form-wrapper {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  margin: 20px auto;
  max-width: 500px;
  border-radius: 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.form-wrapper.hidden {
  display: none;
}

.form-wrapper h2,
.form-wrapper h3 {
  margin-bottom: 15px;
  font-size: 14px;
  color: #fff;
  font-weight: 600;
}

form select,
form input,
form button,
form textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px;
  border: none;
  border-radius: 18px;
  background: rgba(255,255,255,0.8);
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  position: relative;
  z-index: 3;
}

form textarea {
  resize: vertical;
  min-height: 140px;
  border-radius: 15px;
}

form button {
  background: #00d4ff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  border: none;
  width: auto;
  padding: 6px 14px;
  font-size: 1rem;
  border-radius: 20px;
  display: inline-block;
  position: relative;
  z-index: 3;
  transition: background 0.2s;
}

form button:hover {
  background: #00aacc;
}

form button + button {
  margin-left: 10px;
}

/* === TOAST PRO === */
#toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(0.8);
  background: linear-gradient(135deg, #00d4ff, #0066ff);
  color: #fff;
  padding: 14px 28px;
  border-radius: 30px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.25, 1.5, 0.5, 1), opacity 0.35s ease;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Icon inside toast */
#toast i {
  font-size: 18px;
}

/* When toast is shown */
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Toast types */
#toast.success { background: linear-gradient(135deg, #28a745, #218838); }
#toast.error { background: linear-gradient(135deg, #dc3545, #a71d2a); }
#toast.info  { background: linear-gradient(135deg, #17a2b8, #117a8b); }


/* === CHAMPS CACHÉS === */
.hidden {
  display: none;
}

/* === SELECTS DYNAMIQUES === */
select {
  transition: none;
  opacity: 1;
  max-height: 200px;
  overflow: hidden;
}

select.hidden {
  max-height: 0;
  opacity: 0;
  padding: 0;
  margin: 0;
  display: none !important;
}

/* === FILE UPLOAD === */
.file-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-file-label {
  display: inline-block;
  padding: 10px 14px;
  background-color: #00d4ff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  border-radius: 20px;
  text-align: center;
  transition: background 0.2s;
}

.custom-file-label:hover {
  background-color: #00b4cc;
}

.file-upload input[type="file"] {
  display: none;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* === FILE PREVIEW === */
.file-item {
  position: relative;
  display: inline-block;
  margin: 8px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.file-item:hover {
  transform: scale(1.03);
}

.file-preview {
  display: block;
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}

.file-item video.file-preview {
  background: #000;
}

.file-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.8);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  line-height: 18px;
  text-align: center;
  font-size: 14px;
  z-index: 10;
  transition: background 0.2s ease;
}

.file-remove:hover {
  background: rgba(255, 0, 0, 1);
}

/* === ANIMATIONS FORM === */
.slide-left-to-right { transform: translateX(-100%); animation: slideLTR 0.5s forwards; }
@keyframes slideLTR { to { transform: translateX(0); opacity: 1; } }

.slide-right-to-left { transform: translateX(100%); animation: slideRTL 0.5s forwards; }
@keyframes slideRTL { to { transform: translateX(0); opacity: 1; } }

.slide-bottom-to-top { transform: translateY(100%); animation: slideBTT 0.5s forwards; }
@keyframes slideBTT { to { transform: translateY(0); opacity: 1; } }


.file-item:hover {
  transform: scale(1.03);
}

.file-preview {
  display: block;
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}

.file-item video.file-preview {
  background: #000;
}

.file-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.8);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  line-height: 18px;
  text-align: center;
  font-size: 14px;
  z-index: 10;
  transition: background 0.2s ease;
}

.file-remove:hover {
  background: rgba(255, 0, 0, 1);
}

/* === ANIMATIONS FORM === */
.slide-left-to-right {
  transform: translateX(-100%);
  animation: slideLTR 0.5s forwards;
}
@keyframes slideLTR {
  to { transform: translateX(0); opacity: 1; }
}

.slide-right-to-left {
  transform: translateX(100%);
  animation: slideRTL 0.5s forwards;
}
@keyframes slideRTL {
  to { transform: translateX(0); opacity: 1; }
}

.slide-bottom-to-top {
  transform: translateY(100%);
  animation: slideBTT 0.5s forwards;
}
@keyframes slideBTT {
  to { transform: translateY(0); opacity: 1; }
}

/* === STRUCTURE PAGE === */
main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

footer {
  flex-shrink: 0;
  margin: 0 !important;
  padding: 0 !important;
}

/* === CARROUSEL === */
.carousel {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 250px;
  margin: 25px auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  background: transparent;
}

.carousel-track {
  display: flex;
  width: 300%;
  animation: slideSmooth 18s ease-in-out infinite;
}

.carousel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

/* ✅ Animation fluide : 1 image à la fois */
@keyframes slideSmooth {
  0%, 25%   { transform: translateX(0); }
  33%, 58%  { transform: translateX(-100%); }
  66%, 91%  { transform: translateX(-200%); }
  100%      { transform: translateX(0); }
}

/* ✅ Mobile : plus compact et fluide */
@media (max-width: 768px) {
  .carousel {
    height: 160px;
    border-radius: 8px;
  }

  .carousel-track {
    animation: slideSmooth 12s ease-in-out infinite;
  }
}

/* === ADAPTATION MOBILE === */
@media (max-width: 768px) {

  /* Réduit légèrement la taille du texte d'accueil */
  #home {
    font-size: 12px; /* au lieu de 14px */
    padding: 20px 10px;
  }

  /* Réduit la taille des icônes et du texte des boutons */
  .action-icon i {
    font-size: 1.3rem; /* au lieu de 1.7rem */
  }

  .action-icon {
    gap: 3px;
  }

  .action-icon span,
  .action-icon p {
    font-size: 12px;
  }

  /* Espace plus serré entre les boutons */
  .action-container {
    gap: 40px; /* au lieu de 80px */
  }

  /* Réduit la taille des titres dans les formulaires */
  .form-wrapper h2,
  .form-wrapper h3 {
    font-size: 13px;
  }

  /* Réduit la taille des boutons */
  form button {
    font-size: 0.9rem;
    padding: 6px 12px;
  }
}

.toast-success {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #4CAF50; /* vert succès */
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.4s ease;
  z-index: 9999;
}

.toast-success.show {
  opacity: 1;
  transform: translateY(0);
}
