/*
Theme Name:  CV Esteves — Assistant
Theme URI:   https://web-developper.fr
Author:      A. Esteves
Author URI:  https://web-developper.fr
Description: CV interactif sur mesure pour développeur web. Esthétique IA, chatbot intégré alimenté par le contenu WordPress. Tout est éditable depuis l'admin (Réglages → Mon CV, et les menus Projets / Parcours / Compétences / Q-R chatbot). Aucun plugin requis.
Version:     1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cv-esteves
*/

:root {
  --ink:      #0C0B10;
  --ink-2:    #131119;
  --ink-3:    #1A1724;
  --ink-4:    #221E2E;
  --line:     #2A2536;
  --line-2:   #38313f;
  --text:     #ECE9F1;
  --muted:    #9D96AE;
  --muted-2:  #6F6880;
  --amber:    #F5A524;
  --amber-soft:#FFC55C;
  --amber-dim: rgba(245,165,36,0.12);
  --cyan:     #4DD8C4;
  --human:    #B7C4E6;

  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono", "Consolas", monospace;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;

  --maxw: 1080px;
  --r: 14px;
  --r-sm: 9px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient canvas */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: radial-gradient(rgba(255,255,255,0.6) 1px, transparent 1px);
  background-size: 3px 3px;
}

.wrap { position: relative; z-index: 2; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
header.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(12,11,16,0.72);
  border-bottom: 1px solid var(--line);
}
.bar-in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
}
.brand b { color: var(--amber); }
nav.links {
  margin-left: auto;
  display: flex;
  gap: 4px;
  font-family: var(--mono);
  font-size: 13px;
}
nav.links a {
  color: var(--muted);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  transition: color .2s, background .2s;
}
nav.links a:hover, nav.links a:focus-visible { color: var(--text); background: var(--ink-3); outline: none; }
.status {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px;
  color: var(--muted);
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 100px;
}
.status .live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 2.4s ease-in-out infinite;
}
.status.off .live { background: var(--muted-2); box-shadow: none; animation: none; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ---------- hero ---------- */
.hero { padding: 70px 0 30px; }
.hero-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--amber);
  box-shadow: 0 0 0 5px rgba(245,165,36,0.12), 0 14px 30px -12px rgba(0,0,0,0.8);
  margin: 0 0 24px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 18px;
}
h1.lead {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(30px, 5.4vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  text-wrap: balance;
}
h1.lead .accent { color: var(--amber); }
.sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 34px;
}

/* ---------- chat ---------- */
.chat {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    linear-gradient(180deg, rgba(245,165,36,0.04), transparent 120px),
    var(--ink-2);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.9);
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--ink-3);
  font-family: var(--mono);
  font-size: 13px;
}
.chat-head .av {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--amber), #C8761A);
  display: grid; place-items: center;
  font-weight: 700; color: #1a1206; font-size: 13px;
  overflow: hidden;
}
.chat-head .av img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.chat-head .who b { color: var(--text); }
.chat-head .who span { color: var(--muted-2); font-size: 11px; display:block; margin-top:-2px;}
.chat-head .tag {
  margin-left: auto;
  font-size: 11px; color: var(--cyan);
  display: flex; align-items: center; gap: 6px;
}
.chat-head .tag i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.log {
  padding: 22px 18px;
  min-height: 230px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.msg { display: flex; gap: 11px; max-width: 92%; }
.msg .bubble {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.55;
}
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.user .bubble {
  background: var(--ink-4);
  border: 1px solid var(--line-2);
  color: var(--human);
  border-bottom-right-radius: 3px;
  font-family: var(--mono);
  font-size: 13.5px;
}
.msg.ai .bubble {
  background: var(--amber-dim);
  border: 1px solid rgba(245,165,36,0.22);
  border-bottom-left-radius: 3px;
  color: var(--text);
  white-space: pre-line;
}
.msg .tip {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  overflow: hidden;
}
.msg .tip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg.ai .tip { background: linear-gradient(135deg, var(--amber), #C8761A); color: #1a1206; }
.msg.user .tip { background: var(--ink-4); border: 1px solid var(--line-2); color: var(--human); }
.bubble b { color: var(--amber-soft); font-weight: 600; }
.bubble code {
  font-family: var(--mono); font-size: 12.5px;
  background: rgba(255,255,255,0.06);
  padding: 1px 5px; border-radius: 4px;
}
.cursor {
  display: inline-block; width: 8px; height: 15px;
  background: var(--amber); margin-left: 2px;
  vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.dots span {
  display:inline-block; width:6px; height:6px; border-radius:50%;
  background: var(--amber); margin-right:4px; opacity:.4;
  animation: bob 1.2s infinite;
}
.dots span:nth-child(2){ animation-delay:.2s }
.dots span:nth-child(3){ animation-delay:.4s }
@keyframes bob { 0%,60%,100%{transform:translateY(0); opacity:.4} 30%{transform:translateY(-4px); opacity:1} }

.chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px 18px 4px;
}
.chip {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--muted);
  background: var(--ink-3);
  border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 100px;
  cursor: pointer;
  transition: all .18s;
}
.chip:hover, .chip:focus-visible {
  color: var(--amber); border-color: rgba(245,165,36,0.4);
  background: var(--amber-dim); outline: none;
}
.composer {
  display: flex; gap: 10px;
  padding: 14px 18px 18px;
}
.composer input {
  flex: 1;
  background: var(--ink);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-family: var(--mono); font-size: 14px;
  padding: 12px 15px; border-radius: 10px;
  outline: none;
}
.composer input:focus { border-color: var(--amber); }
.composer input::placeholder { color: var(--muted-2); }
.send {
  background: var(--amber); color: #1a1206;
  border: none; border-radius: 10px;
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  padding: 0 18px; cursor: pointer;
  transition: filter .18s;
}
.send:hover { filter: brightness(1.1); }
.send:active { transform: translateY(1px); }

.disclaimer {
  font-family: var(--mono); font-size: 11px; color: var(--muted-2);
  text-align: center; margin: 14px 0 0;
}

/* ---------- sections ---------- */
section.block { padding: 64px 0; }
.sec-head { margin-bottom: 36px; }
.sec-num {
  font-family: var(--mono); font-size: 12px;
  color: var(--amber); letter-spacing: 0.15em;
}
h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(22px, 3.4vw, 32px);
  letter-spacing: -0.02em;
  margin: 6px 0 0;
}
.sec-head p { color: var(--muted); margin: 10px 0 0; max-width: 60ch; }

/* skills */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 16px;
}
.skill-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink-2);
  padding: 22px;
}
.skill-card h3 {
  font-family: var(--mono); font-size: 14px;
  margin: 0 0 16px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.skill-card h3::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px;
  background: var(--amber);
}
.bar { margin-bottom: 13px; }
.bar:last-child { margin-bottom: 0; }
.bar .row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12.5px; margin-bottom: 6px; }
.bar .row span:last-child { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.track { height: 5px; background: var(--ink-4); border-radius: 100px; overflow: hidden; }
.fill { height: 100%; background: linear-gradient(90deg, #C8761A, var(--amber)); border-radius: 100px; }

/* projects */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 18px;
}
.proj {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink-2);
  overflow: hidden;
  transition: transform .25s, border-color .25s;
  display: flex;
  flex-direction: column;
}
.proj:hover { transform: translateY(-4px); border-color: var(--line-2); }
.proj .thumb {
  height: 150px;
  background: var(--ink-4);
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
}
.proj .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj .thumb .glyph {
  font-family: var(--mono); font-size: 40px; font-weight: 700;
  color: rgba(245,165,36,0.25);
  letter-spacing: -0.04em;
}
.proj .thumb::after {
  content:""; position:absolute; inset:0;
  background: radial-gradient(120% 120% at 80% 10%, rgba(245,165,36,0.10), transparent 60%);
}
.proj .body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.proj .body h3 { margin: 0 0 6px; font-size: 16px; }
.proj .body p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.proj .stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.proj .stack span {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 100px;
}
.proj .more {
  display:inline-block; margin-top: 12px;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--amber); text-decoration: none;
}
.proj .more:hover { text-decoration: underline; }

