:root {
  --color-bg: #292929;
  --color-text: #f1f1f1;
  --color-accent: #35cd3d;
  --color-blue: #2269f5;
  --color-red: #e64446;
  --color-white: #ffffff;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, monospace;
  --gap-section: 3.5rem;
  --gap-block: 1.5rem;
  --radius: 4px;
  --color-muted: #cbcbcb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, p, ul, figure, blockquote {
  margin: 0;
}

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

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px) minmax(0, 1fr);
  column-gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  align-items: start;
}

/* --- Logo (top-left, sticky) --- */

.site-logo {
  grid-column: 1;
  justify-self: start;
  position: sticky;
  top: 2.5rem;
  display: block;
  text-decoration: none;
  width: max-content;
}

.site-logo-img {
  display: block;
  width: 118px;
  height: auto;
}

/* Bandeau (landmark) sans impact sur la grille */
.site-header {
  display: contents;
}

/* Lien d'évitement, visible uniquement au focus clavier */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3.5rem;
  z-index: 300;
  padding: 0.5rem 1rem;
  background: var(--color-white);
  color: var(--color-bg);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.5rem;
}

/* --- Main scrolling content --- */

.main-content {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
}

.section {
  display: flex;
  flex-direction: column;
  gap: var(--gap-block);
  scroll-margin-top: 2.5rem;
}

.section h1,
.section h2 {
  font-weight: 700;
  font-size: 1.25rem;
}

.content-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bio-intro {
  font-size: 1rem;
}

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

/* --- Blinking cursor square (Minitel-style) next to the main title --- */

.title-cursor {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.35em;
  vertical-align: 0.02em;
  background: var(--color-white);
}

@media (prefers-reduced-motion: no-preference) {
  .title-cursor {
    animation: cursor-blink 1.1s infinite;
  }
}

@keyframes cursor-blink {
  0%, 50% {
    opacity: 1;
  }
  50.01%, 100% {
    opacity: 0;
  }
}

.photo-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--color-white);
  border-radius: var(--radius);
  object-fit: cover;
}

/* --- Accordions --- */

.accordion-list {
  display: flex;
  flex-direction: column;
}

.accordion {
  border-top: 1px solid var(--color-text);
}

.accordion-list > .accordion:last-child {
  border-bottom: 1px solid var(--color-text);
}

/* Company logo to the left of each accordion title */
.accordion-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.accordion-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 6px;
}

.accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1rem;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion-title {
  font-weight: 700;
  font-style: italic;
  font-size: 1.0625rem;
}

.accordion-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.accordion-subtitle {
  font-style: normal;
  font-weight: 400;
  font-size: 0.8125rem;
  opacity: 0.7;
}

.chevron {
  flex-shrink: 0;
}

.accordion[open] .chevron {
  transform: rotate(180deg);
}

.accordion-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 1rem 1.5rem;
}

.placeholder-text {
  font-style: italic;
  opacity: 0.6;
}

.exp-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.9375rem;
}

.exp-text ul {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.exp-text a {
  text-decoration: underline;
}

.exp-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.exp-img {
  width: 100%;
  border-radius: var(--radius);
  cursor: zoom-in;
}

/* --- Lightbox --- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2.5rem 1.5rem;
  z-index: 100;
  overflow-y: auto;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius);
  cursor: zoom-out;
}

.lightbox-caption {
  max-width: 640px;
  margin: 0;
  color: var(--color-text);
  font-size: 0.9375rem;
  line-height: 1.55;
  text-align: center;
}

.lightbox-caption[hidden] {
  display: none;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

/* --- Loading overlay (language switch) --- */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  text-align: center;
  z-index: 200;
}

.loading-overlay[hidden] {
  display: none;
}

.loading-text {
  font-weight: 700;
  font-style: italic;
  font-size: 1.125rem;
}

.loading-bar {
  width: min(100%, 420px);
  height: 16px;
  border: 3px solid var(--color-text);
  border-radius: 0;
  background: #1e1e1e;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
  image-rendering: pixelated;
  overflow: hidden;
  padding: 2px;
}

.loading-bar-fill {
  height: 100%;
  width: 100%;
  transform: scaleX(1);
  transform-origin: left;
  background:
    repeating-linear-gradient(
      90deg,
      var(--color-accent) 0,
      var(--color-accent) 10px,
      transparent 10px,
      transparent 13px
    );
}

@media (prefers-reduced-motion: no-preference) {
  .loading-overlay:not([hidden]) .loading-bar-fill {
    animation: loading-fill 1.2s steps(12, end);
  }
}

@keyframes loading-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.client-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
  justify-content: space-between;
  list-style: none;
  padding: 0;
}

.logo-img {
  max-height: 68px;
  max-width: 150px;
  width: auto;
  height: auto;
}

/* --- Values --- */

