:root {
  --primary-color: #4caf50;
  --secondary-color: #45a049;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: hsl(55deg 23.08% 89.8%);
  max-width: 1200px;
  margin: 0 auto;
}

button {
  font-weight: bold;
}

.container {
  background: white;
  border-radius: 29px;
  padding: 1rem;
}

.branding-container {
  text-align: center;
  margin-bottom: 1rem;
}

.branding-container h1 {
  margin: 0;
}

.branding-title-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.branding-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.step-indicator {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step.active .step-number {
  background: var(--primary-color);
  color: white;
}

.step-content {
  display: none;
  text-align: center;
}

.step-content h2 {
  margin-top: 0;
}

.step-content.active {
  display: block;
}

.button-group {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

button {
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
  min-width: 120px;
}

button:hover {
  background: var(--secondary-color);
}

button.secondary {
  background: #666;
}

.upload-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 1rem;
  width: 600px;
  max-width: 90%;
  cursor: pointer;
  min-height: 120px;
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.upload-area:hover {
  border-color: var(--primary-color);
}

#previewImage {
  max-width: 200px;
  margin: 20px auto;
  display: none;
}

.instructions {
  color: #666;
  font-style: italic;
}

.upload-area.dragover {
  border-color: var(--primary-color);
  background: #f8f8f8;
}

/* Ajout du style pour la prévisualisation */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  max-width: 600px;
  margin: 20px auto;
  background: #eee;
  padding: 2px;
}

.preview-cell {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  border: 1px solid #ddd;
}

.scale-info {
  font-size: 0.9em;
  color: #999;
}

#cropper-container {
  width: 600px;
  height: 400px; /* Conserver un rectangle */
  margin: 20px auto;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

/* Ajouter le cercle uniquement sur la preview */
.preview-cell {
  border-radius: 50%;
}

/* Style du cercle de rognage */
.cropper-view-box {
  border-radius: 50%;
  outline: none;
  box-shadow: 0 0 0 1px #fff;
}

.image-options {
  margin: 2rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.gallery-item {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 4px;
  transition: all 0.3s;
}

.gallery-item:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.gallery-item img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

.or-separator {
  text-align: center;
  margin: 2rem 0;
  font-weight: bold;
  color: #666;
  position: relative;
}

.or-separator::before,
.or-separator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 45%;
  height: 1px;
  background: #ddd;
}

.or-separator::before {
  left: 0;
}

.or-separator::after {
  right: 0;
}

.personnal-design {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.gallery-item.selected {
  border-color: var(--secondary-color);
  background: #f8fff8;
}

.cropper-point {
  width: 15px !important;
  height: 15px !important;
  background: var(--primary-color) !important;
  border-radius: 50%;
  opacity: 0.9;
  border: 2px solid white;
}

/* Positionnement des poignées */
.cropper-point.point-se,
.cropper-point.point-sw,
.cropper-point.point-nw,
.cropper-point.point-ne {
  margin: -7.5px !important; /* Ajuster selon la taille des poignées */
}

/* Lignes de guidage */
.cropper-line {
  background: var(--primary-color) !important;
  opacity: 0.3;
  width: 3px !important;
}

/* Effet hover */
.cropper-point:hover {
  transform: scale(1.2);
  opacity: 1;
}

/* Styles pour les guides de diamètre */
.diameter-guide {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10;
  box-sizing: border-box;
}

.diameter-guides-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Style pour la légende des guides */
.diameter-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem auto;
  max-width: 600px;
  padding: 0.5rem;
  background: #f5f5f5;
  border-radius: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.color-box {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.manufacturer-reference {
  font-weight: bold;
  margin: 1rem auto;
  max-width: 600px;
  padding: 0.5rem;
  background: #f5f5f5;
  border-radius: 8px;
}

footer {
  margin-top: 20px;
}

footer,
footer a {
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
