body, html {
    margin: 0;
    font-family: 'Source Code Pro', monospace;
  }
  
  #app {
    display: flex;
    height: 100vh;
    background-color: #111; /* fond noir autour du main-content */
  }
  
  #main-content {
    flex-grow: 1;
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px; /* tu peux ajuster ici si besoin */
    box-sizing: border-box;
    height: 100vh; /* ou une hauteur fixe adaptée */
  overflow: hidden;
  }
  
  .main-inner {
    width: 100%;
    height: 100%;
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    box-sizing: border-box;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
  }
  
  
  
  #sidebar {
    min-width: 250px;
    width: 250px;
    background-color: #111;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    transition: width 0.3s ease;
    overflow: hidden;
  }
  
  .sidebar-top {
    flex-grow: 1;
  }
  
  #sidebar-footer {
    margin-top: 2rem;
  }
  
  
  #sidebar ul {
    list-style: none;
    padding: 0;
  }
  
  #sidebar li {
    margin: 1rem 0;
  }

  #sidebar a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
  }
  
  #sidebar a:hover {
    text-decoration: underline;
  }
  

  
  


  
  #sidebar.collapsed {
    width: 30px;
    min-width: 30px;
  }

  #sidebar.collapsed #toggle-sidebar {
    display: none;
  }
  
  #sidebar.collapsed:hover #toggle-sidebar {
    display: block;
  }
  

  .sidebar-header {
    display: flex;
    align-items: flex-end;
       
    margin-bottom: 35px;
    justify-content: space-between;
    height: 40px;
  }

  .sidebar-header img {
    width: 35px;
    height: min-content;
   }
  
  .sidebar-header h1 {
    font-size: 2.1rem;
    text-align: center;
    transition: opacity 0.3s ease;
    margin: 0px;
    font-family: "Jersey 15", sans-serif;
    margin-top: 7px;

  }
  
  #sidebar.collapsed .sidebar-header h1 {
    opacity: 0;
    pointer-events: none;
  }

  .sidebar-links img
  {
    width: 28px;
  }
  
  .sidebar-links li a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    transition: padding 0.3s ease;
  }
  
  .sidebar-links li a span {
    transition: opacity 0.3s ease;
  }
  
  #sidebar.collapsed .sidebar-links li a span {
    opacity: 0;
    pointer-events: none;
  }


  
  .user-info .user-text,
  .user-info button {
    transition: opacity 0.3s ease;
  }

  .user-text p {
    margin: 4px 0;
    font-size: 12px;
    color: #ccc;
  }
  .user-text p:first-child {
    font-weight: 600;
    color: white;
    font-size: 14px;
  }
  
  
  #sidebar.collapsed .user-info .user-text,
  #sidebar.collapsed .user-info button {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
  }

  .page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: solid 1px #cfcfcf;
    padding-bottom: 15px;
  }
  .page-header h2 {
  margin: 0px;
}
  
  #toggle-sidebar {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 4px;
    border-radius: 4px;
  }
  #toggle-sidebar:hover {
    background-color: #393939;
}
  #toggle-sidebar.rotated {
    transform: rotate(180deg);
  }
  
  
  .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding: 1rem 0;
    justify-content: space-between;
  }
  
  .user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: solid 1px #383838;
  }
  
  .user-menu-wrapper {
    position: relative;
  }
  
  .user-menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
  }
  
  .user-menu {
    position: absolute;
    top: 30px;
    right: 0;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    padding: 0.5rem;
    z-index: 10;
  }
  
  .user-menu button {
    background: none;
    border: none;
    padding: 0.5rem;
    width: 100%;
    cursor: pointer;
    color: #333;
    text-align: left;
  }
  
  .user-menu.hidden {
    display: none;
  }
  
  #sidebar.collapsed .user-text,
  #sidebar.collapsed .user-menu-wrapper {
    display: none;
  }


  .main-screen {
    display: flex;
    /* justify-content: center; */
    align-items: center;
   
    width: 100%;
    position: relative;
  }

  @font-face {
    font-family: 'Nexa';
    src: url('public/font/nexa/Nexa-ExtraLight.ttf') format('truetype');
    font-weight: 200;
  }
  
  .frame {
    background-color: black;
    border-radius: 8px;
    overflow: hidden;
    max-height: 90vh;
    font-family: 'Nexa', sans-serif;
    position: relative;
    
  }

  .pixel-mask
  {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: 11;
  }
  .thumbnail-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0px;

  }
  
  .thumbnails-bar {
    display: flex;
    overflow-x: auto;
    padding: 10px 0px;
    
    width: 100%;
    box-sizing: border-box;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
  }
  
  .thumbnail {
    flex: 0 0 auto;
    width: 384px;
    height: 128px;
    border: 4px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border 0.2s ease;
  }

  .action-thumbnails
  {
    display: flex;
    justify-content: flex-end;
  }
  
  
  .thumbnails-bar::-webkit-scrollbar {
    height: 8px;
  }
  .thumbnails-bar::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 4px;
  }
  
  
  
  .thumbnail.selected {
  
    border: solid 4px #FFD700;
    border-radius: 12px;
  }
  

  .screen-editor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
    width: 100%;
    justify-content: space-between;
    flex: 1;
  }

  .action-buttons {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin: 10px 0;
    gap: 15px;
  }
  
  .btn-edit {
    padding: 10px 18px;
    font-size: 14px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
    cursor: pointer; 
    font-family: 'Source Code Pro', monospace;
  }

  .btn-save {
    padding: 10px 18px;
    font-size: 14px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
    cursor: pointer; 
    font-family: 'Source Code Pro', monospace;
  }

  .btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #ccc;
    color: #666;
    border: 1px solid #aaa;
  }
  

  .btn-add {
    padding: 10px 18px;
    font-size: 14px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
    cursor: pointer; 
    font-family: 'Source Code Pro', monospace;
  }

  .btn-add-frame
  {
    padding: 10px 18px;
    font-size: 14px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
    cursor: pointer; 
    font-family: 'Source Code Pro', monospace;
  }
  

  
  
 .editable-element:hover {
    outline: 3px solid #339CFF;
    cursor: pointer;
  }

  /* Ne pas appliquer le hover si on est sur la page edit */
