/* Importation des polices depuis Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;700&family=Epilogue:wght@400;500;700&display=swap');

/* ------------------------------------------
   style.css
   Feuille de style pour creator.php
------------------------------------------- */
.elements div { display:block; width:42px; height:42px; overflow:visible; float:left; margin:3px; background-color:#aaaaaa; }
.elements div a { display:block; width:40px; height:40px; overflow:hidden; margin:1px; background-position:0px 0px; background-repeat:no-repeat; }
.elements div a:hover { background-position:-40px 0px; }
.elements div a.eo { background-image:url(gomme.png); }
.elements div a.gomme { background-image:url(gomme.png); }
.elements div a.eraser { background-image:url(eraser.png); }
.elements div a.goma { background-image:url(goma.png); }
.elements div.sel { width:44px; height:48px; margin:0px;}
.elements div.sel a { margin:4px; }
.elements br { clear:both; }
.elements div.NosMarelles { width:90px; line-height:40px; background-color:#ffffff; font-weight:bold; text-align:right; }
.elements div.NosMarelles4 { width:186px; line-height:40px; background-color:#ffffff; font-weight:bold; text-align:right; }
.elements div.c0 { margin-left:243px; margin-left:51px; }
.elements div.c04 { margin-left:147px; }

#rotation { font-style:italic; }

.e1001a0 { background-image:url(40x40/marelle-hexdalle-rouge-0.jpg); }
.e1002a0 { background-image:url(40x40/marelle-hexdalle-rouge-90.jpg); }
.e1003a0 { background-image:url(40x40/marelle-hexdalle-rouge-180.jpg); }
.e1004a0 { background-image:url(40x40/marelle-hexdalle-rouge-270.jpg); }
.e1005a0 { background-image:url(40x40/marelle-hexdalle-verte-0.jpg); }
.e1006a0 { background-image:url(40x40/marelle-hexdalle-verte-90.jpg); }
.e1007a0 { background-image:url(40x40/marelle-hexdalle-verte-180.jpg); }
.e1008a0 { background-image:url(40x40/marelle-hexdalle-verte-270.jpg); }
.e1009a0 { background-image:url(40x40/marelle-hexdalle-grise-0.jpg); }
.e1010a0 { background-image:url(40x40/marelle-hexdalle-grise-90.jpg); }
.e1011a0 { background-image:url(40x40/marelle-hexdalle-grise-180.jpg); }
.e1012a0 { background-image:url(40x40/marelle-hexdalle-grise-270.jpg); }
.e1013a0 { background-image:url(40x40/marelle-hexdalle-noire-0.jpg); }
.e1014a0 { background-image:url(40x40/marelle-hexdalle-noire-90.jpg); }
.e1015a0 { background-image:url(40x40/marelle-hexdalle-noire-180.jpg); }
.e1016a0 { background-image:url(40x40/marelle-hexdalle-noire-270.jpg); }
.e1017a0 { background-image:url(40x40/marelle-hexdalle-chocolat-0.jpg); }
.e1018a0 { background-image:url(40x40/marelle-hexdalle-chocolat-90.jpg); }
.e1019a0 { background-image:url(40x40/marelle-hexdalle-chocolat-180.jpg); }
.e1020a0 { background-image:url(40x40/marelle-hexdalle-chocolat-270.jpg); }

/* Réinitialisations de base */
* {
  margin: 0; 
  padding: 0; 
  box-sizing: border-box;
}
body {
  font-family: 'Epilogue', sans-serif;
  background-color: #f9f9f9;
  color: #444444;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: #0073aa;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Conteneur principal */
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header principal */
#main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: #f7f7f7;
  border-bottom: 1px solid #ddd;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-left .logo {
  max-height: 50px;
}
.header-titles h1 {
  font-family: 'Urbanist', sans-serif;
  font-size: 2em;
  color: #000000;
  margin: 0;
}
.header-titles .subtitle {
  font-family: 'Epilogue', sans-serif;
  font-size: 1.2em;
  color: #cc222b;
  margin: 0;
  font-weight: 500;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-right .btn-link {
  background: #eee;
  padding: 6px 10px;
  border-radius: 0; 0; 4px;
}
.header-right .btn-link:hover {
  background: #ddd;
}

/* Sélecteur de langue */
.language-selector a {
  font-family: 'Epilogue', sans-serif;
  color: #444444;
  font-weight: 500;
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid transparent;
  transition: border 0.3s;
}

.language-selector a.active,
.language-selector a:hover {
  border-color: #cc222b;
  color: #cc222b;
}

/* Conteneur du dropdown */
.dropdown-button {
  position: relative;
  display: inline-block; /* S’assure que hover/focus-within englobent bouton + menu */
}

/* Afficher le menu si on survole .dropdown-button ou si on a le focus à l’intérieur */
.dropdown-button:hover .dropdown-menu,
.dropdown-button:focus-within .dropdown-menu {
  display: block;
}

/* Menu caché par défaut */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; /* Directement en dessous du bouton */
  left: 0;   /* ou right: 0 si vous préférez */
  margin-top: 0; /* pas de marge, pour éviter l’écart */
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 0; 0; 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  min-width: 140px;
  z-index: 12;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: #444444;
  font-family: 'Epilogue', sans-serif;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.dropdown-menu a:hover {
  background-color: #cc222b;
  color: #ffffff;
  border-radius: 0; 0; 6px;
}

/* Exemple de bouton avec icône */
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: #ffffff;
  color: #444444;
  font-family: 'Epilogue', sans-serif;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid #ccc;
  border-radius: 0; 0; 6px;
  cursor: pointer;
  transition: all 0.6s cubic-bezier(.25, .8, .25, 1);
  position: relative;
}

.btn-icon:hover {
  background-color: #f0f0f0;
  border-color: #999;
}

/* Icônes dans les boutons */
.btn-icon .icon,
.btn-icon .icon-chevron {
  width: 16px;
  height: 16px;
  stroke: currentColor; /* Hérite de la couleur du texte */
}


/* Bouton rouge (ex: reset) */
.reset-button {
  background-color: #cc222b;
  color: #ffffff;
  border: none;
}

.reset-button:hover {
  background-color: #000000;
  color: #ffffff;
  border: none;
}


/* Contenu principal en 3 colonnes */
.main-content {
  display: grid;
  grid-template-columns: 350px 1fr 300px; /* colonnes : gauche, centre, droite */
  gap: 20px;
  flex: 1; /* pour occuper l'espace vertical */
  padding: 20px;
}

/* Colonne gauche */
.left-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Colonne centrale */
.center-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 11;
}

/* Colonne droite */
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Panneaux */
.dimensions-panel,
.elements-panel,
.sol-panel,
.rotation-panel,
.menu-panel,
.info3D-panel,
.composition-panel {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0; 0; 6px;
  padding: 15px;
}

.dimensions-panel h2,
.elements-panel h2,
.sol-panel h2,
.rotation-panel h2,
.menu-panel h2,
.info3D-panel h2,
.composition-panel h2 {
font-size: 1rem;
    font-family: 'Urbanist', sans-serif;
    color: #cc222b;
    margin-bottom: 10px;
    font-weight: 700;
}

.inline-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

/* Boutons, inputs, selects */
.btn {
  display: inline-flex;
  align-items: center;
  background-color: #cc222b;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 0; 0; 6px;
  cursor: pointer;
  font-family: 'Epilogue', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: opacity 0.3s;
}
.btn:hover {
  background: #000000;
}
.btn-sm {
  font-size: 0.8rem;
  padding: 5px 8px;
}
.select-sm {
  font-size: 0.9rem;
  padding: 4px;
}
.float1 {
  width: 50px;
}

/* Langues drapeau */
.langues img {
  width: 24px;
  height: auto;
  margin-right: 4px;
}

/* Eléments */
.elements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.elements div {
  width: 39px;
  height: 42px;
  border-radius: 0; 0; 4px;
  background-color: #ccc;
  position: relative;
}
.elements div a {
  display: block;
  border-radius: 0; 0; 4px;
  width: 37px;
  height: 40px;
  margin: 1px;
  background-position: 0 0;
  background-repeat: no-repeat;
}
.elements div a:hover {
  background-position: -40px 0;
}
.NosMarelles {
  width: 100%;
  background-color: #fafafa;
  font-weight: bold;
  text-align: right;
  padding-right: 8px;
}

/* Sol (table) */
#sol table {
  border-collapse: collapse;
  margin: 0 auto;
  box-shadow: 0 3px 5px #000, 0 3px 10px #0008;
}
#sol table td {
  border: 1px solid #aaa;
  padding: 0;
}
#sol table td a {
  display: block;
  background-position: 0 0;
  background-repeat: no-repeat;
}
.t20 td,
.t20 td a {
  width: 20px;
  height: 20px;
  background-size: 40px 20px;
}
.t40 td,
.t40 td a {
  width: 40px;
  height: 40px;
  background-size: 80px 40px;
}
.t20 td a:hover {
  background-position: -20px 0;
}
.t40 td a:hover {
  background-position: -40px 0;
}

