:root {
  /* Couleurs principales */
  --color-darkest: #030712; /* Noir très profond */
  --color-darker: #111827; /* Noir profond */
  --color-dark: #1f2937; /* Gris très foncé */
  --color-gray: #4b5563; /* Gris moyen */
  --color-gray-light: #9ca3af; /* Gris clair */
  --color-light: #e5e7eb; /* Gris très clair */
  --color-lighter: #f3f4f6; /* Presque blanc */
  --color-lightest: #f9fafb; /* Blanc cassé */
  --color-accent: #001a6e;

  /* Couleur avec opacité */
  --color-gray-15: rgba(75, 85, 99, 0.15); /* #4B5563 avec 15% d'opacité */
}

h1 {
  font-size: 1.8rem;
}

p {
  font-size: 14px;
}

body {
  color: var(--color-darkest);
}

@font-face {
  font-family: "Geist";
  src: url("./assets/fonts/Geist.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

.wb-react-app-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
  background-color: var(--color-darkest);
  font-size: 16px;
  display: flex;
  min-height: 100%;
  align-items: stretch;
  height: 100%;
}

.wb-admin-page-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  width: 100%;
}
.wb-admin-page-content-wrap {
  display: flex;
  justify-content: center;
  padding: 2px;
  margin: 10px;
  background: var(--color-lighter);
  border-radius: 7px;
  position: relative;
  overflow: auto;
  flex: 1;
}
.wb-admin-page-content {
  display: flex;
  justify-content: center;
  position: relative;
  overflow: auto;
  padding: 30px 25px;
  width: 100%;
}

.wb-admin-page-content::-webkit-scrollbar-thumb {
  border-radius: 20px;
  margin-right: 10px;
}

/* On utilise les variables de couleurs existantes */
.form-input {
  height: 2.5rem;
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid var(--color-gray);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--color-darkest);
  transition: all 0.2s ease;
}

textarea.form-input {
  height: unset;
}

.form-input::placeholder {
  color: var(--color-gray-light);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-light);
  box-shadow: 0 0 0 2px var(--color-gray-15);
}

/* Style des labels */
.form-label {
  display: flex;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-darkest);
  gap: 10px;
}

/* Groupe de form */
.form-group {
  margin-bottom: 1rem;
}

/* Layout grille */
.form-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* États désactivés */
.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Animation de focus */
.form-input:focus-visible {
  transition: all 0.2s ease;
}

/* Style du conteneur de formulaire */
.form-container {
  background-color: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 1.5rem;
  max-width: 1200px; /* Ou une autre valeur si nécessaire */
  margin: 1rem auto; /* Marge pour l'espacement vertical et centrage horizontal */
}

/* En-tête du formulaire */
.form-header {
  margin-bottom: 1.5rem; /* Ajustement de la marge */
}

/* Cibler spécifiquement le h2 dans .form-header pour éviter d'affecter d'autres h2 dans .form-container */
.form-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #24292f;
  margin-bottom: 0.5rem;
}

.form-header p {
  color: #57606a;
  font-size: 16px; /* Augmenté de 14px */
  line-height: 1.5;
  margin-bottom: 1.5rem; /* Espace avant le contenu du formulaire */
}

/* Style pour l'input de type file */
.form-input[type="file"] {
  padding: 8px !important;
  height: fit-content !important;
  background-color: var(--color-darker);
  color: var(--color-lightest);
  cursor: pointer;
}

.form-input[type="file"]::-webkit-file-upload-button {
  background-color: var(--color-dark);
  color: var(--color-lightest);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.25rem;
  margin-right: 1rem;
  cursor: pointer;
}

.form-input[type="file"]::-webkit-file-upload-button:hover {
  background-color: var(--color-gray);
}

/* Style générique pour tous les boutons de formulaire */
.form-button {
  position: relative;
  background-color: white;
  color: var(--color-darkest);
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  border: 1px solid var(--color-light);
  font-size: 14px;
  font-weight: 400;
  transition: all 0.2s ease;
}

.form-button:hover {
  background-color: var(--color-lighter);
  border-color: var(--color-dark);
  opacity: 1;
  transform: translateY(0);
  box-shadow: none;
}

.form-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.form-button:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-button svg {
  width: 12px;
  height: 12px;
  fill: var(--color-darkest);
}

.form-input.error {
  border-color: #ff4444;
}

