/* Graficart - vitrine statique vanilla. Zero dependance externe. */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3 { overflow-wrap: break-word; }

/* ---- Variables ---- */
:root {
  --bg: #242424;
  --bg-soft: #2c2c2c;
  --fg: #ffffffde;
  --fg-dim: #ffffff99;
  --accent: #a3a8ff;
  --accent-strong: #c4c8ff;
  --maxw: 1000px;
  --space: 1.5rem;
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

/* ---- Base ---- */
body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--fg);
  background-color: var(--bg);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--accent-strong); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Header ---- */
.site-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem var(--space) 1rem;
}

.contact-mail {
  position: fixed;
  top: 12px;
  right: 16px;
  font-size: 2.4rem;
  line-height: 1;
  color: aliceblue;
  z-index: 10;
}
.contact-mail:hover { color: var(--accent); }

#logo {
  width: 150px;
  height: 150px;
  filter: invert(100%);
  margin: 1rem auto 2rem;
}

h1 {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 200;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.05;
}
.h1-tagline {
  display: block;
  margin-top: 0.8rem;
  font-size: clamp(0.7rem, 2.4vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--accent);
}

.intro {
  margin: 2rem auto 0;
  max-width: 60ch;
  color: var(--fg-dim);
  font-size: 1rem;
  line-height: 1.7;
}

/* ---- Realisations ---- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem var(--space) 0;
}

article {
  margin: 4.5rem 0;
  text-align: center;
}

article h2 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

article img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-soft);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
article img:hover {
  transform: scale(1.015);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

article p {
  margin: 1.75rem auto 0;
  max-width: 56ch;
  color: var(--fg-dim);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.card-link {
  margin: 1rem auto 0;
  text-transform: none;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.card-link a {
  display: inline-block;
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
}
.card-link a:hover { border-bottom-color: currentColor; }

/* ---- Separateur losange ---- */
hr {
  border: none;
  height: 0.05rem;
  background: linear-gradient(
    to left,
    currentColor calc(50% - 16px),
    transparent calc(50% - 16px),
    transparent calc(50% + 16px),
    currentColor calc(50% + 16px)
  );
  color: var(--fg-dim);
  overflow: visible;
  position: relative;
  margin: 4.5rem auto 0;
  max-width: 600px;
}
hr::before, hr::after {
  content: "";
  display: block;
  position: absolute;
  top: calc(50% - 0.8rem);
  height: 1.6rem;
  width: 0.05rem;
  background: currentColor;
  transform: rotate(22.5deg);
}
hr::before { left: calc(50% - 0.5rem); }
hr::after { right: calc(50% - 0.5rem); }
article:last-child hr { display: none; }

/* ---- Footer ---- */
footer {
  text-align: center;
  padding: 3rem var(--space) 2.5rem;
  color: var(--fg-dim);
  font-size: 0.8rem;
}
footer a { color: var(--accent); }

/* ---- Scroll-reveal (enhancement progressif, contenu visible sans JS) ---- */
/* Seules les cartes hors viewport recoivent .reveal via JS : aucun flash au chargement. */
article.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
article.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Accessibilite : reduction des animations ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  article.reveal { opacity: 1; transform: none; }
  article img:hover { transform: none; }
}

/* ---- Pages legales (cgv.html) ---- */
.legal {
  text-align: left;
  text-transform: none;
  max-width: 760px;
  line-height: 1.6;
}
.legal h1 {
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: none;
  margin-bottom: 2rem;
}
.legal h2 {
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin: 2.25rem 0 0.75rem;
}
.legal p { margin-bottom: 0.9rem; color: var(--fg); }
.legal ul {
  text-align: left;
  margin: 0 0 1rem 1.25rem;
  padding-left: 1rem;
}
.legal li { margin-bottom: 0.6rem; }

/* ---- Responsive ---- */
@media screen and (max-width: 600px) {
  .site-header { padding-top: 2rem; }
  article { margin: 3.5rem 0; }
  article p { font-size: 0.8rem; }
  .contact-mail { font-size: 2rem; }
}