.values {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.value {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.value-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.value h3 {
  font-weight: 700;
  font-style: italic;
  font-size: 1.125rem;
  text-transform: uppercase;
}

/* --- Testimonials --- */

.testimonial-content {
  gap: 0.75rem;
}

.stars {
  font-weight: 700;
  font-size: 1.625rem;
  text-align: center;
  color: var(--color-accent);
}

.quote {
  font-style: italic;
  font-size: 0.875rem;
}

.testimonial-content a {
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: underline;
  align-self: flex-start;
}

/* --- Photo + caption --- */

.photo-caption {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.photo-caption figcaption {
  font-style: italic;
  font-size: 0.875rem;
}

/* --- CTA button --- */

.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  color: var(--color-bg);
  font-weight: 700;
  font-style: italic;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  text-decoration: none;
  width: 100%;
}

/* --- FAQ --- */

.faq-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.faq-item h3 {
  font-weight: 700;
  font-style: italic;
  font-size: 1rem;
}

.faq-item a {
  text-decoration: underline;
}

.footer-note {
  font-size: 1rem;
  color: var(--color-muted);
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-credit {
  font-size: 0.6875rem;
  line-height: 1.5;
  color: #bababa;
}

/* --- Side menu (top-right, sticky) --- */

.side-menu {
  grid-column: 3;
  justify-self: end;
  width: 100%;
  max-width: 340px;
  position: sticky;
  top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: right;
  color: var(--color-muted);
}

/* Clickable items in the side menu stay full-white so they stand out */
.side-menu a:not(.back-button),
.side-menu .lang-option,
.side-menu .anim-toggle {
  color: var(--color-text);
}

/* ...except inline text links, which keep the site's usual link color */
.side-menu .site-info a {
  color: var(--color-accent);
}

.lang-select {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.lang-option input[type="radio"] {
  accent-color: var(--color-text);
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.side-menu-label {
  font-size: 0.75rem;
}

.side-menu-sub {
  font-size: 0.875rem;
}

.side-nav {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.side-nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.side-nav-link .dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: transparent;
  transition: background-color 0.25s ease;
}

.dot-blue {
  --dot-color: var(--color-blue);
}

.dot-green {
  --dot-color: var(--color-accent);
}

.dot-red {
  --dot-color: var(--color-red);
}

.side-nav-link.active .dot,
.side-nav-link:hover .dot {
  background: var(--dot-color);
}

.side-nav-link.active .dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.35;
}

.dot.echo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
}

@media (prefers-reduced-motion: no-preference) {
  .side-nav-link:hover .dot {
    animation: dot-float 1.1s ease-in-out infinite;
  }

  .dot.echo::after {
    animation: dot-echo 0.6s ease-out;
  }
}

@keyframes dot-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes dot-echo {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.site-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8125rem;
}

/* --- Animations toggle (accessibility) --- */

.anim-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.8125rem;
  margin: 0.2rem 0;
}

.anim-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.anim-toggle-switch {
  position: relative;
  order: 2;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 0;
  background: #1e1e1e;
  border: 2px solid var(--color-text);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
  image-rendering: pixelated;
  transition: background-color 0.15s steps(2);
}

.anim-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 0;
  background: var(--color-white);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
  transition: transform 0.15s steps(3);
}

.anim-toggle-input:checked + .anim-toggle-switch {
  background: var(--color-accent);
}

.anim-toggle-input:checked + .anim-toggle-switch::after {
  transform: translateX(18px);
}

.anim-toggle-input:focus-visible + .anim-toggle-switch {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* Toggle OFF → kill every animation & transition site-wide */
html.no-animations *,
html.no-animations *::before,
html.no-animations *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* --- Legal page --- */

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  font-size: 0.9375rem;
}

.legal-content h2 {
  font-weight: 700;
  font-style: italic;
  font-size: 1.0625rem;
  margin-top: 0.6rem;
}

.legal-content ul {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-content a {
  text-decoration: underline;
}

/* "Back to site" button replacing the anchor list on the legal page */
.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-white);
  color: var(--color-bg);
  font-weight: 700;
  font-style: italic;
  font-size: 1.0625rem;
  padding: 0.9rem 1.25rem;
  border-radius: 100px;
  text-decoration: none;
  width: 100%;
}

/* --- Responsive: collapse to a single column below ~1024px --- */

@media (max-width: 1024px) {
  .page {
    grid-template-columns: 1fr;
  }

  .site-logo,
  .main-content,
  .side-menu {
    position: static;
    grid-column: 1;
  }

  /* Logo stays at the top-left, but small, on mobile */
  .site-logo {
    order: 1;
    margin-bottom: 1.5rem;
  }

  .site-logo-img {
    width: 84px;
  }

  .main-content {
    order: 2;
  }

  .side-menu {
    order: 3;
    justify-self: stretch;
    max-width: none;
    text-align: left;
    margin-top: 2rem;
  }

  /* Hide the in-page anchor navigation on mobile — scrolling is enough */
  .side-menu > .side-menu-sub,
  .side-menu > nav {
    display: none;
  }

  .side-nav-link {
    justify-content: flex-start;
  }

  .anim-toggle {
    justify-content: flex-start;
  }
}