.error-message {
  color: #ff4444;
  font-size: 10px;
  margin-top: 0.25rem;
  display: block;
}

.error-message.required {
  color: #ff4444;
  font-size: 10px;
  margin-top: 2px;
  display: block;
}

.page-layout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-gray-15);
}

.page-layout-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #24292f;
  margin-bottom: 0.5rem;
}

.page-layout-header p {
  color: #57606a;
  font-size: 16px;
  line-height: 1.5;
}

.page-layout-header a.wb-form-btn.preview-btn.active {
  margin-top: 1rem;
}

/* Styles pour le conteneur de page principal (utilisé dans HomePage, etc.) */
.page-container {
  background-color: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 1.5rem;
  max-width: 1200px; /* Ou une autre valeur si nécessaire, correspond à form-container */
  margin: 1rem auto; /* Marge pour l'espacement vertical et centrage horizontal */
}

/* WYSIWYG Editor styles */
.rsw-editor {
  width: 100%;
  border: 1px solid var(--color-gray);
  border-radius: 0.375rem;
  overflow: hidden;
}

.rsw-editor ul {
  list-style: disc;
  padding-left: 30px;
}

.rsw-toolbar {
  padding: 8px;
  background-color: var(--color-lighter);
  border-bottom: 1px solid var(--color-gray);
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.rsw-toolbar button {
  padding: 4px 8px;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--color-gray);
  transition: all 0.2s ease;
}

.rsw-toolbar button:hover {
  background-color: var(--color-gray-15);
  color: var(--color-darkest);
}

.rsw-toolbar button.rsw-active {
  background-color: var(--color-gray-15);
  border-color: var(--color-gray);
  color: var(--color-darkest);
}

.rsw-editor [contenteditable="true"] {
  padding: 12px;
  min-height: 150px;
  height: auto;
  outline: none;
  background-color: var(--color-lightest);
  color: var(--color-darkest);
}

.rsw-editor [contenteditable="true"]:focus {
  outline: none;
}

.rsw-editor [contenteditable="true"]:empty:before {
  content: attr(placeholder);
  color: var(--color-gray-light);
  pointer-events: none;
}

.input-details {
  color: #57606a; /* Gris GitHub pour les descriptions */
  font-size: 12px; /* Taille de police standard pour les détails */
  margin-bottom: 10px;
  display: block; /* Assurer qu'il prend sa propre ligne si nécessaire */
  margin-top: 0.25rem; /* Ajouter un petit espace au-dessus */
}

.wb-input-repeater-controls {
  display: flex;
  justify-content: flex-end;
}

/* Bouton d'ajout */
.wb-input-repeater-add-row {
  background-color: white;
  color: var(--color-darkest);
  border: 1px solid var(--color-light);
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  align-self: flex-end;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 400;
}

.wb-input-repeater-add-row:hover {
  background-color: var(--color-lighter);
  border-color: var(--color-dark);
  transform: translateY(0);
  box-shadow: none;
  opacity: 1;
}

.wb-input-repeater-add-row svg {
  fill: var(--color-darkest) !important;
}

.welcome-columns-wrap {
  display: flex;
  align-items: center;
  gap: 30px;
}

@media (max-width: 1100px) {
  .welcome-columns-wrap {
    flex-wrap: wrap;
  }
}

.tod-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.tod-checkbox-wrap input {
  visibility: hidden; /* <-- Hide the default checkbox. The rest is to hide and allow tabbing, which display:none prevents */
  display: block;
  height: 0;
  width: 0;
  position: absolute;
  overflow: hidden;
}
.tod-checkbox-wrap span {
  /* <-- Style the artificial checkbox */
  height: 20px;
  width: 20px;
  border: 2px solid var(--color-gray-light);
  border-radius: 4px;
  display: block;
  position: relative;
  flex-shrink: 0;
}
.tod-checkbox-wrap [type="checkbox"]:checked + span {
  border: 2px solid var(--color-darker);
}
.tod-checkbox-wrap [type="checkbox"]:checked + span:after {
  /* <-- Style its checked state */
  content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>');
  width: 13px;
  height: 15px;
  display: block;
  bottom: 0;
  position: absolute;
  left: 1px;
}

