/* ==========================================================
   Portfolio de Thierry Rollin — feuille de style
   Conçu et développé par RICH.COM
   ========================================================== */

:root {
  --bg: #0b0b0c;
  --bg-alt: #101012;
  --surface: #161618;
  --surface-2: #1d1d20;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f2efe9;
  --muted: #a6a29b;
  --accent: #e0b252;
  --accent-hover: #f0c66e;
  --accent-ink: #1a1406;
  --radius: 14px;
  --header-h: 72px;
  --font-title: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* ---------- Bases ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

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

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  font-family: var(--font-body);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--text);
  background: rgba(11, 11, 12, 0.35);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- En-tête ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(11, 11, 12, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.logo span {
  color: var(--accent);
}

.logo:hover {
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 6px;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a.active {
  color: var(--accent-ink);
  background: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  padding: 6px;
  cursor: pointer;
}

/* ---------- Accueil ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(11, 11, 12, 0.96) 0%, rgba(11, 11, 12, 0.75) 38%, rgba(11, 11, 12, 0) 68%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 11, 12, 0) 22%),
    url("../img/bg.jpg") right center / cover no-repeat;
}

.hero .hero-content {
  padding-top: var(--header-h);
}

.hero-hello {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.hero-role {
  font-size: clamp(19px, 2.2vw, 24px);
  color: var(--text);
  margin-bottom: 6px;
  max-width: 560px;
}

.hero-stack {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 20px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.socials a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ---------- Sections ---------- */
.section {
  padding: 110px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  margin-bottom: 52px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-head > :not(.btn) {
  flex-basis: 100%;
}

.section-head .btn {
  margin-top: -4px;
}

.eyebrow {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.section-head h2 {
  font-size: clamp(32px, 4.4vw, 50px);
  letter-spacing: -0.02em;
}

.section-head:has(.btn) > :not(.btn) {
  flex-basis: auto;
}

.section-head:has(.btn) > div,
.section-head:has(.btn) .eyebrow {
  flex-basis: 100%;
}

.sub-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  margin: 64px 0 24px;
}

.sub-title i {
  color: var(--accent);
}

/* ---------- À propos ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 56px;
  align-items: start;
}

.about-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center bottom;
}

.about-text h3 {
  font-size: 28px;
  margin-bottom: 18px;
}

.about-text .lead {
  font-size: 18px;
  color: var(--text);
}

.about-text p {
  color: var(--muted);
}

.info-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 28px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.info-list > div {
  background: var(--surface);
  padding: 14px 18px;
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.info-list dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.info-list dd a {
  color: var(--text);
}

.info-list dd a:hover {
  color: var(--accent);
}

.info-list-single {
  grid-template-columns: 1fr;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 64px;
}

.stats li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}

.stats i {
  font-size: 24px;
  color: var(--accent);
}

.stats strong {
  display: block;
  font-family: var(--font-title);
  font-size: 46px;
  line-height: 1.1;
  margin: 10px 0 4px;
}

.stats span {
  color: var(--muted);
  font-size: 15px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.skill-card h4 {
  font-size: 17px;
  color: var(--accent);
  margin-bottom: 8px;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
}

.tech-list i {
  font-size: 20px;
}

/* ---------- CV ---------- */
.cv-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 56px;
}

.cv-grid .sub-title:first-child {
  margin-top: 0;
}

.timeline {
  border-left: 2px solid var(--line);
  margin-left: 6px;
}

.timeline > li {
  position: relative;
  padding: 0 0 36px 28px;
}

.timeline > li:last-child {
  padding-bottom: 0;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--accent);
}

.tl-date {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(224, 178, 82, 0.1);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 10px;
}

.timeline h4 {
  font-size: 19px;
  margin-bottom: 4px;
}

.tl-place {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 12px;
}

.timeline ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  color: #d6d2cb;
}

.timeline ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.tl-result {
  margin: 14px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  font-style: italic;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: border-color 0.25s, transform 0.25s;
}

.service-card:hover {
  border-color: rgba(224, 178, 82, 0.5);
  transform: translateY(-4px);
}

.service-card i {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(224, 178, 82, 0.12);
  color: var(--accent);
  font-size: 26px;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--muted);
  margin: 0;
}

