/*
Theme Name: Analytips
Theme URI: https://analytips.fr
Author: Mickael Guedj
Description: Thème one-page minimaliste pour Analytips — Expert Web Analytics & Data
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: analytips
*/

:root {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --border: #E4E2DC;
  --text: #1A1A18;
  --muted: #6B6860;
  --accent: #1D5C4A;
  --accent-light: #E8F0ED;
  --accent-mid: #2D7A63;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max: 1100px;
  --r: 4px;
  --ease: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: opacity var(--ease); }
a:hover { opacity: .75; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

h1, h2 { font-family: var(--font-serif); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.1rem; font-weight: 600; }

.label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); font-weight: 500; display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.label::before { content: ''; display: inline-block; width: 22px; height: 2px; background: var(--accent); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 2rem; }
section { padding: 5.5rem 0; }
.divider { width: 100%; height: 1px; background: var(--border); }

/* NAV */
#site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); transition: box-shadow var(--ease); }
#site-nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.06); }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 0 2rem; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: var(--accent); letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a { font-size: .85rem; font-weight: 500; color: var(--muted); transition: color var(--ease); }
.nav-links a:hover { color: var(--accent); opacity: 1; }
.nav-cta { background: var(--accent) !important; color: #fff !important; padding: .6rem 1.4rem; border-radius: var(--r); font-size: .85rem; font-weight: 600; transition: background var(--ease) !important; opacity: 1 !important; }
.nav-cta:hover { background: var(--accent-mid) !important; }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: all .3s; }

/* HERO */
#hero { min-height: 100vh; display: flex; align-items: center; padding-top: 64px; position: relative; overflow: hidden; }
#hero::before { content: ''; position: absolute; top: -15%; right: -8%; width: 550px; height: 550px; background: radial-gradient(circle, var(--accent-light) 0%, transparent 68%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 4rem; align-items: center; position: relative; z-index: 1; }
.hero-subtitle { font-size: 1.1rem; color: var(--muted); margin: 1.25rem 0 1.5rem; max-width: 500px; line-height: 1.7; }
.hero-mantra { border-left: 3px solid var(--accent); padding: .9rem 1.25rem; background: var(--accent-light); font-style: italic; color: var(--muted); font-size: .95rem; margin-bottom: 2rem; max-width: 500px; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary { display: inline-flex; align-items: center; gap: .5rem; background: var(--accent); color: #fff; padding: .85rem 2rem; border-radius: var(--r); font-weight: 600; font-size: .9rem; transition: background var(--ease), transform var(--ease); }
.btn-primary:hover { background: var(--accent-mid); color: #fff; opacity: 1; transform: translateY(-2px); }

/* PROFILE CARD */
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 2rem; box-shadow: 0 8px 40px rgba(0,0,0,.07); animation: floatUp .8s ease both; }
@keyframes floatUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.card-avatar { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; border: 3px solid var(--accent-light); margin-bottom: .75rem; }
.card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.card-name { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; }
.card-role { color: var(--accent); font-size: .85rem; font-weight: 600; margin-bottom: .25rem; }
.card-loc { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); margin-bottom: 1.25rem; }
.card-loc svg { width: 14px; height: 14px; }
.card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.25rem; }
.stat { background: var(--bg); border-radius: var(--r); padding: .9rem .75rem; text-align: center; }
.stat-n { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-l { font-size: .7rem; color: var(--muted); margin-top: .2rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { background: var(--accent-light); color: var(--accent); font-size: .7rem; font-weight: 600; padding: .3rem .75rem; border-radius: 100px; }

/* SECTIONS */
#expertises { background: var(--surface); }
.section-head { margin-bottom: 3.5rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; max-width: 520px; margin-top: .75rem; }
.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.expertise-card { border: 1px solid var(--border); border-radius: 10px; padding: 1.75rem; background: var(--surface); transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease); }
.expertise-card:hover { border-color: var(--accent); box-shadow: 0 6px 24px rgba(29,92,74,.09); transform: translateY(-3px); }
.expertise-icon { width: 42px; height: 42px; background: var(--accent-light); border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; color: var(--accent); }
.expertise-icon svg { width: 22px; height: 22px; }
.expertise-card h3 { margin-bottom: .5rem; }
.expertise-card p { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.tool-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.tool { background: var(--bg); color: var(--muted); font-size: .72rem; padding: .25rem .6rem; border-radius: 3px; border: 1px solid var(--border); }

/* EXPERIENCES */
#experiences { background: var(--bg); }
.xp-list { display: flex; flex-direction: column; gap: 1rem; }
.xp-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.75rem 2rem; display: grid; grid-template-columns: 140px 1fr; gap: 2rem; align-items: start; transition: border-color var(--ease); }
.xp-item:hover { border-color: var(--accent); }
.xp-meta { text-align: right; }
.xp-date { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); display: block; margin-bottom: .25rem; }
.xp-company { font-weight: 700; font-size: 1rem; }
.xp-role { color: var(--accent); font-weight: 600; font-size: .9rem; margin-bottom: .75rem; }
.xp-desc { font-size: .9rem; color: var(--muted); line-height: 1.7; }

