/*
 Theme Name:   Rayroud Terminal
 Template:     generatepress
 Description:   Theme enfant terminal/hacker pour test.rayroud.com - imite le style www.rayroud.com
 Version:      1.0.0
 Author:       Hermes Agent
*/

:root {
  --term-bg: #0a0a0a;
  --term-bg-panel: #111111;
  --term-fg: #c8c8c8;
  --term-green: #33ff66;
  --term-amber: #ffb000;
  --term-dim: #555555;
  --term-border: #1f1f1f;
  --term-font: "JetBrains Mono", "Fira Code", "SF Mono", "Consolas", "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { background: var(--term-bg); }

body {
  background: var(--term-bg);
  color: var(--term-fg);
  font-family: var(--term-font);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  -webkit-font-smoothing: none;
}

a { color: var(--term-green); text-decoration: none; border-bottom: 1px dotted var(--term-green); }
a:hover { color: var(--term-amber); border-color: var(--term-amber); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--term-font);
  color: var(--term-green);
  font-weight: 700;
  letter-spacing: -0.5px;
  text-transform: none;
}

h1::before, h2::before { content: "# "; color: var(--term-dim); }
h3::before, h4::before { content: "> "; color: var(--term-dim); }

/* Layout GeneratePress override — fond sombre force partout */
.site-content,
.site-main,
.content-area,
.inside-article,
.inside-right-sidebar,
.sidebar,
.widget-area,
.is-right-sidebar,
.inside-article .entry-content,
.inside-article .page-content {
  background: var(--term-bg) !important;
  color: var(--term-fg) !important;
}
.inside-article { border: none !important; padding: 2rem 0; }
.site-header, .site-footer { background: var(--term-bg-panel) !important; border-bottom: 1px solid var(--term-border); }
.site-header { border-top: 3px solid var(--term-green); }
.site-footer { border-top: 1px solid var(--term-border); border-bottom: none; }
.main-navigation ul li a, .site-title a, .site-footer a { color: var(--term-fg) !important; border: none; }
.site-title a { color: var(--term-green) !important; }
.site-title a:hover { color: var(--term-amber) !important; }

/* Widgets natifs GeneratePress : fond sombre + texte clair (evite vert sur blanc) */
.widget,
.widget-area .widget,
.inside-right-sidebar .widget,
.widget.inner-padding {
  background: var(--term-bg-panel) !important;
  color: var(--term-fg) !important;
  border: 1px solid var(--term-border) !important;
}
.widget a,
.widget-area a,
.sidebar a { color: var(--term-green) !important; border: none; }
.widget a:hover { color: var(--term-amber) !important; }
.widget-title { color: var(--term-green) !important; }

/* Barre de menu style terminal */
.main-navigation ul li a:hover { color: var(--term-green) !important; }

/* Separateurs style commentaire */
hr, .post-meta { border: none; color: var(--term-dim); font-size: 0.85em; }
.post-meta::before { content: "// "; color: var(--term-dim); }

/* Quote / code blocks */
blockquote {
  border-left: 3px solid var(--term-green);
  background: var(--term-bg-panel);
  color: var(--term-fg);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
}
pre, code {
  background: var(--term-bg-panel);
  color: var(--term-amber);
  border: 1px solid var(--term-border);
  font-family: var(--term-font);
}
pre { padding: 1rem; overflow-x: auto; }

