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

:root {
  --bg: #fff;
  --bg-alt: #f5f5f5;
  --surface: #fff;
  --text: #222;
  --text-muted: #666;
  --accent: #698749;
  --accent-hover: #587438;
  --border: #e0e0e0;
  --nav-bg: #1a1a1a;
  --radius: 4px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  list-style: none;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Language Toggle ===== */
[data-lang="fr"] .lang-en {
  display: none;
}

[data-lang="en"] .lang-fr {
  display: none;
}

.lang-toggle {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.lang-toggle:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== Cookie Consent Banner ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: var(--nav-bg);
  color: #ccc;
  padding: 16px 24px;
  transition: transform var(--transition);
}

.cookie-banner.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

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

.cookie-banner p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

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

.btn-sm {
  padding: 8px 18px;
  font-size: 0.75rem;
}

.btn-outline {
  background: none;
  border: 1px solid #666;
  color: #ccc;
}

.btn-outline:hover {
  border-color: #fff;
  color: #fff;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgb(26 26 26 / 50%);
  backdrop-filter: blur(12px);
  padding: 0;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-logo {
  margin-right: auto;
}

.nav-logo img {
  height: 56px;
  width: auto;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: #ccc;
  transition: color var(--transition);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

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

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: -60px 0 0;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgb(0 0 0 / 45%) 0%,
    rgb(0 0 0 / 25%) 50%,
    rgb(0 0 0 / 55%) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 0 24px;
  animation: heroFadeIn 1.2s ease both;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgb(0 0 0 / 40%);
}

.hero-cta {
  margin-top: 24px;
  animation: heroFadeIn 1.2s ease 0.4s both;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

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

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

.btn-full {
  width: 100%;
  text-align: center;
}

/* ===== Sections ===== */
.section {
  padding: 80px 0;
}

.section-label {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
}

/* ===== About ===== */
.about-content {
  max-width: none;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.btn-wrap {
  text-align: center;
  margin-top: 40px;
}

#about {
  padding-bottom: 40px;
}

#portfolio {
  padding-top: 40px;
}

/* ===== Portfolio / Selected Work ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.portfolio-item {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform var(--transition);
}

.portfolio-item:hover {
  transform: scale(1.03);
}

.portfolio-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #e0e0e0;
}

/* ===== Contact ===== */
#contact {
  padding-top: 40px;
}

#contact .container {
  text-align: center;
}

.contact-info {
  padding-top: 8px;
  display: inline-block;
}

.contact-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
  line-height: 1.6;
}

.contact-info a {
  color: var(--accent);
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

/* ===== Map ===== */
.map-section {
  width: 100%;
  line-height: 0;
}

.map-section iframe {
  width: 100%;
  display: block;
}

.map-placeholder {
  padding: 40px 24px;
  text-align: center;
  background: var(--bg-alt);
  line-height: 1.6;
}

.map-placeholder p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-links {
  margin-top: 8px;
}

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

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

/* ===== Privacy & Legal Pages ===== */
.privacy-page,
.legal-page {
  padding-top: 120px;
}

.privacy-page h1,
.legal-page h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.privacy-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 32px;
}

.privacy-page h2,
.legal-page h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.privacy-page p,
.legal-page p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.privacy-page ul,
.legal-page ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 12px;
}

.privacy-page li,
.legal-page li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 4px;
}

.privacy-page a,
.legal-page a {
  color: var(--accent);
}

.privacy-page .btn-primary,
.legal-page .btn-primary {
  color: #fff;
}

/* Green nav on plugin sub-pages */
body:has(.legal-page) .nav,
body:has(.privacy-page) .nav {
  background: var(--accent);
  backdrop-filter: none;
}

body:has(.legal-page) .nav a,
body:has(.privacy-page) .nav a {
  color: #fff;
}

body:has(.legal-page) .nav .lang-toggle,
body:has(.privacy-page) .nav .lang-toggle {
  border-color: #fff;
  color: #fff;
}

body:has(.legal-page) .nav .lang-toggle:hover,
body:has(.privacy-page) .nav .lang-toggle:hover {
  background: #fff;
  color: var(--accent);
}

body:has(.legal-page) .nav .nav-toggle span,
body:has(.privacy-page) .nav .nav-toggle span {
  background: #fff;
}

/* ===== Plugins Page ===== */
.plugin-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 64px;
}

.plugin-image {
  width: 75%;
  margin-bottom: 24px;
}

.plugin-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgb(0 0 0 / 12%);
}

.plugin-hero h1 {
  font-size: 2rem;
  margin-bottom: 4px;
}

.plugin-tagline {
  color: var(--accent) !important;
  font-weight: 600;
  font-size: 0.9rem !important;
  margin-bottom: 16px !important;
}

.plugin-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 540px;
}

.plugin-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
}

.plugin-pricing {
  margin-bottom: 0;
}

.pricing-card {
  margin: 24px 0 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

.pricing-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}

.pricing-currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.pricing-value {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.pricing-unit {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-detail {
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 24px !important;
}

.pricing-features {
  list-style: none !important;
  padding-left: 0 !important;
  text-align: left;
  margin-bottom: 0;
}

.pricing-features li {
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text) !important;
}

.pricing-features li:last-child {
  border-bottom: 1px solid var(--border);
}

.pricing-note {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  margin-top: 16px !important;
}

/* ===== Download Section ===== */
.plugin-download {
  margin-bottom: 0;
}

.download-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

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

.download-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.download-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgb(0 0 0 / 6%);
}

.download-icon {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text);
  flex-shrink: 0;
}

.download-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.download-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.download-arch {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
  margin-top: 2px;
  margin-bottom: 0;
}

.download-version {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
  margin-top: 4px;
  margin-bottom: 0;
}

.download-formats {
  margin-top: 16px;
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
}

.retrieve-key {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.retrieve-label {
  font-size: 0.85rem !important;
  color: var(--text) !important;
  margin-bottom: 12px !important;
}

.retrieve-form {
  display: flex;
  gap: 8px;
}

.retrieve-form input[type="email"] {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  font-size: 0.85rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.retrieve-form input[type="email"]:focus {
  border-color: var(--accent);
}

.retrieve-form .btn {
  height: 38px;
  padding: 0 16px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.retrieve-message {
  font-size: 0.8rem !important;
  margin-top: 10px !important;
  margin-bottom: 0 !important;
  padding: 8px 12px;
  border-radius: var(--radius);
}

.retrieve-message.success {
  background: rgb(105 135 73 / 10%);
  color: var(--accent);
}

.retrieve-message.error {
  background: rgb(200 50 50 / 10%);
  color: #c83232;
}


/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--accent);
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition);
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    font-size: 1rem;
    color: #fff;
    padding: 14px 24px;
    text-align: right;
  }

  .section {
    padding: 60px 0;
  }

  .hero {
    height: 380px;
  }

  .hero-title {
    font-size: 2rem;
  }

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

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

  .legal-page {
    padding-top: 120px;
  }

  .plugin-image {
    width: 90%;
  }

  .plugin-columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (width <= 480px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
