/* ============================================================
   ruas.io — feuille de style (prototype)
   Palette inspirée des sites perso d'Olivier (mariage + recettes) :
   fond clair, texte presque noir, accent bleu profond, touche sauge.
   ============================================================ */

:root {
  --bg:            #f7fafc;
  --surface:       #ffffff;
  --text:          #131212;
  --text-soft:     #4a5568;
  --primary:       #0369a1;   /* bleu profond — pont entre le navy mariage et le ciel recettes */
  --primary-dark:  #075985;
  --primary-soft:  #e0f2fe;
  --accent:        #619c80;   /* vert sauge */
  --accent-soft:   #eef4f1;
  --border:        #e2e8f0;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 1px 3px rgba(19,18,18,.06), 0 8px 24px rgba(19,18,18,.05);
  --shadow-hover:  0 6px 16px rgba(3,105,161,.12), 0 12px 32px rgba(19,18,18,.08);
  --maxw:          1080px;
  --font: "Inter", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2 { line-height: 1.15; letter-spacing: -0.02em; }

/* ---------------- NAV ---------------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247,250,252,.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { font-weight: 800; font-size: 1.1rem; color: var(--text); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--text-soft); font-weight: 500; font-size: .98rem; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-links a.active { color: var(--text); font-weight: 700; }

.lang-switch {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  box-shadow: var(--shadow);
}
.flag-btn {
  border: 0; background: none; padding: 0; cursor: pointer; line-height: 0;
  border-radius: 4px; opacity: .4; filter: grayscale(.5);
  transition: opacity .15s, filter .15s, transform .12s, box-shadow .15s;
}
.flag-btn:hover { opacity: .85; filter: grayscale(0); transform: translateY(-1px); }
.flag-btn.active { opacity: 1; filter: none; box-shadow: 0 0 0 2px var(--primary); }
.flag-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.flag {
  width: 26px; height: auto; display: block; border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(19,18,18,.12);
}

/* ---------------- HERO ---------------- */
.hero { padding: 72px 0 56px; }
.hero-inner {
  display: grid; grid-template-columns: 1.4fr .9fr;
  gap: 48px; align-items: center;
}
.kicker {
  color: var(--primary); font-weight: 700; font-size: .9rem;
  letter-spacing: .04em; text-transform: uppercase; margin: 0 0 12px;
}
.hero h1 { font-size: 3.2rem; margin: 0 0 18px; }
.lead { font-size: 1.22rem; color: var(--text-soft); margin: 0 0 28px; max-width: 38ch; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 1rem; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-hover); }
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); background: var(--primary-soft); }

.hero-photo { display: flex; justify-content: center; }
.avatar {
  width: 230px; height: 230px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  border: 2px dashed var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--primary-dark);
}
.avatar span { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.03em; }
.avatar em { font-style: normal; font-size: .82rem; color: var(--accent); margin-top: 6px; }

/* ---------------- FACETTES ---------------- */
.facets {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px; padding-bottom: 24px;
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 26px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-soft); }
.card-tag {
  align-self: flex-start; font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--primary); background: var(--primary-soft);
  padding: 4px 10px; border-radius: 999px;
}
.card-product .card-tag { color: #4a7a63; background: var(--accent-soft); }
.card h2 { font-size: 1.3rem; margin: 4px 0 0; }
.card p { margin: 0; color: var(--text-soft); font-size: .98rem; }
.card-link {
  margin-top: auto; padding-top: 8px; font-weight: 700; font-size: .95rem;
}
.card-link::after { content: " →"; }
.card-product .card-link { color: var(--accent); }

/* ---------------- COMPÉTENCES ---------------- */
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.skill-group {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow);
}
.skill-group h3 { margin: 0 0 12px; font-size: 1.05rem; }
.skill-group .chips { margin: 0; }
@media (max-width: 860px) { .skill-grid { grid-template-columns: 1fr; } }