.wb-form-btn.go-live {
  opacity: 0.2;
  cursor: not-allowed;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.wb-form-btn.go-live.active {
  opacity: 1;
  cursor: pointer;
}

/* Services */
.service-handler-container {
  display: flex;
  width: 100%;
  gap: 10px;
}
.service-handler {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.category-container {
  background-color: var(--color-lighter);
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
}

.category-header {
  padding: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background-color: var(--color-light);
}

.category-content {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center;
}

.category-content input {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--color-gray-25);
  border-radius: 4px;
  font-size: 14px;
  background-color: var(--color-lightest);
  color: var(--color-darkest);
}

.category-content input:focus {
  outline: none;
  border-color: var(--color-gray);
  box-shadow: 0 0 0 2px var(--color-gray-15);
}

.order-buttons,
.service-order-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-buttons button,
.service-order-buttons button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.order-buttons button:hover:not(:disabled),
.service-order-buttons button:hover:not(:disabled) {
  background-color: var(--color-gray-25);
  opacity: 1;
}

.order-buttons svg {
  stroke: #ff7704;
}

.order-buttons button:disabled,
.service-order-buttons button:disabled {
  cursor: not-allowed;
  opacity: 0.2;
}

.service-item-container {
  display: flex;
  gap: 10px;
}

.services-list {
  padding: 20px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-layout-content {
  padding-bottom: 0;
}

.service-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  background-color: white;
  border-radius: 6px;
  width: 100%;
  background-color: var(--color-lighter);
}

.service-content input,
.service-content textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--color-gray-25);
  border-radius: 4px;
  font-size: 14px;
}

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

.image-section {
  border: 1px solid var(--color-gray-25);
  padding: 15px;
  border-radius: 6px;
}

.image-section h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: var(--color-gray-75);
}

.additional-image {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.delete-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.delete-button:hover {
  background-color: var(--color-error-light);
  opacity: 1;
}

.add-image-button,
.add-service-button,
.add-category-button {
  background-color: var(--color-darkest);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  width: fit-content;
}

.add-image-button:hover,
.add-service-button:hover,
.add-category-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.delete-service-button {
  background-color: var(--color-error);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.2s ease;
}

.delete-service-button:hover {
  opacity: 0.9;
}

.service-item-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  padding: 15px;
  height: 100%;
  gap: 20px;
}

.service-item-header-left {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.service-item-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-darkest);
  max-width: 500px;
}

.service-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.delete-button-popover {
  position: relative;
}

.delete-button-popover-content {
  position: absolute;
  top: -5px;
  right: 25px;
  font-size: 12px;
  font-weight: 500;
  width: max-content;
  background: var(--color-light);
  padding: 10px;
  z-index: 1;
  border-radius: 8px;
  color: black;
}

.delete-button-popover-content a {
  margin-left: 4px;
  cursor: pointer;
  color: #de350b;
}

.tool-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tool-button:hover {
  background-color: var(--color-gray-35);
}

.tool-button.delete-button:hover {
  background-color: var(--color-error-light);
  color: var(--color-error);
}

.toggle-button {
  opacity: 0.5;
}

.toggle-button:hover {
  opacity: 1;
}

.toggle-button.collapsed svg {
  transform: rotate(-180deg);
}

.toggle-button svg {
  transition: transform 0.2s ease;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  flex-wrap: wrap;
}

.category-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-darkest);
}

.edit-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.edit-button:hover {
  opacity: 1;
  background-color: var(--color-gray-15);
}

.preview-modal-error {
  color: white;
}

.wb-drawer-bg {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 998;
  background: var(--color-darkest);
  opacity: 0.95;
}

.wb-drawer-content-wrap {
  position: fixed;
  top: 20px;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.wb-drawer-content {
  background: var(--color-lighter);
  border-radius: 4px;
  width: 60%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 20px 20px 20px;
  position: relative;
}

.wb-drawer-image-wrap {
  width: 40%;
  overflow-x: hidden;
  overflow-y: auto;
}

.wb-drawer-image-wrap h3 {
  margin-top: 40px;
  text-align: left;
  font-weight: 400;
  font-size: 18px;
  color: var(--color-lightest);
}

.wb-drawer-image-wrap p {
  margin-bottom: 20px;
  color: var(--color-lightest);
}

.wb-drawer-image {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-top: 20px;
}

.wb-drawer-close-button-wrap {
  background: transparent;
  position: sticky;
  top: 0;
  width: 100%;
  left: 0;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
}

.wb-drawer-close-button-wrap h2 {
  margin: 0;
  font-size: 20px;
}

.wb-drawer-close-button {
  background-color: white;
  color: var(--color-darkest);
  border: 1px solid var(--color-light);
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  align-self: flex-end;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 400;
}

.wb-drawer-close-button:hover {
  background-color: var(--color-lighter);
  border-color: var(--color-dark);
}

.wb-drawer-close-button svg {
  fill: currentColor;
  width: 12px;
}

@media (max-width: 950px) {
  .wb-drawer-image-wrap {
    display: none;
  }

  .wb-drawer-content {
    width: 100%;
  }
}

.edit-section-button {
  padding: 6px 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-accent);
  color: var(--color-lightest);
  font-size: 12px;
  border: none;
  cursor: pointer;
}