.page-edit .editable-element:hover {
    outline: none;
    cursor: default;
  }

  .archive-container .editable-element:hover {
    outline: none;
    cursor: default;
  }
  
  

  .selected-element {
    outline: 3px solid #339CFF;
    position: relative;
  }
  
  .resize-handle {
    width: 8px;
    height: 8px;
    background: white;
    border: 1px solid #339CFF;
    position: absolute;
    z-index: 15;
  }
  
  .resize-handle.top-left {
    top: -6px;
    left: -6px;
  }
  
  .resize-handle.top-right {
    top: -6px;
    right: -6px;
  }
  
  .resize-handle.bottom-left {
    bottom: -6px;
    left: -6px;
  }
  
  .resize-handle.bottom-right {
    bottom: -6px;
    right: -6px;
  }

  .config-panel {
    background-color: #1f1f1f;
    color: white;
    border: 1px solid #333;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: sans-serif;
  }
  
  .config-panel .section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
  }
  
  .config-panel h3 {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
  }
  
  .config-panel label {
    font-size: 11px;
    color: #aaa;
    background-color: rgb(245 245 245);
    padding: 8px;
    border-radius: 6px 0px 0px 6px;
  }
  
  .config-panel input,
  .config-panel textarea {
    background-color: rgb(245, 245, 245);
    color: rgb(26, 26, 26);
    border: 1px solid rgba(230, 230, 230, 0);
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    border-radius: 0px 6px 6px 0px;
    width: 100%;
  }
  
  .config-panel input[type="color"] {
    padding: 3px;
    height: 29px;
    width: 25px;
    cursor: pointer;
    border-radius: 6px 0px 0px 6px;
  }

  .config-row
  {
    display: flex;
    align-items: center;
  }