/* ---------------- INTERNATIONAL ---------------- */
.intl-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 14px;
}
.intl-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 14px;
}
.intl-flag {
  width: 34px; height: 25px; flex-shrink: 0; object-fit: cover;
  border-radius: 3px; box-shadow: 0 0 0 1px rgba(19,18,18,.12);
}
.intl-name { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.intl-note { color: var(--text-soft); font-size: .82rem; line-height: 1.25; }

/* ---------------- CREDO (simplicité) ---------------- */
.credo { padding: 28px 0 8px; }
.credo-inner {
  background: var(--accent-soft); border: 1px solid #d7e6df;
  border-radius: var(--radius); padding: 30px 36px; text-align: center;
}
.credo-label {
  color: var(--accent); font-weight: 700; font-size: .82rem;
  letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px;
}
.credo-text {
  font-size: 1.25rem; line-height: 1.5; color: var(--text);
  margin: 0 auto; max-width: 62ch;
}
.credo-text b { color: var(--primary-dark); }

/* ---------------- CONTACT ---------------- */
.contact { padding: 64px 0 24px; }
.contact h2 { font-size: 1.8rem; margin: 0 0 8px; }
.contact-lead { color: var(--text-soft); margin: 0 0 20px; }
.links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.links a { font-weight: 600; }

/* ---------------- FOOTER ---------------- */
.footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 24px 0; }
.footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer { color: var(--text-soft); font-size: .9rem; }

/* ================ SOUS-PAGES (recherche / projets) ================ */

.page-hero { padding: 56px 0 8px; }
.page-hero h1 { font-size: 2.6rem; margin: 0 0 14px; }
.page-hero .lead { max-width: 60ch; }

.section { padding: 40px 0 8px; }
.section-title { font-size: 1.5rem; margin: 0 0 6px; }
.section-sub { color: var(--text-soft); margin: 0 0 24px; max-width: 60ch; }

/* --- Axes de recherche --- */
.axes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.axis {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
  border-left: 4px solid var(--primary);
}
.axis h3 { margin: 0 0 6px; font-size: 1.08rem; }
.axis p { margin: 0; color: var(--text-soft); font-size: .96rem; }

/* --- Timeline parcours --- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative; padding: 0 0 22px 28px; border-left: 2px solid var(--border);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.timeline .tl-when { font-weight: 700; font-size: .95rem; }
.timeline .tl-what { color: var(--text-soft); font-size: .96rem; }
.timeline .tl-what strong { color: var(--text); }

/* --- Publications --- */
.pub-year { margin-bottom: 26px; }
.pub-year h3 {
  font-size: 1.05rem; color: var(--primary); margin: 0 0 12px;
  border-bottom: 1px solid var(--border); padding-bottom: 6px;
}
.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.pubs li:last-child { border-bottom: 0; }
.pub-title { font-weight: 600; }
.pub-authors { color: var(--text-soft); font-size: .92rem; }
.pub-authors .me { color: var(--text); font-weight: 700; }
.pub-venue { font-size: .9rem; color: var(--accent); font-weight: 600; }
.pub-actions { display: flex; gap: 14px; margin-top: 18px; flex-wrap: wrap; }

.note-soft {
  background: var(--accent-soft); border: 1px solid #d7e6df;
  border-radius: var(--radius-sm); padding: 14px 18px; color: #3f6d57;
  font-size: .95rem; margin-top: 8px;
}

/* --- Badges / chips --- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.chip {
  font-size: .82rem; font-weight: 600; color: var(--primary-dark);
  background: var(--primary-soft); border-radius: 999px; padding: 4px 12px;
}
.chip-accent { color: #fff; background: var(--primary); }

/* --- Vitrine projet --- */
.project {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 28px;
  display: grid; grid-template-columns: 1.3fr 1fr;
}
.project-body { padding: 30px 32px; }
.project-body h3 { margin: 0 0 4px; font-size: 1.5rem; }
.project-tagline { color: var(--text-soft); margin: 0 0 12px; }
.project-media {
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-dark); font-weight: 700; text-align: center; padding: 24px;
  border-left: 1px solid var(--border);
}
.project-media span { opacity: .65; font-size: .9rem; }
.feature-list { margin: 6px 0 0; padding-left: 20px; color: var(--text-soft); }
.feature-list li { margin-bottom: 5px; }

@media (max-width: 760px) {
  .project { grid-template-columns: 1fr; }
  .project-media { order: -1; border-left: 0; border-bottom: 1px solid var(--border); min-height: 120px; }
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 760px) {
  .axes { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero-text { order: 2; }
  .hero-photo { order: 1; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .facets { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 2.4rem; }
  .lead { font-size: 1.1rem; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: .9rem; }
  .brand { font-size: 1rem; }
  .avatar { width: 180px; height: 180px; }
}