/* STACK */
#stack { background: var(--surface); }
.stack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.stack-box { background: var(--bg); border-radius: 10px; padding: 1.5rem; }
.stack-box-label { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: .9rem; }
.stack-tags { display: flex; flex-wrap: wrap; gap: .4rem; }

/* CONTACT */
#contact { background: var(--accent); padding: 5rem 0; overflow: hidden; position: relative; }
#contact::before { content: ''; position: absolute; bottom: -30%; left: -10%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%); pointer-events: none; }
.contact-grid { display: grid; grid-template-columns: 1fr auto; gap: 4rem; align-items: center; position: relative; z-index: 1; }
.contact-label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; color: #5DCAA5; display: block; margin-bottom: .75rem; }
.contact-grid h2 { color: #fff; margin-bottom: 1.75rem; }
.contact-links { display: flex; flex-direction: column; gap: .6rem; }
.contact-link { display: inline-flex; align-items: center; gap: .75rem; background: rgba(255,255,255,.12); color: #fff; padding: .85rem 1.5rem; border-radius: var(--r); font-size: .9rem; font-weight: 500; transition: background var(--ease), transform var(--ease); max-width: 340px; }
.contact-link:hover { background: rgba(255,255,255,.22); opacity: 1; transform: translateX(4px); }
.contact-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.contact-photo { width: 220px; align-self: flex-end; }
.contact-photo img { width: 100%; height: auto; display: block; filter: drop-shadow(0 -8px 30px rgba(0,0,0,.2)); }

/* FOOTER */
#site-footer { background: var(--bg); border-top: 1px solid var(--border); padding: 1.25rem 0; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; }
.footer-txt { font-size: .8rem; color: var(--muted); }

/* ANIMATIONS */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 960px)
   ═══════════════════════════════════════════ */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 2rem;
  }
  .hero-text { text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-mantra { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .label { justify-content: center; }
  .profile-card {
    max-width: 420px;
    margin: 0 auto;
  }
  .expertise-grid { grid-template-columns: 1fr 1fr; }
  .xp-item { grid-template-columns: 1fr; gap: .75rem; }
  .xp-meta { text-align: left; }
  .contact-grid { grid-template-columns: 1fr; text-align: center; }
  .contact-links { align-items: center; }
  .contact-link { max-width: 100%; }
  .contact-photo { display: none; }
  .stack-grid { grid-template-columns: 1fr; }
  .section-head { text-align: center; }
  .section-head p { margin-left: auto; margin-right: auto; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 680px)
   ═══════════════════════════════════════════ */
@media (max-width: 680px) {
  /* Nav */
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    z-index: 99;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
  }
  .nav-links.open a { font-size: 1rem; }
  .nav-links.open .nav-cta { text-align: center; display: block; }

  /* Layout */
  .container { padding: 0 1.25rem; }
  section { padding: 3.5rem 0; }

  /* Hero */
  #hero { min-height: auto; padding-top: 100px; padding-bottom: 2.5rem; }
  h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-mantra { font-size: .88rem; padding: .75rem 1rem; }

  /* Profile card */
  .profile-card { padding: 1.5rem; }
  .card-avatar { width: 56px; height: 56px; }
  .card-name { font-size: 1.2rem; }
  .card-stats { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .stat { padding: .7rem .5rem; }
  .stat-n { font-size: 1.4rem; }
  .stat-l { font-size: .65rem; }
  .card-tags { gap: .3rem; }
  .tag { font-size: .65rem; padding: .25rem .6rem; }

  /* Expertise */
  .expertise-grid { grid-template-columns: 1fr; gap: 1rem; }
  .expertise-card { padding: 1.25rem; }
  .section-head { margin-bottom: 2.5rem; }
  h2 { font-size: 1.5rem; }

  /* Experiences */
  .xp-item { padding: 1.25rem; }
  .xp-role { font-size: .85rem; }
  .xp-desc { font-size: .85rem; }

  /* Contact */
  #contact { padding: 3.5rem 0; }
  .contact-grid h2 { font-size: 1.5rem; }
  .contact-link { padding: .75rem 1.2rem; font-size: .85rem; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: .5rem; text-align: center; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Small Mobile (≤ 400px)
   ═══════════════════════════════════════════ */
@media (max-width: 400px) {
  .container { padding: 0 1rem; }
  h1 { font-size: 1.7rem; }
  .profile-card { padding: 1.25rem; }
  .card-stats { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .stat-n { font-size: 1.2rem; }
  .btn-primary { padding: .75rem 1.5rem; font-size: .85rem; width: 100%; justify-content: center; }
  .hero-cta { width: 100%; }
  .contact-link { width: 100%; justify-content: center; }
}