.color-control {
    display: flex;
    align-items: center;
  }
  
  .color-box {
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
  }
  
  .hex-field {
    width: 80px;
    text-transform: uppercase;
    font-family: monospace;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  
  .opacity-field {
    width: 50px;
    text-align: right;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  
  .percent-symbol {
    font-size: 14px;
    margin-left: 2px;
  }

  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
  }
  
  .modal {
    background: white;
    padding: 20px;
    border-radius: 8px;
    min-width: 300px;
    position: relative;
  }
  
  .modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
  }
  
  .modal-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
    margin: 20px 0px 20px 0px;
  }
  
  .modal-tabs button {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    width: 50%;
    font-family: 'Source Code Pro', monospace;
    font-size: 18px;
  }
  
  .modal-tabs button.active {
    color: #004a99;
    border-bottom: 3px solid #0070ba;
  }
  
  .modal-tabs button:hover {
    color: #004a99;
  }
  
  
  .modal-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-create-empty {
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
  }
  


  .menu-frame-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
    background: #717171d1;
    color: white;
    padding: 0px 6px;
    border-radius: 4px;
    font-size: 22px;
    font-weight: bold;
    border: solid 1px #6f6f6f;
    display: none;
    z-index: 20;
  }
  
  .contextMenu-frame {
    position: absolute;
    top: 32px;
    right: 8px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 30;
  }
  
  .contextMenu-frame > div {
    display :flex;
    align-items:  center;
    gap : 8px;
    padding : 6px 12px;
    cursor : pointer;
    font-family: 'Source Code Pro', monospace;
    font-family: 10px;
    border-radius: 2px;
  }

  
  .contextMenu-frame > div:hover {
    background-color: #e0e0e0;
  }

  .contextMenu-frame img {
   width: 18px;
   height: 18px;
  }
  
  .screen-controls
  {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    width: 100%;
  }

  .screen-controls img
  {
    cursor : pointer;
    height : 32px;
  }

  .emoji-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
  }
  
  .emoji-btn {
    font-size: 25px;
    padding: 6px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.1s ease;
  }
  
  .emoji-btn:hover {
    transform: scale(1.2);
  }
  
  .floating-emoji {
    position: absolute;
    bottom: 10px;
    font-size: 50px;
    animation: floatUp 4s ease forwards;
    pointer-events: none;
  }
  
  @keyframes floatUp {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(-200px);
    }
  }

  .wifi-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    /* background: rgba(255, 255, 255, 0.9); */
    padding: 8px 12px;
    font-size: 14px;
    color: #7d7d7d;
    border-radius: 6px;
    /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); */
    z-index: 100;
  }

  .input-group {
    margin-bottom: 20px;
    display: flex;
    width: 100%;
    justify-content: space-between;
  }

  .input-group input{
    font-size: 16px;
    border: 1px solid #d3d3d3;
    border-radius: 8px;
    padding: 10px 10px;
    font-family: 'Source Code Pro', monospace;
    }


  .input-label-container {
    margin-bottom: 6px;
  }
  
  .input-label-container label {
    font-weight: bold;
    display: block;
  }
  
  .input-description {
    font-size: 0.85rem;
    color: #666;
    margin-top: 2px;
  }

  .settings-form
  {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  input:focus {
    border-color: #62ff01; /* bleu */
    outline: none; /* supprime le contour par défaut */
    box-shadow: 0 0 0 2px rgba(98, 255, 1, 0.25); /* effet glow */
  }

  .settings-nav {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
  }
  
  .settings-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .settings-nav a {
    display: inline-block;
    padding: 0.5rem 0;
    color: #444;
    font-weight: 500;
    text-decoration: none;
    position: relative;
  }
  
  .settings-nav a.active {
    color: #62ff01;
  }
  
  .settings-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 2px;
    background: #62ff01;
  }
  
  .progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 8px;
    width: 0%;
    background-color: yellow;
    transition: width 0.3s ease;
    z-index: 10;
  }

  .frame-name-input {
    border: none;
    outline: none;
    font-size: 24px;
    width: 100%;
    margin-bottom: 8px;
    background: transparent;
    color: inherit;
    font-family: 'Source Code Pro', monospace;
    font-weight: bold;
  }

  .frame-name-input:focus {
    outline: none;
    box-shadow: none;
    border: none;
  }


  /* bouton d'ajout */
