/* ═══════════════════════════════════════════════════════════════
   outils-tools.css — Feuille de styles standalone des outils IT
   RICHER SOLUTION — richer-solution.com
   Chargée par tous les pages-outils-*.php en HTML pur
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;600;700;800&family=Source+Code+Pro:wght@400;600&display=swap');

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
  --bg:       #f4f7fb;
  --bg2:      #ffffff;
  --bg3:      #eef2f7;
  --bg-code:  #f0f4f8;
  --border:   rgba(0,140,180,0.15);
  --border2:  rgba(0,140,180,0.25);
  --cyan:     #00b4d8;
  --cyan2:    #0090b0;
  --cyan3:    #0090b0;
  --accent:   #00b4d8;
  --green:    #16a34a;
  --red:      #dc2626;
  --yellow:   #d97706;
  --text:     #1a202c;
  --text2:    #4a5568;
  --text3:    #718096;
  --grey:     #718096;
  --mono:     'Source Code Pro', monospace;
  --sans:     'Exo 2', sans-serif;
  --font:     'Exo 2', sans-serif;

  /* Aliases thème (pour compatibilité avec l'existant) */
  --light-bg:      #f4f7fb;
  --light-bg2:     #ffffff;
  --light-bg3:     #eef2f7;
  --light-border:  rgba(0,140,180,0.15);
  --light-text:    #1a202c;
  --light-text2:   #4a5568;
  --dark:          #f0f4f8;
  --dark2:         #e8eef5;
  --dark3:         #dde5f0;
  --dark4:         #c8d6e8;
  --dark-text:     #1a202c;
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── TOPBAR STANDALONE ─────────────────────────────────────── */
.rs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 32px;
  background: #0d1117;
  border-bottom: 1px solid rgba(0,180,216,0.18);
  position: sticky;
  top: 0;
  z-index: 9000;
}
.rs-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.rs-topbar-logo {
  height: 30px;
  width: auto;
}
.rs-topbar-name {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1;
}
.rs-topbar-name span { color: var(--cyan); }
.rs-topbar-tool {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--cyan);
  font-weight: 600;
}
.rs-topbar-back {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.rs-topbar-back:hover { color: var(--cyan); text-decoration: none; }

/* ── BOUTONS ───────────────────────────────────────────────── */
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 7px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary, button.btn-primary          { background: var(--cyan); color: #fff; border-color: var(--cyan); }
.btn-primary:hover, button.btn-primary:hover { background: var(--cyan2); border-color: var(--cyan2); }
.btn-secondary, button.btn-secondary      { background: var(--bg); color: var(--text2); border-color: var(--border); }
.btn-secondary:hover                      { border-color: var(--cyan); color: var(--cyan); }
.btn-danger, button.btn-danger            { background: rgba(220,38,38,0.1); color: var(--red); border-color: rgba(220,38,38,0.2); }
.btn-danger:hover                         { background: rgba(220,38,38,0.18); }
.btn-copy, button.btn-copy                { background: rgba(0,180,216,0.08); color: var(--cyan); border-color: rgba(0,180,216,0.2); }
.btn-copy:hover                           { background: rgba(0,180,216,0.18); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ── CHAMPS ────────────────────────────────────────────────── */
textarea, input[type=text], input[type=number], select {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--text);
  transition: border-color 0.15s;
}
textarea:focus, input[type=text]:focus,
input[type=number]:focus, select:focus {
  outline: none;
  border-color: var(--cyan);
}
textarea { resize: vertical; min-height: 160px; width: 100%; }
input[type=range] { accent-color: var(--cyan); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--cyan); cursor: pointer; }

/* ── LAYOUT OUTILS ─────────────────────────────────────────── */
.tool-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 40px 72px;
}
.tool-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.tool-card h2 {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-label {
  display: block;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 6px;
}
.result-box {
  background: #f0f4f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 60px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-col { display: flex; flex-direction: column; gap: 8px; }

/* ── STATUS BADGE ──────────────────────────────────────────── */
.status { display: inline-block; font-family: var(--font); font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.status-ok  { background: rgba(22,163,74,0.12);  color: var(--green); }
.status-err { background: rgba(220,38,38,0.12);  color: var(--red); }
.status-warn { background: rgba(217,119,6,0.12); color: var(--yellow); }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tool-wrap { padding: 20px 16px 52px; }
  .tool-card  { padding: 16px; }
  .grid-2     { grid-template-columns: 1fr; }
  .rs-topbar  { padding: 0 16px; }
}

/* ══════════════════════════════════════════════════════════════
   SCROLLABLE TABS — Navigation horizontale avec flèches
   Usage : envelopper le conteneur de tabs avec .stabs-wrap
   <div class="stabs-wrap">
     <button class="stabs-arrow stabs-prev">&#8592;</button>
     <div class="stabs-scroll"> ... tabs ... </div>
     <button class="stabs-arrow stabs-next">&#8594;</button>
   </div>
══════════════════════════════════════════════════════════════ */
.stabs-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  background: var(--bg2);
}
.stabs-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  flex: 1;
  gap: 0;
  /* force une seule ligne même en responsive non-tactile */
}
.stabs-scroll::-webkit-scrollbar { display: none; }

.stabs-arrow {
  display: none; /* masqué par défaut, JS l'active si overflow */
  align-items: center;
  justify-content: center;
  width: 32px;
  flex-shrink: 0;
  background: var(--bg2);
  border: none;
  border-bottom: 2px solid var(--border);
  color: var(--text3);
  font-size: 1rem;
  cursor: pointer;
  transition: color .15s, background .15s;
  z-index: 2;
}
.stabs-arrow:hover { color: var(--cyan); background: rgba(0,180,216,.06); }
.stabs-arrow.visible { display: flex; }

/* Gradient indiquant le scroll possible */
.stabs-wrap::after {
  content: '';
  position: absolute;
  right: 32px;
  top: 0; bottom: 2px;
  width: 24px;
  background: linear-gradient(to right, transparent, var(--bg2));
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.stabs-wrap.has-overflow::after { opacity: 1; }

@media (max-width: 768px) {
  .stabs-arrow { display: flex; } /* toujours visibles sur mobile */
}