.t30 td,
.t30 td a {
  width: 30px;
  height: 30px;
  background-size: 60px 30px;
}

.t30 td a:hover {
  background-position: -30px 0;
}

/* Info 3D */
#move3D {
  width: 100px;
  height: 100px;
  background: radial-gradient(#999 33%, #bbb 66%, #eee);
  border: 2px solid #aaa;
  border-radius: 50px; 0; 100px;
  margin-top: 10px;
  position: relative;
}
#select3D {
  width: 10px;
  height: 10px;
  background: #666;
  border-radius: 50px; 0; 5px;
  position: absolute;
  top: 45px;
  left: 45px;
}

/* Menu */
#menu a {
  display: flex;
  margin-right: 10px;
  color: #333;
  text-decoration: none;
}
#menu a img {
  width: 34px;
  height: 34px;
  vertical-align: middle;
  margin-right: 4px;
}

/* Exemples */
.exemples-panel {
  padding: 20px;
}
#exemples {
  display: flex;
  gap: 10px;
  overflow: auto;
  margin-top: 10px;
}
#exemples img {
  border: 1px solid #ccc;
}

/* Footer */
.main-footer {
  background: #fff;
  border-top: 1px solid #ddd;
  text-align: center;
  padding: 10px 20px;
}

/* Positionne label, pastille et select sur la même ligne */
.color-field {
  display: flex;
  align-items: center;
  gap: 8px; /* espace horizontal */
  margin-bottom: 1rem; /* espace vertical entre groupes */
}

