body {
  font-family: 'Montserrat', Arial, sans-serif;
  background: #191919;
  color: #fff;
  margin: 0;
  padding: 0;
  /* width: 100%; */
}
h1, h2, h3, h4 {
  color: #ff9800;
  margin-top: 0;
}
.calendar-chooser {
  max-width: 1200px;
  margin: 40px auto;
  text-align: center;
}
.calendar-types {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 32px;
}
.calendar-card {
  background: #222;
  border-radius: 12px;
  box-shadow: 0 2px 16px #0007;
  overflow: hidden;
  width: 260px;
  text-align: center;
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.calendar-card:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 32px #ff980080;
}
.calendar-card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 12px;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.choose-calendar {
  background: linear-gradient(90deg, #ff9800, #ff6700);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 1.1em;
  margin-top: 10px;
  cursor: url(/images/pointeur-a-main.png) 10 14, pointer;
  font-weight: bold;
}
.editor-main {
  display: flex;
  gap: 36px;
  justify-content: center;
  align-items: flex-start;
  margin: 28px auto;
  max-width: 1400px;
}
.sidebar, .properties-panel {
  background: #222;
  border-radius: 10px;
  padding: 18px;
  min-width: 260px;
  box-shadow: 0 2px 12px #0005;
  margin-top: 12px;
  color: #fff;
}
.sidebar label {
  display: block;
  margin-bottom: 12px;
}
.sidebar select, .sidebar button, .sidebar input[type=color] {
  margin-top: 2px;
  width: 100%;
  padding: 7px;
  border-radius: 6px;
  border: none;
  background: #333;
  color: #fff;
  font-size: 1em;
}
.sidebar button {
  background: linear-gradient(90deg, #ff9800, #ff6700);
  color: #fff;
  font-weight: bold;
  margin-bottom: 8px;
}
.canvas-section {
  position: relative;
  margin-top: 12px;
}
#calendarCanvas {
  background: #fff9ee;
  border-radius: 14px;
  box-shadow: 0 2px 16px #0008;
  display: block;
  margin-bottom: 18px;
  max-width: 900px;
  max-height: 1000px;
}
.layer-panel {
  background: #222;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 2px 12px #0005;
}
#layerList {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  max-height: 240px;
  overflow-y: auto;
}
#layerList li {
  cursor: url(/images/pointeur-a-main.png) 10 14, pointer;;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
#layerList li:hover {
  background: #ff9800 !important;
  color: #222 !important;
}
#layerList li.selected {
  background: #ffa !important;
  color: #222 !important;
  font-weight: bold;
}
.layer-actions {
  display: flex;
  gap: 8px;
}
.layer-actions button {
  flex: 1;
  padding: 7px;
  background: #ff9800;
  color: #222;
  border: none;
  border-radius: 5px;
  cursor: url(/images/pointeur-a-main.png) 10 14, pointer;;
  font-weight: bold;
  font-size: 1em;
  margin-bottom: 5px;
}
.layer-actions button:disabled {
  background: #888;
  color: #ccc;
  cursor: not-allowed;
}
.properties-panel {
  min-width: 260px;
  margin-top: 12px;
}
header {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-bottom: 10px;
}
#backToChooser {
  margin-left: auto;
  background: #333;
  color: #ff9800;
  border: none;
  border-radius: 8px;
  padding: 7px 18px;
  font-size: 1.1em;
  cursor: url(/images/pointeur-a-main.png) 10 14, pointer;;
  font-weight: bold;
  transition: background 0.2s;
}
#backToChooser:hover {
  background: #ff9800;
  color: #222;
}
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: transparent !important;
  z-index: 9999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 450px;
  margin-top: 50px;
}
.modal-content {
  background: #232323;
  border-radius: 12px;
  padding: 26px 28px;
  min-width: 840px;
  min-height: 220px;
  max-width: 450px !important;
  color: #fff;
  box-shadow: 0 2px 16px #000a;
   z-index: 10001 !important;
  position: relative !important;
}
.close {
  position: absolute;
  right: 18px; top: 12px;
  font-size: 1.7em;
  cursor: url(/images/pointeur-a-main.png) 10 14, pointer;;
  color: #ff9800;
}
#emojiList {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}
.emojiBtn {
  font-size: 1.4em;
  background: #333;
  border: none;
  border-radius: 5px;
  cursor: url(/images/pointeur-a-main.png) 10 14, pointer;;
  padding: 2px 8px;
  transition: background 0.2s;
}
.emojiBtn.selected {
  background: #ffa !important;
  border: 2px solid #ff9800;
}
.emojiBtn:hover {
  background: #ff9800;
}
/* Déverrouille les clics sur la modale et tous ses enfants */
#gridModal, #gridModal * {
  pointer-events: auto !important;
  opacity: 1 !important;
}
#validateGridModal {
  pointer-events: auto !important;
  opacity: 1 !important;
  z-index: 10000 !important;
  position: relative !important;
    width: 100px;
    height: 30px;
    color: #1c1f1d;
    background-color: orange;
}
#emojiSidebarPopup {
  display: block; 
  position: fixed; 
  z-index: 9999; 
  left: 50%; 
  top: 50%; 
  transform: translate(-50%, -50%); 
  background: rgb(34, 34, 34); 
  padding: 20px; 
  border-radius: 8px; 
  box-shadow: rgb(0, 0, 0) 0px 4px 16px;
  max-width:320px !important; 
  max-height:420px !important; 
}  
 
#emojiSidebarPickerList { 
max-width:320px; 
max-height:420px !important; 
overflow:auto; 
text-align:center;
}
    /* Conteneur des boutons-icônes */
    .icon-buttons-container {
      display: flex;
      gap: 15px;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    /* Style des boutons-icônes */
    .icon-button {
      width: 50px;
      height: 50px;
      border: none;
      background: none;
      padding: 0;
      cursor: pointer;
      transition: all 0.3s ease;
      position: relative;
    }

    .icon-button img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      border-radius: 10px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      transition: all 0.3s ease;
    }

    /* Effet au survol */
    .icon-button:hover img {
      transform: scale(1.1);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }

    /* Effet au clic */
    .icon-button:active img {
      transform: scale(0.95);
    }

    /* Tooltip au survol */
    .icon-button::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: -30px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 0, 0, 0.8);
      color: white;
      padding: 5px 10px;
      border-radius: 5px;
      font-size: 12px;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }

    .icon-button:hover::after {
      opacity: 1;
    }

    /* Animation de feedback au clic */
    @keyframes clickFeedback {
      0% { transform: scale(1); }
      50% { transform: scale(0.9); }
      100% { transform: scale(1); }
    }

    .icon-button.clicked img {
      animation: clickFeedback 0.3s ease;
    }
	#popupDesigns {
    max-height: 800px !important;
	overflow: auto;
}
	#listeDesigns {
    max-height: 600px !important;
	overflow: auto;
}
.panier-global-center {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.panier-global-wrapper {
  max-width: 850px;
  width: 100%;
  margin: 40px auto 0 auto;
  background: #1c1325;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 36px 30px 40px 30px;
}

#order-form-container {
  max-width: 850px;
  width: 100%;
  margin: 32px auto 0 auto;
}
.calendar-editor {
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.calendar-editor canvas {
  max-width: 100%;
  height: auto !important;
  display: block;
  margin: 0 auto;
  border: 2px solid #e55;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}