/* =========================================================
   Greder-Kessler — feuille de style unique
   Réplique fidèle du template Visia (couleur « ruby-red »),
   sans Joomla ni jQuery.
   ========================================================= */

/* ---------- Polices (hébergées sur le site) ---------- */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/open-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/open-sans-latin-600-normal.woff2") format("woff2"); }

/* ---------- Variables ---------- */
:root {
  --rouge: #ee3b16;        /* couleur principale Visia ruby-red */
  --rouge-clair: #ffa593;  /* survol */
  --ville: #ad0014;        /* « TOWN » */
  --paysage: #4fa601;      /* « LANDSCAPE » */
  --noir: #060606;
  --texte: #424242;
  --gris: #a2a2a2;
  --gris-pied: #77777a;
  --filet: #e9e9e9;
  --nav-h: 82px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--gris);
  font: 300 17px/1.6 "Open Sans", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; }
img { height: auto; border: 0; }
ul { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--noir); color: #fff; }

a { color: var(--rouge); font-weight: 400; text-decoration: none; transition: color .2s, opacity .2s, background .2s; }
a:hover { color: var(--rouge-clair); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rouge); outline-offset: 3px;
}

p { color: var(--texte); font-size: 1em; line-height: 2em; margin: 0 0 20px; text-align: justify; }
strong { font-weight: 400; }

h1, h2, h3, h4, h5, h6 { color: var(--noir); font-weight: 300; line-height: 1.1; margin: 0 0 20px; }
h1 { font-size: 3.4666em; text-transform: uppercase; letter-spacing: .2em; }
h2 { font-size: 2.4em; text-transform: uppercase; letter-spacing: .2em; }
h3 { font-size: 1em; font-weight: 400; text-transform: uppercase; letter-spacing: .2em; }
h4 { font-size: .8em; font-weight: 400; text-transform: uppercase; letter-spacing: .1em; }
h6 { font-size: .6em; font-weight: 400; text-transform: uppercase; }

