/****************************************
 * 1. WRAPPER GÉNÉRAL
 ****************************************/

body.toplevel_page_generateur-tableau-elec .wrap {
    max-width: none !important;
    width: 100% !important;
}


#gte-disclaimer {
    background:#fff3cd;
    border:1px solid #ffeeba;
    padding:15px;
    border-radius:8px;
    margin-bottom:20px;
    font-size:14px;
    line-height:1.5;
    max-width: 900px;
    margin: 0 auto 20px auto;
    display: block;
}

#gte-tableau-frame {
    display: inline-block;
}

#gte-disclaimer {
    width: 100%;
    box-sizing: border-box;
}

#gte-interface-wrapper {
    max-width: 1000px;
    width: 100%;
}


#gte-wrapper {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/****************************************
 * 2. FORMULAIRE DE CONFIGURATION
 ****************************************/

/* Bloc d’une rangée */
.gte-rangee-form {
  border: 1px solid #ddd;
  padding: .5rem;
  margin-bottom: .5rem;
}

/* Conteneur des modules (ID + DJ + blank) */
.gte-modules {
  display: flex;
  flex-direction: column; /* IMPORTANT : une colonne pour gérer le décalage */
  gap: 6px;
}

/* Structure commune à tous les modules */
.gte-module {
  display: flex;
  align-items: flex-start;
  border: 1px solid #ddd;
  background: #fafafa;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  padding: 6px;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box; /* empêche tout débordement */
}

.gte-module * {
    box-sizing: border-box;
}

/* Contenu du module */
.gte-module-content {
  flex: 1;
}

/* Colonne poubelle (alignement parfait) */
.gte-module-delete {
  width: 28px;
  display: flex;
  justify-content: flex-end;
  margin-left: 6px;
}

/* Bouton poubelle */
.gte-module-delete button,
.gte-id-delete,
.gte-disj-delete,
.gte-blank-delete {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  padding: 3px 6px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.gte-module-delete button:hover,
.gte-id-delete:hover,
.gte-disj-delete:hover,
.gte-blank-delete:hover {
  background: #f2f2f2;
  border-color: #bfbfbf;
}

.gte-module select,
.gte-module input[type="text"],
.gte-module input[type="color"] {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s ease;
}

.gte-module select:focus,
.gte-module input[type="text"]:focus {
    border-color: #3A7BFF;
    box-shadow: 0 0 0 3px rgba(58,123,255,0.25);
    outline: none;
}


/****************************************
 * DÉCALAGE HIÉRARCHIQUE + ALIGNEMENT
 ****************************************/

/* ID = trait coloré réel */
.gte-module[data-type="id"] {
  border-left-width: 6px;
  border-left-style: solid;
}

/* DJ et blank = faux trait transparent pour alignement */
.gte-module[data-type="dj"],
.gte-module[data-type="blank"] {
  border-left: 6px solid transparent;
}

/* Décalage visuel du contenu */
.gte-module[data-type="dj"] .gte-module-content,
.gte-module[data-type="blank"] .gte-module-content {
  padding-left: 30px; /* Ajustable */
}

/****************************************
 * 3. ZONE D’APERÇU / TABLEAU VISUEL
 ****************************************/

#gte-preview-wrapper {
  width: 100%;
  overflow: visible;
}

/* Cadre global du tableau */
#gte-tableau-frame {
  padding: 20px;
  border: 3px solid #24282D;
  border-radius: 14px;
  background: #ffffff;
  display: inline-block;
  min-width: 300px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-top: 10px;
}

/* Titre du tableau */
#gte-tableau-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
  color: #24282D;
}

/* Conteneur des rangées */
#gte-tableau {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  width: 100%;
}

/* Une rangée visuelle = ID + DJ + blanks */
.gte-rangee-visu {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  padding: 0;
}

/* Modules dans le rendu : wrapper neutre */
.gte-module-id,
.gte-module-disj,
.gte-module-blank {
  width: auto !important;
  height: auto !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  display: inline-block !important;
}


/****************************************
 * 4. SVG / FIXES THÈME
 ****************************************/

/* Corrige le bug SVG du thème Twenty Twenty-Five */
svg path {
  transform-origin: initial !important;
}


/****************************************
 * 5. Titre / FIXES THÈME
 ****************************************/

#gte-title-editor {
    margin-bottom: 10px;
}

#gte-title-editor label {
    font-weight: bold;
    margin-right: 6px;
}

#gte-title-input {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
    max-width: 420px;
}


.gte-rangee-actions button {
    background: #3A7BFF;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.gte-rangee-actions button:hover {
    background: #2f6ad8;
}

.gte-rangee-form {
    background: #fdfdfd;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    padding: 12px;
    margin-bottom: 12px;
}

#gte-wrapper {
    font-family: "Inter", "Roboto", sans-serif;
    line-height: 1.4;
}

.gte-module {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gte-module:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* Boutons principaux premium */
#gte-generate,
#gte-export {
    background: linear-gradient(135deg, #3A7BFF 0%, #2F6AD8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 22px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 4px 10px rgba(58, 123, 255, 0.25) !important;
    transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease !important;
    margin-right: 10px !important;
}

/* Hover */
#gte-generate:hover,
#gte-export:hover {
    background: linear-gradient(135deg, #2F6AD8 0%, #2558B8 100%) !important;
    box-shadow: 0 6px 14px rgba(58, 123, 255, 0.35) !important;
}

/* Active (clic) */
#gte-generate:active,
#gte-export:active {
    transform: scale(0.96) !important;
    box-shadow: 0 3px 8px rgba(58, 123, 255, 0.25) !important;
}


.gte-rangee-actions {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #e5e5e5;
}

/* Select premium : Nombre de rangées */
#gte-nb-rangees {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background: #ffffff 
        url("data:image/svg+xml;utf8,<svg fill='black' height='14' viewBox='0 0 24 24' width='14' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>")
        no-repeat right 12px center;

    background-size: 14px;

    border: 1px solid #ccc;
    border-radius: 8px;

    padding: 8px 40px 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;

    cursor: pointer;
    transition: all 0.25s ease;
}

/* Hover */
#gte-nb-rangees:hover {
    border-color: #3A7BFF;
}

/* Focus */
#gte-nb-rangees:focus {
    border-color: #3A7BFF;
    box-shadow: 0 0 0 3px rgba(58,123,255,0.25);
    outline: none;
}