.edit-section-button svg {
  display: block;
  width: 12px;
  fill: currentColor;
}

@media (max-width: 1330px) {
  .form-layout-header .form-layout-title {
    max-width: 400px;
  }
}

.wb-popup-bg {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 998;
  background: var(--color-darkest);
  opacity: 0.95;
  transition: all 200ms ease;
}

.wb-popup-content-wrap {
  position: fixed;
  top: 20px;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.wb-popup-content {
  background: var(--color-light);
  padding: 40px;
  border-radius: 16px;
  position: relative;
}

.miocommerce-help-button {
  font-size: 14px;
  cursor: pointer;
  width: fit-content;
  padding: 6px 12px;
  background: #ff7704;
  border-radius: 29px;
  color: white;
}

.wb-popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  cursor: pointer;
  width: 20px;
  height: auto;
}

.wb-popup-close svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Welcome Component Styles */
.welcome-container {
  /* Similaire à .live-app-container ou .tasks-section pour la structure globale */
  max-width: 1200px; /* Ajustable */
  margin: 0 auto;
  padding: 2rem 1.5rem; /* Espacement interne */
}

.welcome-header {
  text-align: center;
  margin-bottom: 2.5rem; /* Plus d'espace après le titre principal */
}

.welcome-header h1 {
  font-size: 28px; /* Taille GitHub-esque pour un titre principal */
  font-weight: 600; /* Un peu moins gras que les h1 par défaut */
  margin-bottom: 0.5rem;
}

.welcome-header .subtitle {
  font-size: 18px;
  color: #57606a; /* Couleur de sous-titre GitHub */
  max-width: 600px;
  margin: 0 auto 1rem auto;
  line-height: 1.5;
}

.welcome-main-content {
  /* Similaire à .tasks-section pour le contenu principal */
  background-color: #ffffff;
  border: 1px solid #d0d7de; /* Bordure GitHub */
  border-radius: 6px; /* Coins arrondis GitHub */
  padding: 2rem 1.5rem;
}

.welcome-columns-wrap {
  display: flex;
  gap: 2rem; /* Espace entre les colonnes */
  align-items: flex-start; /* Aligner les éléments en haut */
}

.welcome-text-content {
  flex: 1; /* Permettre au contenu textuel de prendre de la place */
  width: 50%;
}

.welcome-text-content h2 {
  font-size: 20px; /* Similaire à .tasks-section h2 */
  font-weight: 600;
  margin-top: 0; /* Retirer la marge du haut si c'est le premier élément */
  margin-bottom: 1rem;
}

.welcome-text-content p,
.welcome-text-content li {
  font-size: 14px;
  line-height: 1.6;
  color: #24292f; /* Couleur de texte GitHub standard */
}

.welcome-text-content p {
  margin-bottom: 1rem;
}

.welcome-text-content ol {
  margin-left: 1.5rem; /* Indentation standard pour les listes */
  margin-bottom: 1rem;
  padding-left: 0;
}

.welcome-text-content li {
  margin-bottom: 0.5rem;
}

.welcome-image-content {
  flex-shrink: 0; /* Empêcher l'image de trop rétrécir */
}

.wb-theme-preview-img {
  width: 100%;
  height: auto;
  border-radius: 6px; /* Coins arrondis pour l'image */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .welcome-columns-wrap {
    flex-direction: column;
  }
  .welcome-image-content {
    flex-basis: auto; /* Réinitialiser la base en colonne */
    width: 100%;
    margin-top: 1.5rem;
  }
  .welcome-header h1 {
    font-size: 24px;
  }
  .welcome-header .subtitle {
    font-size: 16px;
  }
}
/* End Welcome Component Styles */