/* Curseur clignotant decoratif dans le titre du site */
.site-title a::after {
  content: "_";
  color: var(--term-green);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Pastille statut : vert stable (operationnel) vs ambre clignotant (construction) */
.term-dot-ok { background: var(--term-green) !important; animation: none !important; }

/* Entete type status panel */
.entry-header { border-bottom: 1px dashed var(--term-border); padding-bottom: 0.75rem; margin-bottom: 1rem; }

/* Inputs / formulaires */
input, textarea, button, select {
  background: var(--term-bg-panel);
  color: var(--term-green);
  border: 1px solid var(--term-border);
  font-family: var(--term-font);
  padding: 0.4rem 0.6rem;
}
button, input[type="submit"] {
  background: var(--term-green);
  color: #000;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
button:hover, input[type="submit"]:hover { background: var(--term-amber); }

/* Selection */
::selection { background: var(--term-green); color: #000; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--term-bg); }
::-webkit-scrollbar-thumb { background: var(--term-border); }
::-webkit-scrollbar-thumb:hover { background: var(--term-green); }

/* === Logo du header (remplace le texte RAYROUD) === */
.site-branding .site-logo img,
.site-header .site-logo img,
.site-logo img {
  height: 48px !important;
  width: auto !important;
  display: inline-block;
  vertical-align: middle;
}
/* masque le titre texte au cas ou GeneratePress le laisse */
.site-branding .main-title,
.site-branding .site-title,
.site-branding .site-description { display: none !important; }

/* === Footer / bas de page : fond sombre + texte lisible === */
.site-footer, .site-info, .inside-site-info,
.site-footer .widget, .site-footer .widget-area,
.site-footer .widget-area .widget,
.site-footer .widget_block, .site-footer .widget_block * {
  background: var(--term-bg) !important;
  color: var(--term-fg) !important;
  border-color: var(--term-border) !important;
}
.site-footer .widget-title,
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4 {
  color: var(--term-green) !important;
}
.site-footer a { color: var(--term-green) !important; border: none !important; }
.site-footer a:hover { color: var(--term-amber) !important; }
/* status panel dans le footer : fond panel, texte clair */
.site-footer .term-status-panel,
.site-footer .term-status-block {
  background: var(--term-bg-panel) !important;
  color: var(--term-fg) !important;
  border: 1px solid var(--term-border) !important;
}
.site-footer .term-status-line { color: var(--term-green) !important; }

/* === Sous-menus (dropdowns) lisibles sur fond sombre === */
.main-navigation ul ul.sub-menu {
  background: var(--term-bg-panel) !important;
  border: 1px solid var(--term-green) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
  min-width: 200px;
}
.main-navigation ul ul.sub-menu li a,
.main-navigation ul ul.sub-menu li a:visited {
  color: var(--term-fg) !important;
  background: transparent !important;
  border: none !important;
  padding: 0.6em 1em;
  font-family: var(--term-font);
}
.main-navigation ul ul.sub-menu li a:hover {
  color: var(--term-green) !important;
  background: var(--term-bg) !important;
}
.main-navigation ul ul.sub-menu li.current-menu-item > a {
  color: var(--term-green) !important;
}

/* === Suppression du fond blanc sur le contenu et la pagination === */
.site-content,
.content-area,
.site-main,
.inside-article,
.paging-navigation,
.nav-links,
.page-numbers,
.posts-navigation {
  background: transparent !important;
}
.site-content .nav-links,
.site-content .page-numbers,
.site-content .pagination {
  background: var(--term-bg) !important;
  color: var(--term-fg) !important;
}
.site-content .page-numbers {
  color: var(--term-fg) !important;
}
.site-content .page-numbers.current {
  color: var(--term-green) !important;
}

/* === Bloc drapeaux FR/DE aligné à droite du logo === */
.rayroud-lang-switch {
  display: inline-flex;
  flex-direction: row;
  gap: 6px;
  margin-left: 14px;
  align-self: center;
  line-height: 0;
}
.site-branding-container {
  display: flex !important;
  align-items: center;
}
.rayroud-lang-switch .rayroud-flag {
  display: block;
  width: 26px;
  height: 18px;
  border: 1px solid var(--term-border);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.rayroud-lang-switch .rayroud-flag:hover {
  opacity: 1;
  border-color: var(--term-green);
}
.rayroud-lang-switch .rayroud-flag.is-current {
  opacity: 1;
  border-color: var(--term-green);
  box-shadow: 0 0 0 1px var(--term-green);
}
.rayroud-lang-switch .rayroud-flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
