/* Dar بن جامع — thème clair, moteur aligné sur kangoulya.org
   Carousel fancy (ul/li), chat Transcendentis, radio inline. */

@font-face { font-family: 'source_sans_proregular'; src: url('../fonts/sourcesanspro-regular-webfont.ttf') format('truetype'); }
@font-face { font-family: 'source_sans_probold';    src: url('../fonts/sourcesanspro-bold-webfont.ttf')    format('truetype'); }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  width: 100%;
  font-family: source_sans_proregular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: #222;
  background: #f4efe6 url('../background.jpg') no-repeat center center fixed;
  background-size: cover;
  /* Le carousel (display:flex large) peut déborder → bloque la scrollbar horizontale
     au niveau page, tout en gardant le scroll vertical normal. */
  overflow-x: hidden;
}

a { color: #1a5490; text-decoration: none; }
a:hover, a:focus { color: #d04200; text-decoration: underline; }

.element-invisible {
  border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute; width: 1px;
}

/* Logo flottant */
#logo {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 4.5em;
  height: 4.5em;
  background: url('../images/logo.png') no-repeat center/contain;
  opacity: 0.9;
  z-index: 10;
}

.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 1em;
}

/* =============== HEADER =============== */
#header { text-align: center; padding: 1em 0; }

#nyancat { width: 242px; max-width: 54vw; max-height: 18vh; opacity: 0.9; border-radius: 8px; box-shadow: 0 0 24px rgba(0, 255, 148, 0.16); }
#nian {
  width: 242px;
  max-width: 64vw;
  border-radius: 10px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.15);
  transition: transform .15s ease;
  cursor: pointer;
}
#nian:hover { transform: scale(1.03); }

/* =============== TRANSCENDENTIS CHAT INPUT =============== */
#text-angels {
  margin-top: .9em;
  width: min(420px, 80vw);
  padding: .55em .9em;
  font: inherit;
  font-size: 16px;
  color: #1a2430;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(26, 84, 144, .35);
  border-radius: 22px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
#text-angels:focus {
  border-color: rgba(208, 66, 0, .75);
  box-shadow: 0 0 0 2px rgba(208, 66, 0, .18);
}
#text-angels::placeholder { color: rgba(26, 84, 144, .55); font-style: italic; }