.btn-add-dynamic {
    padding: 10px 18px;
    font-size: 14px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
    cursor: pointer; 
    font-family: 'Source Code Pro', monospace;
    width: fit-content;
  }
  
  /* modale */
  .modal-new-dynamic {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
  }
  
  /* contenu de la modale */
  .modal-content-new-dynamic {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
  }
  
  /* bouton fermer */
  .close {
    color: #aaa;
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
  }
  
  .close:hover {
    color: #000;
  }
  
  /* formulaire */
  .dynamic-values-form .input-group {
    margin-bottom: 16px;
  }
  
  .input-label-container {
    margin-bottom: 6px;
  }
  
  .input-label-container label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
  }
  
  .input-description {
    font-size: 12px;
    color: #666;
  }
  
  .input-group input {
    padding: 8px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
  }
  
  /* boutons dans le formulaire */
  .dynamic-values-form .btn-test,
  .dynamic-values-form .btn-save {
    padding: 10px 18px;
    font-size: 14px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
    cursor: pointer; 
    font-family: 'Source Code Pro', monospace;
  }
  

  


  .dynamic-value-list {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column-reverse;
  }

  .dynamic-item {
    padding: 10px;
   
  }

  .dynamic-item {
  
    padding: 12px;
    
    display: flex;
    gap: 5px;
    flex-direction: column;
    color: black;
    font-size: 14px;
  }

  .dynamic-link {
    color: #000000;
    cursor: pointer;
    margin-top: 5px;
    font-size: 0.9em;
    display: inline-block;
    text-decoration: underline;
  }
  
  .dynamic-popup {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    min-width: 180px;
    bottom: -95%;
    border-radius: 5px;
  }
  
  .dynamic-popup div {
    padding: 10px 10px;
    cursor: pointer;
  }
  
  .dynamic-popup div:hover {
    background-color: #f0f0f0;
  }

  .toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0.95;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
  }
  
  .toast.error {
    background-color: #e74c3c;
  }

  .thumbnail-archive
  {
    flex: 0 0 auto;
    width: 268px;
    height: 89px;
    border: 4px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border 0.2s ease;
    transition: scale 0.2s ease;
    border : 3px rgba(255, 255, 0, 0) solid;
  }

  .thumbnail-archive:hover
  {
    border : 3px yellow solid;
    scale: 1.02;
  }
  
  .archive-container
  {
    width: 840px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 0px;
    justify-content: flex-start;
    max-height: 300px;
    overflow-y: scroll;
  }
  
  .archive-name
  {
    margin: 0px;
  }

  .modal-title {
    font-size: 22px;
    font-weight: bold;
    margin: 10px 0px 30px 0px;
   
  }
  
  .thumbnail-empty {
    width: 268px;
    height: 89px;
    border-radius: 8px;
    border: 3px solid #ffffff00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ffffff;
    cursor: pointer;
    transition: scale 0.2s ease;
    transition: border 0.2s ease;
    background-color: black;
    margin-bottom: 8px;
  }
  
  .thumbnail-empty:hover {
   
    color: #c5c5c5;
    border : 3px yellow solid;
    /* scale: 1.05; */
  }

  .btn-delete
  {
    padding: 10px 18px;
    font-size: 14px;
    background-color: rgb(236, 34, 34);
    color: white;
    border: none;
    border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
    cursor: pointer; 
    font-family: 'Source Code Pro', monospace;
  }

  .btn-upload
  {
    border: 1px solid #c2c2c2;
    border-radius: 3px;
    padding: 5px 10px;
    cursor: pointer;
    font-family: 'Source Code Pro', monospace;
  }
  
  .btn-upload:hover
  {
    border: 1px solid #c2c2c2;
    background-color: #e1e1e1;
    scale: 1.01;
  }

  .upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
  }
  
  .upload-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
  }
  
  .upload-modal-content {
    position: relative;
    max-width: 600px;
    margin: 5% auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    z-index: 10000;
    display: flex;
    flex-direction: column;
  }
  
  .upload-modal-header {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .upload-modal-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
  }
  
  .upload-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
  }
  
  .upload-tab.active {
    background: #f0f0f0;
  }
  
  .upload-modal-body {
    padding: 1rem;
    min-height: 200px;
  }
  
  .upload-tab-content.hidden {
    display: none;
  }

  .upload-tab-content {
    
    display: flex;
    flex-direction: column;

  }
  


  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 30px;
    max-height: 300px;
    overflow-y: scroll;
  }
  
  .gallery-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* carré */
    object-fit: contain;
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
  }
  
  .gallery-image:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }
  

  .gallery-search-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
  }
  

  .drop-zone {
    border: 2px dashed #ccc;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    background: #f9f9f9;
    transition: border-color 0.3s ease;
  }
  
  .drop-zone.dragover {
    border-color: #4a90e2;
    background: #eef6ff;
  }
  
  #image-upload-preview img {
   
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  
  #image-upload-button {
    margin-top: 16px;
    padding: 10px 18px;
    font-size: 14px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
    cursor: pointer; 
    font-family: 'Source Code Pro', monospace;
    transition: background-color 0.2s ease;
  }
  
  #image-upload-button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
  }
  
  #image-upload-button:hover:enabled {
    background-color: #357ABD;
  }

  #image-upload-preview {
    width: 160px;
    height: 160px;
    margin: 16px auto 0;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    display: none;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }
  
  #image-upload-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
  }

  .user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fafafa;
  }
  
  .user-card img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
  }
  
  .user-card select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size :16px
  }

  .user-list
  {
    display: flex;
    gap: 10px;
    flex-direction: column;
  }

  .search-bar {
   
    padding: 8px 12px;
    margin-bottom: 20px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
  }
  
  .user-text-list {
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  
  .user-name {
    font-weight: 500;
  }
  
  .user-email {
    font-size: 14px;
    color: #666;
  }

  .edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(6px);
    background-color: rgba(255, 255, 255, 0.4);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
  }
  
  .edit-overlay-message {
    background-color: white;
    padding: 20px 30px;
    border-radius: 8px;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 15px;
    font-weight: 500;
    text-align: center;
  }
  
  .edit-overlay-message p {
    margin: 10px 0;
  }
  
  .admin-avatar-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
  }
  
  .admin-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    color: #333;
  }
  
  .admin-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 4px;
  }


  .page-liste {
    padding: 2rem;
    font-family: Arial, sans-serif;
  }
  
  .liste-content {
    margin-top: 2rem;
  }
  
  .liste-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
  }
  
  .liste-table thead {
    background-color: #f5f5f5;
  }
  
  .liste-table th,
  .liste-table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
    font-size: 15px;
  }
  
  .liste-table input[type="text"] {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
  }
  
  /* .btn-add,
  .btn-save {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    background-color: #111;
    transition: background-color 0.2s ease;
  } */

  
  .liste-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 1rem;
  }


  
  .integration-box {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 30px;
    background-color: #fafafa;
  }
  
  .integration-box h2 {
    margin-top: 0;
    font-size: 1.25rem;
    margin-bottom: 12px;
  }
  
  .integration-box ul {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    gap: 24px;
    align-items: center;
  }

  .integration-box a,