/* ---------- Portfolio ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.filter {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter:hover {
  color: var(--text);
}

.filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s;
}

.project-card:hover {
  border-color: rgba(224, 178, 82, 0.5);
}

.project-card[hidden] {
  display: none;
}

.project-img {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-card:hover .project-img img {
  transform: scale(1.04);
}

.project-img-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  background:
    radial-gradient(circle at 30% 20%, rgba(224, 178, 82, 0.12), transparent 60%),
    var(--surface-2);
}

.project-img-empty i {
  font-size: 40px;
  color: var(--accent);
}

.project-body {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-kind {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-body h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.project-body > p:not(.project-kind) {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tags li {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #d6d2cb;
}

.project-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 48px;
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 14px;
}

.contact-list > li {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.contact-list > li > i {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(224, 178, 82, 0.12);
  color: var(--accent);
  font-size: 22px;
}

.contact-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-list a {
  color: var(--text);
  overflow-wrap: anywhere;
}

.contact-list a[href^="tel"] {
  white-space: nowrap;
}

.contact-list a:hover {
  color: var(--accent);
}

.contact-socials {
  flex-wrap: wrap;
}

.contact-socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.contact-socials i {
  font-size: 22px;
}

.contact-form {
  display: grid;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form .btn {
  justify-self: start;
}

.contact-form .btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.form-status {
  margin: 0;
  min-height: 1.5em;
  font-weight: 500;
}

.form-status.is-success {
  color: #5fd38d;
}

.form-status.is-error {
  color: #ff7b72;
}

/* ---------- Pied de page ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner p {
  margin: 0;
}

.to-top {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 20px;
}

.to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ---------- Pages projet ---------- */
.project-page {
  padding: calc(var(--header-h) + 56px) 0 100px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 26px;
}

.back-link:hover {
  color: var(--accent);
}

.project-page h1 {
  font-size: clamp(38px, 6vw, 64px);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.project-page .project-intro {
  font-size: 19px;
  color: #d6d2cb;
  max-width: 760px;
  margin-bottom: 36px;
}

.project-cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 0 0 48px;
}

.project-cover img {
  width: 100%;
}

.project-layout {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: start;
}

.project-layout h2 {
  font-size: 24px;
  margin-bottom: 18px;
}

.feature-list li {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.feature-list i {
  color: var(--accent);
  font-size: 20px;
  line-height: 1.4;
}

.project-note {
  margin-top: 24px;
  color: var(--muted);
}

.project-aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.project-aside .info-list {
  margin: 0;
  grid-template-columns: 1fr;
}

/* ---------- Apparition au défilement ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .service-card:hover,
  .project-card:hover .project-img img {
    transform: none;
  }
}

/* ---------- Tablettes ---------- */
@media (max-width: 1024px) {
  .skills-grid,
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .cv-grid,
  .contact-grid,
  .project-layout {
    gap: 40px;
  }
}

/* ---------- Téléphones et petites tablettes ---------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 16px 24px 24px;
    background: rgba(11, 11, 12, 0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }

  .site-nav.open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .site-nav a {
    padding: 12px 16px;
    font-size: 17px;
  }

  .about-grid,
  .cv-grid,
  .contact-grid,
  .project-layout,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 420px;
  }
}

@media (max-width: 768px) {
  .hero {
    align-items: flex-start;
    background:
      linear-gradient(180deg, rgba(11, 11, 12, 0.92) 0%, rgba(11, 11, 12, 0.55) 42%, rgba(11, 11, 12, 0) 62%),
      linear-gradient(0deg, var(--bg) 0%, rgba(11, 11, 12, 0) 18%),
      url("../img/bg-mo.jpg") center bottom / cover no-repeat;
  }

  .hero .hero-content {
    padding-top: calc(var(--header-h) + 24px);
    text-align: center;
  }

  .hero-role {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-stack {
    margin-bottom: 24px;
  }

  .hero-actions,
  .socials {
    justify-content: center;
  }

  .hero-actions {
    margin-bottom: 0;
  }

  .hero .socials {
    display: none;
  }

  .section {
    padding: 80px 0;
  }

  .section-head {
    margin-bottom: 36px;
  }

  .sub-title {
    margin-top: 48px;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 16px;
  }

  .services-grid,
  .skills-grid,
  .info-list,
  .form-row {
    grid-template-columns: 1fr;
  }

  .stats {
    gap: 12px;
  }

  .stats li {
    padding: 20px 16px;
  }

  .stats strong {
    font-size: 36px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .contact-form {
    padding: 22px 18px;
  }

  .footer-inner {
    align-items: flex-start;
  }
}