.color-field label {
  font-weight: 500;
  color: #444444;
  font-family: 'Epilogue', sans-serif; /* Exemple de police */
}

/* Le rond coloré */
.color-circle {
  width: 20px;
  height: 20px;
  border-radius: 0; 0; 50%;
  background-color: #ccc; /* défaut */
  border: 1px solid #aaa;
}

/* Le <select> */
.color-field select.select-sm {
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 0; 0; 6px;
  border: 1px solid #ddd;
  font-family: 'Epilogue', sans-serif;
  color: #444444;
  width: auto;
}



/* Conteneur global de la "carte" */
.param-box {
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 0; 0; 8px;
  padding: 16px;
  width: 350px;
  max-width: 350px; /* Ajustez selon vos besoins */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-family: 'Epilogue', sans-serif;
}

.param-box,
.param-box .tab-content {
  position: relative;
  overflow: visible; /* Pour que le select puisse dépasser */
  z-index: 10;       /* Un index supérieur à l’élément qui le cache */
}


/* Barre d'onglets */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

/* Bouton d'onglet */
.tab {
  flex: 1;
  background-color: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 0; 0; 6px;
  padding: 8px 12px;
  cursor: pointer;
  text-align: center;
  font-family: 'Epilogue', sans-serif;
  font-weight: 500;
  color: #444444;
  transition: background-color 0.3s;
}

.tab:hover {
  background-color: #eee;
}

/* Onglet actif */
.tab.active {
  background-color: #ffffff;
  border-color: #cc222b;
  color: #cc222b;
  z-index: 1;
}

/* Contenu d'onglet */
.tab-content {
  /* Par défaut, on met display: none sur les onglets inactifs via JS */
}

/* Chaque groupe de champ aura un espacement vertical */
.form-group {
  margin-bottom: 1rem; /* Ajustez selon vos besoins, ex. 12px ou 16px */
}

.form-colle {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-items: flex-start;
}