.integration-box a:visited {
  text-decoration: none;
  color: inherit;
}

.integration-box a:hover {
  text-decoration: none;
  color: inherit;
}
  
  .integration-box li {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #cccccc;
    padding: 4px 6px;
    border-radius: 3px;
  }
  
  .integration-logo {
    width: 32px;
    height: auto;
    border-radius: 3px;
  }

  .integration-btn {
       
        font-size: 16px;
        border: none;
        background-color: #007bff00;
        color: #000000;
        border-radius: 4px;
        cursor: pointer;
      
  }
  
 
  
  .integration-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  
  .integration-modal.hidden {
    display: none;
  }
  
  .modal-content-itg {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  
  .modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
  }
  
  .modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
  }
  
  .modal-body label {
    font-weight: bold;
    margin-bottom: 4px;
  }
  
  .modal-body input,
  .modal-body select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
  }
  
  .modal-body button {
    padding: 10px 18px;
    font-size: 14px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
    cursor: pointer; 
    font-family: 'Source Code Pro', monospace;
  }
  

  

  
  .modal-body button.modal-add:hover,
  .modal-body button.modal-save:hover {
    opacity: 0.9;
  }

  .hidden {
    display: none !important;
  }
    

  .input-API
  {
    padding: 10px 10px;
    margin-right: 10px;
    border: 1px solid #c4c4c4;
    border-radius: 7px;
    font-size: 15px;
    width: 230px;
  }

  .APItag
  {
    position: absolute;
    border: red solid 4px;
    padding: 0px 5px;
    border-radius: 7px;
    top: 5px;
    left: 5px;
    z-index: 15;
    color: white;
    font-weight: bold;
    font-size: 12px;
  }

  .game-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .game-card {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
  }
  
  .game-icon {
    width: 48px;
    height: 48px;
    margin-right: 12px;
  }
  
  .game-info {
    display: flex;
    flex-direction: column;
  }
  
  .game-name {
    margin: 0;
    font-size: 1.1rem;
  }
  
  .game-description {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: #666;
  }

  .btn-new-game {
    padding: 10px 18px;
    font-size: 14px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
    cursor: pointer; 
    font-family: 'Source Code Pro', monospace;
    width: fit-content;
  }
  
  .results-section,
  .leaderboard-section {
    margin-top: 24px;
  }
  
  table {
    width: 100%;
    border-collapse: collapse;
  }
  
  th, td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
  }
  
  h2 {
    margin-bottom: 8px;
  }
  
  
  .results-list,
  .leader-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .game-result-card,
  .leader-card {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
  }
  
  .result-date,
  .leader-rank {
    font-weight: bold;
    margin-right: 8px;
  }
  
  .result-players,
  .leader-player,
  .leader-wins {
    flex: 1;
  }
  
  .pong-sections-container {
    display: flex;
    gap: 24px;
  }
  
  .results-list,
  .leader-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .game-result-card,
  .leader-card {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
  }
  
  .result-date {
    width: 80px;
    font-weight: bold;
  }
  
  .result-players-container,
  .leader-player-block {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
  }
  
  .player-block {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
  }
  
  .versus {
    margin: 0 8px;
    font-weight: bold;
  }
  
  .leader-rank {
    width: 40px;
    font-weight: bold;
  }
  
  .leader-wins {
    margin-left: auto;
    font-style: italic;
  }
  
  .modal-play-time {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .modal-play-time.hidden {
    display: none;
  }
  .modal-play-time-content {
    position: relative;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 320px;
    width: 100%;
  }
  /* .time-options label,
  .unlimited-option {
    display: block;
    margin: 8px 0;
  }
  .modal-actions-play-time {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
  } */

  .modal-play-time {
    /* fond et positionnement */
  }
  .modal-play-time-content {
    position: relative;
    /* autres styles */
  }
  .modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
  }
  .time-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 10px;
  }
  
  #toast {
    position: fixed; bottom: 2em; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.85); color: #fff; padding: 1em 2em;
    border-radius: 8px; display: none; align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 1000;
  }
  #toast.show { display: flex; }
  #toastMessage { margin-left: 0.5em; }
  #joinForm { display: none; margin-top: 2em; }
  #joinForm input, #joinForm button { padding: 0.5em; font-size: 1em; }
  #joinForm button { margin-left: 0.5em; }
  #status, #instructions, #error, #queueList { margin: 1em 0; }
  #status { font-weight: bold; }
  #instructions { color: green; }
  #error { color: red; }
  #queueList { color: blue; }

.btn-retry
{
  padding: 10px 18px;
  font-size: 14px;
  background-color: black;
  color: white;
  border: none;
  border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
  cursor: pointer; 
  font-family: 'Source Code Pro', monospace;
  width: fit-content;
}

.btn-start
{
  padding: 10px 18px;
  font-size: 14px;
  background-color: black;
  color: white;
  border: none;
  border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
  cursor: pointer; 
  font-family: 'Source Code Pro', monospace;
  width: fit-content;
}



.my-ghost {
  background-color: #ccc !important;
 
  /* garde la même largeur/hauteur que l'original */
}
.my-ghost * {
  visibility: hidden !important;
}

.no-select {
  user-select: none !important;
}

.copy-btn
{
  padding: 10px 18px;
  font-size: 14px;
  background-color: black;
  color: white;
  border: none;
  border-radius: 6px 6px 6px 6px / 9px 9px 9px 9px;
  cursor: pointer; 
  font-family: 'Source Code Pro', monospace;
  width: fit-content;
}

#linkInput
{
  padding: 8px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-right: 10px;
  width: 250px;
}



  
  
  
  

  
  
  
  
  

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

  