@font-face {
    font-family: 'AlienLeagueGrad';
    /*src: url('./fonts/alienleaguegrad.ttf') format('truetype');*/
    src: url('.fancy5k/font/alienleaguegrad.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'AlienLeagueExt';
    /*src: url('./fonts/alienleaguegrad.ttf') format('truetype');*/
    src: url('.fancy5k/font/alienleagueiiexpand.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Apompadour';
    /*src: url('./fonts/alienleaguegrad.ttf') format('truetype');*/
    src: url('.fancy5k/font/02_APompadourTextSample.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'bahnschrift';
    /*src: url('./fonts/alienleaguegrad.ttf') format('truetype');*/
    src: url('.fancy5k/font/bahnschrift.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}


/* ==========================================================================
   RESET GLOBAL
   Ces regles evitent les decalages par defaut du navigateur.
   ========================================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, sans-serif;
  color: #f5f5f5;

  /* Image de fond globale, centree et recadree pour remplir toute la page. */
  background: url(".fancy5k/images/img/bg3.jpg") center center / cover no-repeat fixed;
}

/* ==========================================================================
   STRUCTURE GENERALE DE LA PAGE
   .page contient la sidebar a gauche et le contenu principal a droite.
   ========================================================================== */

.page {
  min-height: 100vh;
  display: flex;
  width: 100%;
}

/* ==========================================================================
   SIDEBAR GAUCHE
   Fond noir semi-transparent a 70%.
   ========================================================================== */

.sidebar {
  width: 30%;
  min-height: 100vh;
  min-width:420px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.3);
}

/* Bloc rouge du haut : logo/titre, horloge analogique, date/heure. */
.sidebar-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "brand brand side"
    "date date side";
  gap: 6px;
  /*border: 1px solid red;*/
  padding: 0px 0px 0px 0px;
}

/* Zone logo + titre SERVER. */
.sidebar-brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  
}

.sidebar-brand img {
  width: 124px;
  height: auto;
  display: block;
}

.sidebar-brand span {
  font-family:"AlienLeagueGrad";
  font-size: 60px;
  letter-spacing: 0;
  
}

/* Bloc bleu a droite du bloc rouge. Il contient l'horloge analogique. */
.sidebar-side-block {
  grid-area: side;
  aspect-ratio: 1;
  /*border: 1px solid blue;*/
  justify-self: end;
  align-self: stretch;
  display: grid;
  place-items: center;
}

/* ==========================================================================
   HORLOGE ANALOGIQUE
   Le cadran est une image SVG, les aiguilles sont des div animees par app.js.
   ========================================================================== */

#clockContainer {
  position: relative;
  width: 100%;
  height: 100%;
  background: url(".fancy5k/images/icons_hp/clock.svg") no-repeat center;
  background-size: 100%;
}

#hour,
#minute,
#second {
  position: absolute;
  background: white;
  border-radius: 10px;
  transform-origin: bottom;
}

#hour {
  width: 1.8%;
  height: 25%;
  top: 25%;
  left: 48.85%;
  opacity: 0.8;
}

#minute {
  width: 1.6%;
  height: 30%;
  top: 19%;
  left: 48.9%;
  opacity: 0.8;
}

#second {
  width: 1%;
  height: 40%;
  top: 9%;
  left: 49.25%;
  opacity: 0.8;
  background: #c195aa;
}

/* Bloc jaune qui affiche la date et l'heure numeriques. */
.sidebar-date {
  font-family:"AlienLeagueExt";
  grid-area: date;
  /*border: 1px solid yellow;*/
  font-size: 26px;
}

/* ==========================================================================
   BLOC DOCKER VERT ET BLOC LIENS ORANGE
   Les deux blocs utilisent les memes styles de lignes cliquables.
   ========================================================================== */

.sidebar-docker {
  /*border: 1px solid green;*/
  margin-top: 26px;
  padding:0px;
  font-size: 18px;
}

.sidebar-custom-links {
  /*border: 1px solid orange;*/
  margin-top: 16px;
  padding:0px;
  font-size: 18px;
}

.sidebar-docker h1,
.sidebar-custom-links h1 {
  font-family:"APompadour";
  font-size: 20px;
  font-weight:100;
  letter-spacing:1px;
}

/* Ligne cliquable reutilisee pour les dockers et les liens custom. */
.docker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background:rgba(255,255,255,0.07);
  padding:6px 10px 4px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition-duration:.25s;
}

.docker:hover {background:rgba(255,255,255,0.15)}

#docker-affine .docker-icon {background-image:url(.fancy5k/images/icons_hp/Affine.svg);}
#docker-qbit .docker-icon {background-image:url(.fancy5k/images/icons_hp/bittorrent.svg);}
#docker-filebrowserq .docker-icon {background-image:url(.fancy5k/images/icons_hp/fileb.svg);}
#docker-teamspeak3 .docker-icon {background-image:url(.fancy5k/images/icons_hp/teamspeak.svg);}
#docker-sinusbot .docker-icon {background-image:url(.fancy5k/images/icons_hp/sinusbot.svg);}
#docker-plex .docker-icon {background-image:url(.fancy5k/images/icons_hp/plex.svg);}
#docker-minecraftserver .docker-icon {background-image:url(.fancy5k/images/icons_hp/minecraft.svg);}
#docker-adminer .docker-icon {background-image:url(.fancy5k/images/icons_hp/sql.svg);}
#docker-languagetool .docker-icon {background-image:url(.fancy5k/images/icons_hp/LT.svg);}
#docker-open-webui .docker-icon {background-image:url(.fancy5k/images/icons_hp/owui.svg);}
#docker-hytale-server .docker-icon {background-image:url(.fancy5k/images/icons_hp/hytale.png);background-size:38px;}
#custom-link-box .docker-icon {background-image:url(.fancy5k/images/icons_hp/http.svg);}
#custom-link-syncvideo .docker-icon {background-image:url(.fancy5k/images/icons_hp/syncvideo.svg);}
#custom-link-excalidraw .docker-icon {background-image:url(.fancy5k/images/icons_hp/excalidraw.svg);}

