/* ============================================================
   CAROLE THERY — Portfolio UX Designer
   style.css
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg: #f8f7f4;
  --bg2: #eeecea;
  --bg3: #e5e3de;
  --accent: #3d5c52;
  --accent-light: #d6e4e0;
  --sand: #b8893a;
  --sand-light: #f2e8d4;
  --text: #1c1c14;
  --text-muted: #787460;
  --shadow: rgba(61, 92, 82, 0.12);
  --shadow-sand: rgba(184, 137, 58, 0.10);
  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 860px;
  --transition: 0.22s cubic-bezier(.34, 1.56, .64, 1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
  font-family: 'Syne', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Grain en fond */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Contenu au-dessus du grain */
body>* {
  position: relative;
  z-index: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Typographie ────────────────────────────────────────────── */
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--text);
}

h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

p {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.72;
  color: var(--text-muted);
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / Navigation ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--bg2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
}

.nav-linkedin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  color: #fff !important;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.2s !important;
}

.nav-linkedin:hover {
  background: var(--sand) !important;
  transform: scale(1.06);
  color: #fff !important;
}

/* Menu burger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.2s;
}

/* ── Hero (page d'accueil) ──────────────────────────────────── */
.hero {
  padding: 50px 0 10px;
}

.hero-inner {
  display: block;
}

.hero-text h1 {
  margin-bottom: 20px;
  color: var(--accent);
}

.hero-desc {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 100%;
}


/* ── Section projets ────────────────────────────────────────── */
.section-projets {
  padding: 48px 0 80px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bg2);
}

.projets-confidentialite {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 4px;
  margin-bottom: 32px;
  width: 100%;
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--sand);
  letter-spacing: 0.06em;
}

/* ── Cartes projets ─────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: transform var(--transition), box-shadow var(--transition), border-color 0.2s;
  box-shadow: 0 2px 10px var(--shadow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
  border-color: var(--accent-light);
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
}

.tag-green {
  background: var(--accent-light);
  color: var(--accent);
}

.tag-sand {
  background: var(--sand-light);
  color: var(--sand);
}

.card h3 {
  font-size: 0.9375rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-tension {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.62;
  margin-bottom: 16px;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap 0.2s;
}

.card:hover .card-cta {
  gap: 10px;
}

.card-cta::after {
  content: '→';
  font-size: 0.875rem;
}

/* ── Page cas d'usage ───────────────────────────────────────── */
.page-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--bg2);
  margin-bottom: 48px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.2s, gap 0.2s;
}

.back-link::before {
  content: '←';
  font-size: 0.875rem;
}

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

.page-header .tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.page-header h1 {
  margin-bottom: 16px;
}

.tension {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.6;
  width: 100%;
  padding: 16px 20px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  margin-bottom: 40px;
}

/* ── Contenu cas d'usage ────────────────────────────────────── */
.cas-content {
  max-width: 680px;
  padding-bottom: 80px;
}

.cas-section {
  margin-bottom: 40px;
}

.cas-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 10px;
}

.cas-section p,
.cas-section li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* Démarche — étapes */
.etapes {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

.etape {
  padding: 16px 20px;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--bg3);
  transition: border-color 0.2s;
}

.etape:hover {
  border-left-color: var(--accent);
}

.etape-titre {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.etape p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Résultats */
.resultats-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.resultats-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.resultats-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Ce que j'en retiens */
.retiens-block {
  background: var(--sand-light);
  border-radius: var(--radius);
  padding: 24px 28px;
  border-left: 3px solid var(--sand);
}

.retiens-block p {
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.75;
}

/* Navigation entre projets */
.nav-projets {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0 64px;
  border-top: 1px solid var(--bg2);
  margin-top: 16px;
  gap: 16px;
}

.nav-projet-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  max-width: 280px;
  transition: color 0.2s;
}

.nav-projet-link:hover .nav-projet-titre {
  color: var(--accent);
}

.nav-projet-dir {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-projet-titre {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  transition: color 0.2s;
}

.nav-projet-link.next {
  text-align: right;
  margin-left: auto;
}

/* ── Page À propos ──────────────────────────────────────────── */
.apropos-content {
  max-width: 680px;
  padding: 56px 0 80px;
}

.apropos-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.apropos-content p:last-child {
  margin-bottom: 0;
}

/* ── Page À propos ──────────────────────────────────────────── */
.apropos-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--bg2);
  margin-bottom: 48px;
}

.apropos-header h1 {
  color: var(--accent);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--bg2);
  padding: 24px 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.footer-inner p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ── Focus visible (accessibilité) ─────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Skip link (accessibilité) ──────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 24px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
  z-index: 999;
}

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

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 680px) {

  .header-inner {
    height: 56px;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--bg2);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0;
    z-index: 99;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    padding: 12px 24px;
    font-size: 0.9375rem;
  }

  .nav-linkedin {
    margin: 8px 24px 8px;
    width: auto;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero-desc {
    max-width: 100%;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    padding: 40px 0 28px;
  }

  .nav-projets {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .nav-projet-link {
    width: auto;
    max-width: 48%;
  }

  .nav-projet-link.next {
    text-align: right;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
}