@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f7f7f7;
  color: #333;
}

header {
  background-color: #e2e0e0;
  color: #e60000;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

header h1 {
  margin: 0;
  font-weight: 700;
  font-size: 2.2em;
  color: #e60000;
}


h1 {
  margin: 0;
  font-weight: 700;
  font-size: 2.2em;
}

h3 {
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 10px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}

#conteneurPrincipal {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0 20px; /* optionnel : ajoute un peu d'air sur les bords */
  box-sizing: border-box;
}
#conteneurBoutons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  padding: 10px;
  background-color: #fff;
}

/* Style des boutons dans ce conteneur */
#conteneurBoutons button {
  width: auto;
  display: inline-block;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 20px;
  white-space: nowrap;
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Style des catégories */
#conteneurBoutons button.cat-freebox {
  background-color: #e60000;
  color: white;
}

#conteneurBoutons button.cat-freebox:hover {
  background-color: #cc0000;
}

#conteneurBoutons button.cat-mobile {
  background-color: #3498db;
  color: white;
}

#conteneurBoutons button.cat-mobile:hover {
  background-color: #2980b9;
}

#conteneurBoutons button.cat-tv {
  background-color: #2ecc71;
  color: white;
}

#conteneurBoutons button.cat-tv:hover {
  background-color: #27ae60;
}

/* Virgulage visuel */
#conteneurBoutons button::after {
  content: ',';
  margin-left: 3px;
  color: #ccc;
}

#conteneurBoutons button:last-child::after {
  content: '';
}


#colonnes {
  display: flex;
  flex-direction: column;
  width: 30%;
  background-color: #fff;
}

#zonePrincipale {
  width: 70%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background-color: #fff;
}

#conteneurBoutons,
#conteneurCompositionsSauvegardees {
  width: 100%;
  padding: 10px;
  background-color: #fff;
  height: auto;
  overflow-y: auto;
}

.conteneur-categorie {
  margin-bottom: 15px;
}

button {
  margin: 2px 0;
  padding: 5px 8px;
  width: 100%;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  transition: all 0.3s ease;
}

button.cat-freebox {
  background-color: green;
  color: white;
}

button.cat-freebox:hover {
    
  background-color: #cc0000;
}

button.cat-mobile {
  background-color: #3498db;
  color: white;
}

button.cat-mobile:hover {
  background-color: #2980b9;
}

button.cat-tv {
  background-color: #2ecc71;
  color: white;
}

button.cat-tv:hover {
  background-color: #27ae60;
}

#conteneurMessage {
  width: 100%;
  padding: 10px;
  background-color: #fff;
}

#zoneMessage {
  width: 100%;
  height: 200px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: none;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background-color: #fff;
}

.groupe-boutons {
  display: flex;
  gap: 10px;
}

.groupe-boutons button {
  flex: 1;
  background-color: transparent;
  color: #e60000;
  border: 1px solid #e60000;
  padding: 8px 12px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.groupe-boutons button:hover {
  background-color: #e60000;
  color: white;
}

#conteneurAjoutBouton {
  width: 100%;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.95);
  margin-top: 10px;
}

#conteneurAjoutBouton input,
#conteneurAjoutBouton textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  font-size: 14px;
}

.tuiles-categorie {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tuile-categorie {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tuile-categorie input {
  display: none;
}

.tuile {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: transform 0.3s ease, border 0.3s ease;
}

.tuile:hover {
  transform: scale(1.1);
}

.tuile-categorie input:checked + .tuile {
  border: 2px solid #e60000;
}

.tuile.cat-freebox {
  background-color: #e60000;
}

.tuile.cat-mobile {
  background-color: #3498db;
}

.tuile.cat-tv {
  background-color: #2ecc71;
}

#boutonAjouter {
  background-color: #e60000;
  color: white;
  font-weight: 500;
  padding: 8px 12px;
}

#boutonAjouter:hover {
  background-color: #cc0000;
}

/* Modale centrée */
#modaleSauvegarde {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  z-index: 999;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  width: 300px;
}

#modaleSauvegarde h3 {
  margin-top: 0;
}

#modaleSauvegarde input {
  width: 100%;
  padding: 8px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

#modaleSauvegarde button {
  background-color: #e60000;
  color: white;
  border: none;
  padding: 8px 12px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#modaleSauvegarde button:hover {
  background-color: #cc0000;
}

#modaleSauvegarde .fermer {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 18px;
  color: #999;
  cursor: pointer;
}
#effacerTexte {
  background-color: #bbb;
  color: #fff;
  font-weight: 500;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  margin-top: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#effacerTexte:hover {
  background-color: #999;
}


/* Conteneur des boutons en haut à droite */
#zoneSauvegarde {
  display: flex;
  gap: 10px;
}

/* Style des icônes Lucide */
#zoneSauvegarde svg {
  width: 24px;
  height: 24px;
  stroke: #e60000;
  cursor: pointer;
  transition: stroke 0.2s ease, transform 0.2s ease;
}

#zoneSauvegarde svg:hover {
  stroke: #cc0000;
  transform: scale(1.1);
}

/* Cache le champ input de type fichier */
#zoneSauvegarde input[type="file"] {
  display: none;
}