/* Partie gauche d'une ligne Docker : icone optionnelle + texte. */
.docker-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

/* Carre reserve a l'icone Docker. */
.docker-icon {
  width: 32px!important;
  height: 32px;
  /*border: 1px solid rgba(255, 255, 255, 0.35);*/
  flex: 0 0 32px;
  opacity:0.3;
  background-position:center center;
  background-repeat:no-repeat;
}
.docker .docker-main strong {text-transform:capitalize;font-size:16px;color:rgba(255,255,255,0.75)}
.docker:hover .docker-main strong {color:rgba(255,255,255,1)}

/* Etat docker en ligne. */
.running {
  font-size:14px;
  color: #00d26a;
  font-weight: bold;
}

/* Etat docker arrete. */
.stopped {
  font-size:14px;
  color: crimson;
  font-weight: bold;
}

/* Sous-texte des lignes : status Docker ou description du lien custom. */
.status {
  font-size: 12px;
  color: rgba(255,255,255,0.3)
}

/* ==========================================================================
   CONTENU PRINCIPAL DROIT
   Fond noir semi-transparent a 50%.
   ========================================================================== */

.content {
  flex: 1;
  min-height: 100vh;
  padding: 24px;
  background: rgba(0, 0, 0, 0);
}

/* Bloc rose contenant le logo Google et la barre de recherche. */
.main-search-block {
  /*border: 1px solid pink;*/
  padding: 24px;
  text-align: center;
}

/* Logo Google SVG inline dans le HTML. */
.logo-google svg {
  width: 320px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.logo-google svg path {fill:rgba(255,255,255,0.3);}

/* ==========================================================================
   BARRE DE RECHERCHE GOOGLE
   Formulaire, onglets Google/Images/YouTube, suggestions et boutons.
   ========================================================================== */

.google-box {
  width: 100%;
  max-width: 620px;
  margin: 30px auto 60px auto;
  text-align: center;
  font-family: Arial, sans-serif;
}

.search-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: Arial, sans-serif;
}

.search-tabs label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background:rgba(0,0,0,0.1);
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition-duration:.25s;
}

.search-tabs label:hover {
  background: rgba(0,0,0,0.3);border: 1px solid rgba(255,255,255,0.2);color:rgba(255,255,255,0.8)
}

/*.search-tabs input {
  accent-color: #1a73e8;
  cursor: pointer;
}*/
.search-tabs input[type="radio"] {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid #666;
    border-radius: 50%;
    background-color: #222;
    cursor: pointer;
    margin:0;
}

.search-tabs input[type="radio"]:checked {
    background: linear-gradient(0turn, rgba(0,105,255), rgba(50,170,255));
    border:1px solid rgba(0,0,0,0.75);
}

.search-wrapper {
  position: relative;
  width: 100%;
}

#googleSearchInput {
  width: 100%;
  height: 46px;
  padding: 0 150px 0 18px;
  font-size: 16px;
  /*border: 1px solid #dfe1e5;*/
    background:rgba(0,0,0,0.5);
    border:0;
    color:white;
  border-radius: 24px;
  outline: none;
  box-sizing: border-box;
}

/* Bouton de recherche place directement dans la barre, a droite. */
.google-search-button {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 36px;
  padding:5px 0px 0px 0px;
  border: 0;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  color: #3c4043;
  font-size: 14px;
  cursor: pointer;
}

.google-search-button svg {height:20px;}

.google-search-button:hover {
  background: rgba(255,255,255,0.2);
}

#googleSearchInput:hover,
#googleSearchInput:focus {
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
  border-color: transparent;
}

/* Quand les suggestions sont ouvertes, les coins bas de la barre deviennent carres. */
.search-wrapper.suggestions-open #googleSearchInput {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

/* Liste des suggestions sous la barre de recherche. */
#suggestionsBox {
  display: none;
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  z-index: 9999;
  overflow: hidden;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  text-align: left;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(40px);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 4px 6px rgba(32, 33, 36, 0.28);
}

#suggestionsBox li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 18px;
  cursor: pointer;
  font-size: 16px;
  color: rgba(255,255,255,0.5);
}
#suggestionsBox li strong {color:rgba(255,255,255,0.8)}

#suggestionsBox li:hover,
#suggestionsBox li.selected {
  background: rgba(0,0,0,0.8);
}

.suggestion-icon {
  color: #9aa0a6;
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.suggestion-text {
  flex: 1;
}

.suggestion-text strong {
  font-weight: 700;
}

.typed-part {
  font-weight: 400;
}

/* ==========================================================================
   BLOC CYAN : TUILES PERSONNALISABLES
   La grille fait 5 colonnes sur grand ecran et devient responsive ensuite.
   ========================================================================== */

.tiles-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

.custom-tile {
  min-height: 110px;
  padding: 22px;
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
  color: #f5f5f5;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  overflow: hidden;
  transition-duration:.5s;
}

.custom-tile img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.custom-tile strong {
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-family:bahnschrift;
  font-weight:100;
}

.custom-tile:hover {
  background: rgba(0,0,0,0.5);
  box-shadow: 0px 0px 40px -3px rgba(255,255,255,0.1);
}

/* ==========================================================================
   RESPONSIVE
   Sur ecran etroit, la sidebar passe au-dessus du contenu principal.
   ========================================================================== */

@media (max-width: 999px) {
  .page {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
  }

  .content {
    min-height: auto;
  }

  .tiles-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}