.dark h1, .dark h2, .dark h3, .dark h4, .dark h6, .dark p, .dark li,
.colored h1, .colored h2, .colored h3, .colored p { color: #fff; }
.dark a { color: #fff; }

.town { color: var(--ville); font-weight: 600; }
.landscape { color: var(--paysage); font-weight: 600; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; background: var(--noir); color: #fff; padding: 10px 16px; }
.skip-link:focus { left: 10px; top: 10px; color: #fff; }

/* ---------- Grille ---------- */
.container { width: 92%; max-width: 990px; margin: 0 auto; }
.content { padding-top: 100px; text-align: center; }
.content.padded { padding-bottom: 100px; }

/* ---------- Titres de section ---------- */
.title { text-align: center; }
.title h2, .title h3 { margin-bottom: 20px; }
.title h3 { font-size: 36px; font-weight: 300; }
.border { display: block; width: 80px; height: 2px; background: var(--noir); margin: 0 auto; }
.dark .border, .colored .border { background: #fff; }
.text-block { max-width: 930px; margin: 48px auto; }

/* ---------- Boutons ---------- */
.button {
  display: inline-block;
  padding: 20px 55px;
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-weight: 400;
  border: 1px solid var(--rouge);
  border-radius: 3px;
  background: transparent;
  color: var(--rouge);
  cursor: pointer;
  font-family: inherit;
}
.button:hover { border-color: var(--rouge-clair); }
.dark .button, .colored .button { border-color: #fff; color: #fff; }
.dark .button:hover { background: rgba(255,255,255,.1); }

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: #fff;
  border-bottom: 2px solid #f0f0f0;
  padding: 15px 0;
}
.site-nav .nav-inner { display: flex; align-items: center; justify-content: space-between; width: 98%; margin: 0 auto; }
.logo { margin-left: 1%; line-height: 0; }
.logo img { height: 50px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 25px; margin-right: 1%; }
.nav-links a {
  display: block;
  color: var(--noir);
  text-transform: uppercase;
  font-size: .8em;
  letter-spacing: .1em;
  line-height: 50px;
  opacity: .5;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--rouge); }
.nav-links img { height: 20px; width: auto; vertical-align: middle; }
.nav-button { display: none; width: 30px; height: 30px; padding: 3px 2px; margin-right: 5%; background: transparent; border: 0; cursor: pointer; }
.nav-button span { display: block; height: 3px; margin: 4px 0; background: var(--noir); transition: transform .25s, opacity .25s; }
.nav-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Accueil : vidéo + texte défilant ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #0b0d10 url("../img/hero.svg") center / cover no-repeat;
}
.hero-video { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.hero-video.is-playing { opacity: 1; }
.hero-video iframe {
  position: absolute; top: 50%; left: 50%;
  width: 100vw; height: 56.25vw;            /* 16:9 */
  min-height: 100vh; min-width: 177.78vh;   /* couvre tout l'écran */
  transform: translate(-50%, -50%);
  border: 0;
}
.hero-raster {
  position: absolute; inset: 0;
  background: url("../img/raster.png");
  opacity: .3;
  pointer-events: none;
}
.hero .hero-content { position: relative; z-index: 2; padding: var(--nav-h) 0 40px; }
.ticker { height: 90px; overflow: hidden; }
.ticker ul { animation: ticker 7.5s infinite; }
.ticker li {
  height: 90px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 52px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: .2em;
  line-height: 1;
}
@keyframes ticker {
  0%, 26%   { transform: translateY(0); }
  33%, 59%  { transform: translateY(-90px); }
  66%, 92%  { transform: translateY(-180px); }
  100%      { transform: translateY(0); }
}
.call-to-action { padding-top: 20px; }

/* ---------- Flèche vers la section suivante ---------- */
.next-section { display: inline-block; margin-top: 10px; line-height: 0; }
.next-section img { display: block; }
.next-section .on { display: none; }
.next-section:hover .off, .next-section:focus-visible .off { display: none; }
.next-section:hover .on, .next-section:focus-visible .on { display: block; }

/* ---------- About ---------- */
#about { padding-bottom: 60px; }

/* ---------- Agency (parallaxe) ---------- */
.parallax {
  background-color: var(--rouge);
  background-image: url("/images/agency.jpg");
  background-size: cover;
  background-position: 50% 0;
  background-attachment: fixed;
}
.parallax .content { padding-bottom: 100px; }

/* ---------- Projets : grille ---------- */
.portfolio { padding-bottom: 40px; }
.projectlist { display: flex; flex-wrap: wrap; margin-top: 50px; }
.projectlist li { width: 20%; }
.projectlist a { display: block; position: relative; padding-bottom: 85px; color: var(--noir); }
.projectlist img { display: block; width: 100%; aspect-ratio: 545 / 344; object-fit: cover; }
.projectlist .overlay {
  position: absolute; inset: 0 0 85px 0;
  background: #000; opacity: 0;
  transition: opacity .15s linear;
}
.projectlist .meta { position: absolute; left: 0; right: 0; bottom: 0; height: 85px; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.projectlist h3 { font-size: .8em; letter-spacing: .1em; margin: 0; line-height: 1.5; color: var(--noir); transition: color .15s; }
.projectlist a:hover .overlay, .projectlist a:focus-visible .overlay { opacity: .5; }
.projectlist a:hover h3, .projectlist a:focus-visible h3 { color: var(--rouge); }

/* ---------- Page projet ---------- */
.project-page { padding-top: calc(var(--nav-h) + 50px); padding-bottom: 60px; }
.project-page .post-title { text-align: left; margin-bottom: 30px; }
.project-page .post-title h1 { font-size: 2.4em; letter-spacing: .1em; text-transform: uppercase; color: var(--noir); }
.breadcrumb { font-size: .8em; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; color: var(--gris); }
.breadcrumb a { color: var(--gris); }
.breadcrumb a:hover { color: var(--rouge); }

.gallery { position: relative; user-select: none; }
.gallery-viewport { overflow: hidden; background: #f4f4f4; }
.gallery-track { display: flex; transition: transform .45s ease; }
.gallery-track li { flex: 0 0 100%; }
.gallery-track img { display: block; width: 100%; height: auto; }
.gallery-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border: 0; border-radius: 3px;
  background: rgba(6,6,6,.45);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.gallery-btn:hover { background: var(--rouge); }
.gallery-btn svg { width: 20px; height: 20px; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-pager { text-align: center; padding: 20px 0; }
.gallery-pager button {
  width: 12px; height: 12px; margin: 0 5px; padding: 0;
  border: 1px solid #bbb; border-radius: 50%;
  background: transparent; cursor: pointer;
}
.gallery-pager button[aria-current="true"] { background: var(--rouge); border-color: var(--rouge); }
.small-border { display: block; width: 150px; height: 1px; margin: 0 auto 40px; background: var(--filet); }
.gallery-count { text-align: center; font-size: .8em; color: var(--gris); margin: -10px 0 20px; }

.project-info p { max-width: 930px; }
.project-nav { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--filet); }
.project-nav a { color: var(--noir); text-transform: uppercase; font-size: .8em; letter-spacing: .1em; opacity: .6; }
.project-nav a:hover { opacity: 1; color: var(--rouge); }
.project-nav .back { text-align: center; }

/* ---------- Pied de page + formulaire ---------- */
footer { background: var(--noir); }
footer .content { padding-top: 60px; }
.contact-open { display: inline-block; text-align: center; color: #fff; opacity: .5; font-weight: 300; text-transform: uppercase; letter-spacing: .1em; background: none; border: 0; cursor: pointer; font-family: inherit; font-size: .95em; }
.contact-open:hover, .contact-open[aria-expanded="true"] { opacity: 1; color: #fff; }
.contact-open img { display: block; margin: 0 auto 15px; width: 20px; height: 20px; }

#contact-form { display: none; background: var(--noir); padding: 20px 0 50px; margin-top: 20px; text-align: center; }
#contact-form.open { display: block; }
.contact-heading { margin-top: 30px; }
.contact-heading h2 { color: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4%; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { display: block; margin: 50px 0 20px; font-size: .8em; text-transform: uppercase; color: #fff; }
.form-field input, .form-field textarea {
  width: 100%;
  height: 35px;
  padding: 0 10px;
  border: 0; border-radius: 3px;
  background: #1e1e1e;
  color: #949494;
  font: inherit;
  transition: background .33s linear;
}
.form-field textarea { height: 150px; padding: 10px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { background: #fff; color: var(--noir); outline: none; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-click { margin-top: 50px; }
.form-click .button { border-color: #fff; color: #fff; }
.form-click .button:hover { background: rgba(255,255,255,.1); }
.form-click .button[disabled] { opacity: .5; cursor: wait; }
#alert { display: none; margin-top: 30px; }
#alert.show { display: block; }
.notification { padding: 10px 18px; border: 1px solid #fff; border-radius: 3px; background: rgba(255,255,255,.05); }
.notification p { color: #fff; margin: 0; line-height: 26px; text-align: left; }
.notification.error { border-color: var(--rouge); }

.copyright { margin: 50px 0 10px; text-align: center; padding-bottom: 20px; }
.copyright p { color: var(--gris-pied); font-size: .7em; letter-spacing: .2em; text-transform: uppercase; text-align: center; margin: 0; }

/* ---------- Page 404 ---------- */
.error-page { min-height: 70vh; padding-top: calc(var(--nav-h) + 100px); text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 959px) {
  .projectlist li { width: 50%; }
  .nav-button { display: block; }
  .site-nav .nav-inner { flex-wrap: wrap; }
  .nav-links {
    display: none;
    flex-direction: column; align-items: stretch; gap: 0;
    width: 90%; margin: 10px 5% 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid #f0f0f0; }
  .nav-links li:first-child { border-top: 0; }
  .nav-links a { line-height: 46px; }
  /* le fond fixe pose problème sur mobile (iOS) */
  .parallax { background-attachment: scroll; background-position: center; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  h1, .ticker li { font-size: 30px; letter-spacing: .12em; }
  .ticker, .ticker li { height: 60px; }
  @keyframes ticker {
    0%, 26%   { transform: translateY(0); }
    33%, 59%  { transform: translateY(-60px); }
    66%, 92%  { transform: translateY(-120px); }
    100%      { transform: translateY(0); }
  }
  h2, .title h3 { font-size: 26px; }
  .button { padding: 16px 32px; }
  .content { padding-top: 70px; }
  .form-grid { grid-template-columns: 1fr; }
  .logo img { height: 40px; }
  .project-page .post-title h1 { font-size: 1.6em; }
  .project-nav { flex-direction: column; text-align: center; }
  p { text-align: left; }
}
@media (max-width: 479px) {
  .projectlist li { width: 100%; }
}

/* ---------- Animations réduites ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker ul { animation: none; }
  .gallery-track { transition: none; }
  .hero-video { display: none; }
}
.centered { text-align: center; }
.hero .call-to-action { text-align: center; }
.text-block .next-section { display: block; width: max-content; margin: 10px auto 0; }