/* On peut aussi séparer label et select si on veut un alignement horizontal */
.form-group label {
  display: block;
  font-weight: 500;
  color: #444;
}

/* Ajuster le style du select */
.form-group select {
  width: 100%; /* ou auto, selon la mise en page */
  padding: 6px 8px;
  font-size: 0.9rem;
  font-family: 'Epilogue', sans-serif;
  border-radius: 0; 0; 6px;
}

/* Slider + input text côte à côte */
.slider-input {
  display: flex;
  align-items: center;
  gap: 10px; /* Espace entre le champ texte et le slider */
}

/* ========== Styles communs ========== */
input[type="range"] {
  -webkit-appearance: none; /* Annule le style par défaut sur WebKit */
  width: 150px;             /* Ajustez la largeur du slider selon vos besoins */
  background: transparent;  /* Pour éviter la couleur de fond par défaut */
}

/* ========== WebKit (Chrome, Safari, Opera) ========== */
/* La piste */
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;              /* épaisseur de la piste */
  background: #ddd;         /* couleur de la piste */
  border-radius: 0; 0; 2px;       /* bords arrondis */
}
/* La poignée */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; /* Annule le style par défaut */
  height: 16px;             /* hauteur de la poignée */
  width: 16px;              /* largeur de la poignée */
  border-radius: 0; 0; 50%;       /* forme ronde */
  background: #cc222b;      /* couleur rouge */
  cursor: pointer;          /* curseur de la souris */
  margin-top: -6px;         /* centre la poignée sur la piste (selon la taille) */
}

/* ========== Firefox ========== */
/* La piste */
input[type="range"]::-moz-range-track {
  height: 4px;
  background: #ddd;
  border-radius: 0; 0; 2px;
}
/* La poignée */
input[type="range"]::-moz-range-thumb {
  height: 16px;
  width: 16px;
  border-radius: 0; 0; 50%;
  background: #cc222b;
  cursor: pointer;
}

/* ========== Internet Explorer / Edge (ancien moteur) ========== */
input[type="range"]::-ms-track {
  height: 4px;
  background: #ddd;
  border-radius: 0; 0; 2px;
  border-color: transparent; /* retire la bordure */
}
input[type="range"]::-ms-thumb {
  height: 16px;
  width: 16px;
  border-radius: 0; 0; 50%;
  background: #cc222b;
  cursor: pointer;
  margin-top: 0; /* parfois nécessaire selon la version de Edge/IE */
}


div#sol {
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Bouton iconifié */
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #cc222b;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 0; 0; 6px;
  cursor: pointer;
  font-family: 'Epilogue', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: opacity 0.3s;
}

.btn-icon:hover {
  background-color: #000000;
}

/* Icône SVG dans le bouton */
.btn-icon .icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.sel-couleurs {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/* Ajoute une marge sous le titre de l’onglet */
.tab-content h3 {
  margin-bottom: 1rem; /* espace de 1rem sous le <h3> */
}

.form-colle h3 {
  margin-bottom: 0;
}

/* Ajoute de l’espace vertical entre chaque groupe de champ */
.tab-content .form-group {
  margin-bottom: 1rem;
}

/* Exemple de style pour select-sm, float1, etc. */
.select-sm {
  font-size: 0.9em;
  padding: 5px;
}

/* Wrapper personnalisé pour les selects avec pastille */
.custom-select-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.custom-select-wrapper .custom-select {
  padding-left: 30px; /* espace pour la pastille */
  border-radius: 0; 0; 6px;
}

/* La pastille de couleur */
.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 0; 0; 50%;
  background-color: #ccc; /* couleur par défaut */
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  pointer-events: none;
}

.float1 {
  text-align: center;
  width: 50px;
  font-size: 0.9rem;
  padding: 6px 8px;
  font-family: 'Epilogue', sans-serif;
  border-radius: 0; 0; 6px;
  border: 1px solid;
}

/* Barre d'onglets */
.img-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    justify-content: center;
}

/* Bouton d'onglet */
.img-btn {
  flex: 1;
  background-color: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 0; 0; 6px;
  padding: 8px 12px;
  cursor: pointer;
  text-align: center;
  font-family: 'Epilogue', sans-serif;
  font-weight: 500;
  color: #444444;
  transition: background-color 0.3s;
}