/* timeline */
.tl { position: relative; padding-left: 28px; }
.tl::before {
  content:""; position:absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line-2);
}
.tl-item { position: relative; padding-bottom: 30px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content:""; position:absolute; left: -28px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--amber);
}
.tl-item .date { font-family: var(--mono); font-size: 12px; color: var(--amber); }
.tl-item h3 { margin: 4px 0 2px; font-size: 16px; }
.tl-item .org { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.tl-item p { color: var(--muted); margin: 8px 0 0; font-size: 14px; }

/* langues & intérêts */
.info-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 18px;
}
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink-2);
  padding: 22px;
}
.info-card h3 {
  font-family: var(--mono); font-size: 14px;
  margin: 0 0 16px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.info-card h3::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--amber);
}
.lang-row {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 13.5px;
  padding: 7px 0;
}
.lang-row + .lang-row { border-top: 1px solid var(--line); }
.dots-rate { display: inline-flex; gap: 5px; }
.dots-rate i {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--line-2); display: inline-block;
}
.dots-rate i.on { background: var(--amber); border-color: var(--amber); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 100px;
}
.contact .contact-line {
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  margin: 24px auto 0;
  text-align: center;
}
.contact .contact-line .sep { margin: 0 10px; color: var(--muted-2); }

/* contact */
.contact {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(245,165,36,0.10), transparent 55%),
    var(--ink-2);
  padding: 48px 32px;
  text-align: center;
}
.contact h2 { margin-bottom: 12px; }
.contact p { color: var(--muted); max-width: 50ch; margin: 0 auto 26px; }
.btn-row { display:flex; gap: 12px; justify-content:center; flex-wrap: wrap; }
.btn {
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  padding: 13px 22px; border-radius: 10px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items:center; gap: 9px;
  transition: filter .2s, background .2s, color .2s;
}
.btn.primary { background: var(--amber); color: #1a1206; border: 1px solid var(--amber); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn.ghost:hover { background: var(--ink-3); }

footer.site {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  margin-top: 40px;
}
.foot-in {
  display:flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: var(--mono); font-size: 12.5px; color: var(--muted-2);
}
.foot-in a { color: var(--muted); text-decoration: none; }
.foot-in a:hover { color: var(--amber); }

/* empty-state hint shown to admins when a section has no content yet */
.cv-empty {
  font-family: var(--mono); font-size: 13px;
  color: var(--muted-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  padding: 22px;
}
.cv-empty a { color: var(--amber); }

@media (max-width: 620px) {
  nav.links { display: none; }
  .hero { padding: 44px 0 20px; }
  .msg { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
