/* dashboard.css */

.campaigns-grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 🔥 fixe 3 colonnes */
  gap: 2rem;
  width: 100%;
}

.campaign-card {
  background-size: cover;
  background-position: center;
  color: #000;
  position: relative;
  padding: 1rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
}

/* Optionnel : ajouter un fondu sombre pour la lisibilité du texte */
.campaign-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85); /* assombrit l'image de fond */
  z-index: 0;
}

.campaign-card > * {
  position: relative;
  z-index: 1;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.card-actions a,
.card-actions button {
  flex: 1 1 auto; /* ✨ Permet aux boutons de s'adapter */
  min-width: 100px;
  text-align: center;
}

.activation-form {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.supcamp{
	padding: 0;
	background-color: unset;
    width: unset;
    border: none;
    box-shadow: none;
}

form button,
form input[type="submit"] {
  width: 100%;
  box-sizing: border-box;
}

/* ------- Global Layout ------- */
.dashboard-container {
  width: 100%;
  padding: 2rem;
  box-sizing: border-box;
}
.dashboard-fiche {
    display: flex;
    justify-content: space-around;
}

.fiche-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  box-sizing: border-box;
}

.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.custom-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.custom-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 4px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.3s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  border-radius: 4px;
  transition: 0.3s;
}

.custom-switch input:checked + .slider {
  background-color: #22c55e; /* vert */
}

.custom-switch input:checked + .slider:before {
  transform: translateX(24px);
}

.switch-label {
  font-weight: 600;
  color: #444;
  transition: color 0.3s;
}

.switch-label.active {
  color: #22c55e;
}

.switch-label.inactive {
  color: #ef4444;
}

#fiche-apercu {
  position: sticky;
  top: 2rem;
  height: calc(100vh - 4rem); /* Ajuste selon la marge haute */
  overflow-y: auto;
}

#fiche-apercu{
	background: #fff;
    padding: 2rem;
	border-radius: 0px;}

/* ------- Sidebar Tabs ------- */
.menu-sidebar-tabs {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 4px;
  box-sizing: border-box;
}

.form-tab-button {
  width: 100%;
  padding: 0.6rem 1rem;
  background: #eee;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.form-tab-button.active {
  background: #1d4ed8;
  color: white;
}

/* ------- Tab Contents ------- */
.form-tab-content {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.form-tab-content.active {
  display: flex;
}

/* ------- Forms ------- */
.form-wrapper, .profil-form, .form-fiche {
  flex: 1 1 300px;
  max-width: 100%;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-sizing: border-box;
}

.form-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: 14px;
  border: none;
  border-radius: 6px;

  color: white;
  text-decoration: none;
  cursor: pointer;
  height: 40px; /* même hauteur pour tous */
  min-width: 100px; /* optionnel pour cohérence */
  box-sizing: border-box;
}

.cta-button.danger {
  background-color: #e3342f;
}

.cta-button i {
  margin-right: 6px;
}

.cta-button:hover {
  background-color: #ff82a4;
}

/* ------- Responsive ------- */
@media (max-width: 768px) {
  .fiche-layout {
    flex-direction: column;
    gap: 1rem;
  }

  .menu-sidebar-tabs, .form-wrapper, .profil-form, .form-fiche {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
  }

  .cta-button {
    width: 100%;
    text-align: center;
  }
}




section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

form {
  background-color: #fff;
  width: 100%;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #1f2937;
}

.form-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-direction: column;
}

.form-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 200px;
}

.form-field label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #374151;
}

input, select, textarea {
  border: 1px solid #c2185b;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  background-color: #f9fafb;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #2563eb;
  background-color: white;
}



	


.message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.message.success {
  background-color: #ecfdf5;
  color: #065f46;
  border-left: 6px solid #10b981;
}

.message.error {
  background-color: #fef2f2;
  color: #991b1b;
  border-left: 6px solid #ef4444;
}

.lot-line {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.remove-lot {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
  color: #6b7280;
}

.remove-lot:hover {
  background-color: #e5e7eb;
  transform: scale(1.1);
  color: #111827;
}

.remove-lot svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

	

.checkbox-inline label {
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
}
	
input[type="checkbox"] {
  transition: all 0.2s ease;
}
input[type="checkbox"]:hover {
  transform: scale(1.3);
}
	
.lots-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

.lots-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #ef4444; /* rose/rouge doux - adapte si besoin */
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
}

.icon-gift {
  width: 28px;
  height: 28px;
  stroke: #f59e0b; /* jaune doux */
}	
	
.label-with-icon {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.label-tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.label-tooltip svg {
  width: 20px;
  height: 20px;
  stroke: #ff0057;
}

.label-tooltip:hover svg {
  stroke: #25eb60;
}

.label-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  /*transform: translateX(-50%);*/
  background: #ff0057;
  color: white;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.4;
  max-width: 260px;
  width: max-content;
  max-width: 280px;
  white-space: normal !important;
  word-break: break-word;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
	font-weight:normal;
}

.label-tooltip:hover::after {
  opacity: 1;
}

	
   .preview img {
            width: 100px;
            height: 100px;
            object-fit: cover;
            margin: 5px;
        }
        .image-container {
            display: inline-block;
            position: relative;
        }
        .delete-btn {
            position: absolute;
            top: 0;
            right: 0;
            background: red;
            color: white;
            border: none;
            cursor: pointer;
        }
	
	.fiche-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.fonds-grille {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fond-item {
  position: relative;
  display: inline-block;
  transition: transform 0.3s ease;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor:pointer;
}

.fond-item:hover {
  transform: scale(1.5);
  border-color: #0077cc;
  z-index: 1;
}

.fond-item input[type="radio"] {
  display: none;
}

.fond-item img {
  display: block;
  max-width: 120px;
  height: auto;
  border-radius: 6px;
}

.fond-item.selected {
  outline: 3px solid #38bdf8;
  transform: scale(1.4);
  z-index: 2;
}
	
	
	@media (max-width: 768px) {
 

 

  .form-row {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .form-field {
    width: 100%;
    min-width: unset;
  }

  .lot-line {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .remove-lot {
    align-self: flex-end;
    margin-top: -10px;
  }

  .lots-header {
    flex-direction: column;
    text-align: center;
  }

  .cta-button {
    width: 100%;
  }

  .image-container img {
    width: 80px;
    height: 80px;
  }

  .label-tooltip::after {
    bottom: auto;
    top: 125%;
  }
}
	@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }
		.form-wrapper,
  .preview-wrapper {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .fiche-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
  }
		    .tab-button, .form-tab-button, .cta-button {
        width: 100%;
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }
	}
