@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;
  min-height: 100vh;
  background: linear-gradient(rgba(0,40,60,0.1), rgba(0,40,60,0.1)),
              url("assets/images1.jpeg") no-repeat center center fixed;
  background-size: cover;           /* couvre tout l'espace */
  background-attachment: fixed;     /* bloque l'image lors du scroll */
  color: #fff;
  line-height: 1.6;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background 0.3s ease;
}

/* === 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-top: 0;
  margin-bottom: 5px;
  background: none;
}

.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;
}

/* === Formulaires === */
.form-wrapper {
  background: rgba(0, 0, 0, 0.25);       /* Fond semi-transparent plus sûr pour le scroll */
  backdrop-filter: blur(8px);            /* Floute le fond au lieu de juste transparence */
  -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;

  /* Optimisations scroll mobile */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;     /* Scroll fluide iOS */
  transform: translateZ(0);              /* Force GPU compositing, supprime le flash blanc */
  max-height: 80vh;                      /* Formulaire ne dépasse pas l'écran */
}

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

.form-wrapper h2 {
  margin-bottom: 15px;
  font-size: 12;
  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; /* départ hors écran */
  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; /* au-dessus du header */
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  font-size: 13.5px;
  text-align: center;
  font-style: italic;
}

#toast.show {
  top: 80px; /* visible au-dessus du contenu mais sous le header */
  opacity: 1;
  pointer-events: auto;
}

/* === Champs cachés === */
.hidden {
  display: none;
}

/* === Sélects 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;
}

select:not(.hidden) {
  display: block !important;
  opacity: 1;
  max-height: 200px;
  position: relative;
  z-index: 3;
}

/* === Conteneurs de bannières === */
.banner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
  width: 100%;
  max-width: 970px;
  height: auto;
}

.banner-container img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.banner-container img:hover {
  transform: scale(1.02);
}

.top-banner {
  margin-top: 10px;
  margin-bottom: 15px;
}

.bottom-banner {
  margin-top: 100px !important;
  margin-bottom: 0 !important;
}

/* === Champ d'upload harmonisé === */
.file-upload {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
}

.file-upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-upload label {
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,0.8);
  cursor: pointer;
  text-align: left;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  color: #555;
}

.file-upload label:hover {
  background: #e9f9ff;
  color: #00a8cc;
  box-shadow: 0 0 0 2px #00d4ff44;
}

.file-upload span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #fff;
  font-weight: 500;
}

/* === Form slide animations === */
.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; }
}

/* === Correction du fond blanc sous le formulaire === */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

footer {
  margin-top: 0 !important;
}
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  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;      /* couvre tout l'espace */
  background-attachment: fixed; /* optionnel : garde l'image fixe quand on scroll */
}