.img-btn:hover {
  background-color: #eee;
}

/* Onglet actif */
.img-btn.active {
  background-color: #ffffff;
  border-color: #cc222b;
  color: #cc222b;
  z-index: 1;
}

.img-btn-content {
  display: flex;
  flex-wrap: wrap; /* Permet le retour à la ligne */
  gap: 10px;       /* Espace entre les vignettes */
  align-items: flex-start; 
  /* Pour éviter qu'une vignette plus grande ne désaligne tout */
}

.img-btn-content div {
    /* Ajuste la taille ou la mise en page de chaque élément comme tu veux */
}

/* Chaque bloc d’élément (div#eXXX) */
.element-card {
  display: flex;
  flex-direction: column;  /* Image au-dessus, texte en dessous */
  align-items: center;
  width: 80px;             /* Largeur fixe ou adaptative */
  text-align: center;
  border: 1px solid #eee;  /* Optionnel, pour délimiter */
  padding: 5px;
  border-radius: 0; 0; 4px;
  background: #fff;        /* Couleur de fond */
}

/* L’image elle-même */
.element-card img {
  max-width: 60px;   /* Ajuste la taille de la vignette */
  height: auto;
  margin-bottom: 4px; /* Espace entre l’image et le label */
}

/* Le label */
.element-label {
  font-size: 12px;
  color: #333;
  /* Gère l’apparence du texte sous l’image */
}
  .modal {
    display: none; /* Masquée par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4); /* Fond semi-transparent */
  }
  .modal-content {
    background-color: #fff;
    margin: 20% auto; /* Centré verticalement et horizontalement */
    padding: 20px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    width: 400px;
    text-align: center;
    position: relative;
  }

  /* Bouton de fermeture (×) en haut à droite */
  .close {
    position: absolute;
    top: 12px;
    right: 16px;
    color: #888;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
  }
  .close:hover {
    color: #000;
  }
  .modal-form {
    margin-top: 15px;
  }
  .modal-buttons {
    margin-top: 20px;
    text-align: right;
  }
  .modal-buttons button {
    margin-left: 10px;
  }
  /* Bouton Oui en rouge */
  .btn-red {
    background-color: #cc222b;
    color: white;
    border: none;
  }
  .btn-red:hover {
    background-color: black;
  }
  /* Bouton Non en noir */
  .btn-black {
    background-color: black;
    color: white;
    border: none;
  }
  .btn-black:hover {
    background-color: #333;
  }

/* =========================================
   GRAND ÉCRAN : 3 colonnes (au-dessus de 1200px)
   ========================================= */
 @media (min-width: 1201px) {
  .main-content {
    display: grid;
    /* La 1re colonne pourra faire entre 220 et 350 px,
       la 2e colonne prend tout l’espace restant (1fr),
       la 3e colonne entre 200 et 300 px */
    gap: 20px;
    padding: 20px;
  }
}


/* =========================================
   ÉCRAN INTERMÉDIAIRE : 2 colonnes (768px à 1200px)
   ========================================= */
/* Écrans entre 768px et 1200px (tablettes, etc.) */
@media (max-width: 1200px) and (min-width: 768px) {
  .main-content {
        display: block;
        padding: 20px;
  }

  .left-panel   { grid-area: left; }
  .center-panel { grid-area: center; margin-top: 20px; }
  .right-panel  { grid-area: right; }

  /* Supprime les largeurs fixes internes */
  .param-box {
    width: auto;
    max-width: 100%; 
  }
.header-right {
    display: flex
;
    align-items: flex-end;
    gap: 20px;
    flex-direction: column;
}
}

/* =========================================
   PETIT ÉCRAN : 1 colonne (en dessous de 768px)
   ========================================= */
@media (max-width: 767px) {
  .main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
    /* Les 3 panels s’empilent dans l’ordre DOM */
    grid-template-areas:
      "left"
      "center"
      "right";
  }
  
  .left-panel,
  .center-panel,
  .right-panel {
    width: 100%;
    max-width: 100%;
    grid-area: unset;
  }
  
  /* Si besoin, réduire les marges/paddings */
  #main-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
