/* =========================================================
   Variables
   ========================================================= */
:root {
  --nav-bg:        #0f172a;
  --hero-bg-from:  #0f172a;
  --hero-bg-to:    #1a3a5c;
  --bg:            #f8fafc;
  --bg-alt:        #f1f5f9;
  --bg-card:       #ffffff;
  --text-primary:  #1e293b;
  --text-secondary:#64748b;
  --text-muted:    #94a3b8;
  --accent:        #3b82f6;
  --accent-dark:   #2563eb;
  --accent-light:  #eff6ff;
  --border:        #e2e8f0;

  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow:    0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 16px;
  --ease:      150ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
ul  { list-style: none; }
a   { color: inherit; }

/* =========================================================
   Layout
   ========================================================= */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   Navbar
   ========================================================= */
.navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: 62px;
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: box-shadow var(--ease);
}

.navbar.scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: .06em;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--ease);
}

.nav-links a:hover { color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  background: linear-gradient(155deg, var(--hero-bg-from) 0%, #1e293b 55%, var(--hero-bg-to) 100%);
  padding: 130px 24px 90px;
  text-align: center;
  color: #fff;
}

.hero-content {
  max-width: 640px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.3);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(44px, 8vw, 76px);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 8px;
  line-height: 1.05;
}

.hero-name {
  font-size: 20px;
  color: rgba(255,255,255,.55);
  margin-bottom: 20px;
  font-weight: 400;
}

.hero-description {
  font-size: 16px;
  color: rgba(255,255,255,.7);
  line-height: 1.75;
}

/* =========================================================
   Sections
   ========================================================= */
.section     { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}

.section-header p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* =========================================================
   Links grid (GitHub / App Store)
   ========================================================= */
.links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 120px;
  padding: 26px 16px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.link-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.link-icon svg { width: 34px; height: 34px; }

.link-card span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: .03em;
}

/* =========================================================
   Projects grid
   ========================================================= */
.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.project-card {
  width: 100%;
  max-width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  height: 170px;
  overflow: hidden;
  flex-shrink: 0;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b 0%, #1a3a5c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.18);
}

.project-image-placeholder svg { width: 52px; height: 52px; }

.project-content {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
  width: fit-content;
}

.project-content h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 18px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--ease);
  width: 100%;
}

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

.btn-outline {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  gap: 2px;
  transition: gap var(--ease);
  width: fit-content;
  margin-top: auto;
}

.btn-outline:hover { gap: 6px; }

/* =========================================================
   Contact form
   ========================================================= */
.contact-wrapper {
  max-width: 620px;
  margin: 0 auto;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 40px 36px;
  box-shadow: var(--shadow-md);
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg);
  outline: none;
  resize: vertical;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.contact-form .btn-primary {
  margin-top: 4px;
  padding: 13px 24px;
  font-size: 15px;
}

.cf-turnstile {
  margin-bottom: 16px;
}

.form-success,
.form-error {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.form-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: var(--nav-bg);
  color: rgba(255,255,255,.6);
  padding: 44px 0 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-logo {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,.35);
}

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

.footer-links a {
  color: rgba(255,255,255,.45);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--ease);
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255,255,255,.25);
}

/* =========================================================
   Screenshots gallery
   ========================================================= */
.screenshots-gallery {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  /* scrollbar discrète */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.screenshots-gallery::-webkit-scrollbar { height: 4px; }
.screenshots-gallery::-webkit-scrollbar-track { background: transparent; }
.screenshots-gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.screenshot-item {
  flex-shrink: 0;
  scroll-snap-align: start;
  margin: 0;
  cursor: zoom-in;
}

.screenshot-item img {
  display: block;
  width: 220px;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  transition: transform var(--ease), box-shadow var(--ease);
  border: 1px solid var(--border);
}

.screenshot-item img:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .88);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 24px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(480px, 90vw);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease);
}

.lightbox-close:hover { background: rgba(255,255,255,.22); }

/* =========================================================
   Project detail page
   ========================================================= */
.page-hero {
  background: linear-gradient(155deg, var(--hero-bg-from) 0%, #1e293b 55%, var(--hero-bg-to) 100%);
  padding: 110px 24px 60px;
  color: #fff;
}

.page-hero-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 760px;
  margin: 0 auto;
}

.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.4);
  flex-shrink: 0;
  overflow: hidden;
}

.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-icon svg { width: 42px; height: 42px; }

.page-hero-text .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
  transition: color var(--ease);
}

.page-hero-text .back-link:hover { color: rgba(255,255,255,.85); }

.page-hero-text h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}

.page-hero-text p {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
}

.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.content-section {
  margin-bottom: 48px;
}

.content-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -.01em;
}

.content-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}

.content-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-section ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.content-section ul li::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
  flex-shrink: 0;
}

.privacy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-sm);
}

.privacy-card h2 {
  border-bottom-color: var(--border);
}

.privacy-updated {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-style: italic;
}

/* =========================================================
   Page hero — variante simple (pages légales)
   ========================================================= */
.page-hero--simple {
  padding: 110px 24px 48px;
  text-align: center;
}

.page-hero--simple .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  transition: color var(--ease);
}

.page-hero--simple .back-link:hover { color: rgba(255,255,255,.85); }

.page-hero--simple h1 {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
  margin-bottom: 8px;
}

.page-updated {
  font-size: 13px;
  color: rgba(255,255,255,.4);
  font-style: italic;
}

/* =========================================================
   Tableau cookies
   ========================================================= */
.cookie-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cookie-table th,
.cookie-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.cookie-table th {
  background: var(--bg-alt);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-primary);
}

.cookie-table tr:last-child td { border-bottom: none; }
.cookie-table code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: ui-monospace, monospace;
}

.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease);
}

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

/* =========================================================
   Bannière cookies
   ========================================================= */
.cookie-banner {
  position: fixed;
  inset-block-end: 0;
  inset-inline: 0;
  z-index: 150;
  background: var(--nav-bg);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 24px;
}

.cookie-banner-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner p {
  font-size: 14px;
  color: rgba(255,255,255,.7);
  margin: 0;
}

.cookie-banner p a {
  color: rgba(255,255,255,.9);
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
  border: none;
}

.cookie-btn--accept {
  background: var(--accent);
  color: #fff;
}
.cookie-btn--accept:hover { background: var(--accent-dark); }

.cookie-btn--decline {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
}
.cookie-btn--decline:hover { background: rgba(255,255,255,.18); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    gap: 0;
    padding: 6px 0 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

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

  .nav-links li a {
    display: block;
    padding: 13px 24px;
  }

  .form-row { grid-template-columns: 1fr; }

  .contact-form { padding: 28px 20px 24px; }

  .footer-content { flex-direction: column; gap: 20px; }

  .page-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .project-card { max-width: 100%; }

  .hero { padding: 100px 24px 70px; }

  .section { padding: 60px 0; }
}