/* =============== ANGELS RESPONSE CONSOLE =============== */
#angels-response {
  max-height: 38vh;
  overflow-y: auto;
  margin: 1em 0;
  padding: .85em 1em;
  font-size: 14px;
  line-height: 1.55;
  color: #222;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  scrollbar-width: thin;
}
#angels-response:empty { display: none; }
.angels-console { display: flex; flex-direction: column; gap: .45em; }
.angels-line {
  padding: .25em .5em;
  border-left: 3px solid rgba(26, 84, 144, .25);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 13px;
  word-break: break-word;
}
.angels-line .angels-meta { color: #1a5490; margin-right: .42em; font-weight: 600; }
.angels-line.system { border-left-color: rgba(208, 66, 0, .35); color: #5a3820; }
.angels-line.user   { border-left-color: rgba(26, 84, 144, .55); color: #0e2a48; background: rgba(26, 84, 144, .08); }
.angels-line.error  { border-left-color: rgba(200, 40, 40, .55); color: #962020; }

/* =============== CAROUSEL (fancy, ul/li, JS-driven) =============== */
.carousel {
  display: flex;
  width: max-content;
  cursor: grab;
  user-select: none;
  padding: 12px 0;
  margin: .8em 0 1.4em;
}
.carousel:active { cursor: grabbing; }
.carousel ul { display: flex; gap: 2em; padding: 0; margin: 0; flex-shrink: 0; }
.carousel ul:first-child { margin-right: 2em; }
.carousel li {
  list-style: none;
  box-shadow: 2px 2px 4px rgba(0,0,0,.15), -1px -1px 2px 0 rgba(255,255,255,.6) inset;
  border-radius: 10px;
}
.carousel a.app-tile {
  display: block;
  position: relative;
  padding: .2em;
  width: 2.7em;
  height: 2.7em;
  background: rgba(255, 255, 255, 0.82) !important;
  color: #1a5490 !important;
  font-size: 4em;
  top: 0; left: 0;
  transition: all .3s ease;
  font-family: source_sans_probold, sans-serif;
  border-radius: 10px;
  overflow: hidden;
}
.carousel a.app-tile:hover,
.carousel a.app-tile:focus {
  left: -10px; top: -10px;
  background: rgba(255, 255, 255, 0.98) !important;
  color: #d04200 !important;
  box-shadow: none;
  text-decoration: none;
}
.carousel a.app-tile:hover:before,
.carousel a.app-tile:focus:before { height: 10px; }
.carousel a.app-tile:hover:after,
.carousel a.app-tile:focus:after { width: 10px; }
.carousel a.app-tile:hover:before,
.carousel a.app-tile:focus:before,
.carousel a.app-tile:hover:after,
.carousel a.app-tile:focus:after { background: rgba(26, 84, 144, .28); }
.carousel a.app-tile:before,
.carousel a.app-tile:after { content: ''; position: absolute; transition: all .3s ease; }
.carousel a.app-tile:before { width: 100%; height: 0; left: 5px; top: 100%; box-shadow: 0 5px 10px rgba(0,0,0,.15); transform: skew(45deg, 0deg); }
.carousel a.app-tile:after  { width: 0; height: 100%; left: 100%; top: 5px; box-shadow: 5px 0 10px rgba(0,0,0,.15); transform: skew(0deg, 45deg); }
.carousel span { display: block; margin: -1.2em 0 0 .2em; }
.carousel .first-letter { margin: 0; display: inline-block; font-family: source_sans_probold, sans-serif; color: #1a5490; }
.carousel .name { font-family: source_sans_proregular, sans-serif; font-size: .3em; color: #333; display: block; margin-top: -.3em; }

/* =============== RADIO =============== */
.radio-wrap { margin-top: 1em; }
#StreamTITLE { display: none; }
#audio {
  width: 242px; max-width: 80vw;
  border-radius: 22px;
  opacity: .92;
  box-shadow: 0 1px 6px rgba(0,0,0,.12);
}

/* =============== PARAGRAPHES =============== */
.paragraph {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  padding: 1.2em 1.4em;
  margin: 1em 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.paragraph h1, .paragraph h2 { font-family: source_sans_probold, serif; margin-bottom: .4em; color: #111; }
.paragraph h1 { font-size: 2em; }
.paragraph h2 { font-size: 1.4em; color: #444; font-style: italic; }
.paragraph h3 { font-family: source_sans_probold, serif; font-size: 1.25em; margin: .6em 0 .3em; color: #1a5490; }
.paragraph h4 { font-size: 1.05em; margin: .6em 0 .2em; color: #333; }
.paragraph p  { margin: .4em 0; text-align: justify; }
.paragraph ul { margin: .4em 0 .4em 1.4em; }
.paragraph li { margin: .2em 0; }

/* Map wrapper */
.paragraph iframe { max-width: 100%; border-radius: 4px; }

/* =============== FOOTER =============== */
.footer {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  padding: 1em 1.4em;
  margin: 1em 0 1.5em;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.footer nav { margin: .4em 0; }
.footer nav a.link-documentation {
  display: inline-block;
  margin: .2em .4em;
  color: #1a5490;
  font-weight: 600;
}
.footer nav a.link-documentation:hover { color: #d04200; }
.footer img { max-height: 40px; vertical-align: middle; margin: .4em; opacity: .85; }

/* GitHub ribbon */
a.github img { position: absolute; top: 0; right: 0; border: 0; width: 120px; z-index: 5; }

/* Responsive */
@media (max-width: 640px) {
  .carousel a.app-tile { font-size: 3em; }
  .paragraph { padding: 1em; }
  #nian { max-width: 80vw; }
  a.github img { width: 90px; }
  #text-angels { font-size: 14px; width: 88vw; }
  #angels-response { font-size: 13px; padding: .65em .7em; }
}
