/* Rémi Winand : feuille de style du site public.
   La couleur d'accent (--k, --k-soft) est définie dans la page, d'après le réglage de l'administration. */

:root {
  --head: #17202b;
  --bg: #f3f5f8;
  --card: #fff;
  --line: #d0d8e0;
  --line2: #e6ebf0;
  --txt: #17202b;
  --muted: #64748b;
  --k: #c0392b;
  --k-soft: #fbeae8;
  --shadow: 0 10px 30px rgba(20, 30, 50, .12);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #12161d;
  --card: #1a1f28;
  --line: #394150;
  --line2: #272e3a;
  --txt: #e6e9ef;
  --muted: #9aa4b5;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--k); outline-offset: 2px; }
.in { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 60; padding: 8px 12px; border-radius: 8px; background: var(--card); color: var(--txt); text-decoration: none; }
.skip:focus { top: 10px; }

/* Barre */
.top { position: sticky; top: 0; z-index: 30; background: var(--head); color: #fff; }
.top .in { display: flex; align-items: center; gap: 14px; height: 60px; }
.top :focus-visible { outline-color: #fff; }
.brand { color: #fff; text-decoration: none; font-size: 21px; font-weight: 800; letter-spacing: -.4px; white-space: nowrap; }
.brand b { font-weight: 300; color: #c9d3e0; }
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a, .nav button {
  color: #c9d3e0; text-decoration: none; font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 999px; border: 0; background: none; cursor: pointer;
}
.nav a:hover, .nav button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.iconbtn {
  width: 36px; height: 36px; margin-left: auto; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex: none;
}
.nav + .iconbtn { margin-left: 8px; }
.iconbtn:hover { background: rgba(255, 255, 255, .24); }
.iconbtn svg { width: 18px; height: 18px; display: block; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

/* Ouverture */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 480px at 88% -10%, color-mix(in srgb, var(--k) 55%, transparent), transparent 70%),
    radial-gradient(700px 500px at -10% 120%, rgba(255, 255, 255, .06), transparent 70%),
    linear-gradient(160deg, #17202b 0%, #1f2d47 100%);
}
.hero .in { display: grid; gap: 40px; padding-top: 56px; padding-bottom: 80px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: #e6e9ef;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--k); box-shadow: 0 0 0 3px color-mix(in srgb, var(--k) 35%, transparent); }
.hero h1 { margin: 22px 0 0; font-size: clamp(48px, 9vw, 96px); line-height: .95; font-weight: 800; letter-spacing: -.045em; }
.hero h1 b { display: block; font-weight: 300; color: #c9d3e0; }
.lede { margin: 24px 0 0; max-width: 30em; font-size: 17px; line-height: 1.55; color: #c9d3e0; }
.lede strong { color: #fff; font-weight: 700; }
.lede a { color: #fff; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.bt {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px;
  border-radius: 999px; font: inherit; font-weight: 700; font-size: 14.5px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s;
}
.bt svg { width: 16px; height: 16px; }
.bt.k { background: var(--k); color: #fff; }
:root[data-theme="dark"] .bt.k { color: #12161d; }
.bt.k:hover { transform: translateY(-1px); }
.bt.g { border-color: rgba(255, 255, 255, .28); color: #fff; }
.bt.g:hover { background: rgba(255, 255, 255, .08); }
.bt.sm { height: 38px; padding: 0 18px; font-size: 13.5px; }
.bt:disabled { opacity: .6; cursor: default; transform: none; }
.visual { position: relative; align-self: center; }
.visual .ph { border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); border: 1px solid rgba(255, 255, 255, .12); }
.visual .ph img { aspect-ratio: 4 / 3; object-fit: cover; }
.badge {
  position: absolute; left: -18px; bottom: -26px; display: flex; align-items: center; gap: 12px; max-width: 290px;
  padding: 14px 16px; border-radius: 16px; background: var(--card); color: var(--txt); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.badge .ic, .card h3 .ic { border-radius: 12px; background: var(--k-soft); color: var(--k); display: flex; align-items: center; justify-content: center; flex: none; }
.badge .ic { width: 40px; height: 40px; }
.badge .ic svg { width: 22px; height: 22px; }
.badge b { display: block; font-size: 13.5px; line-height: 1.25; }
.badge small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.hero.small .in { display: block; padding-top: 34px; padding-bottom: 44px; }
.hero.small h1 { margin: 14px 0 16px; font-size: clamp(34px, 6vw, 60px); line-height: 1.02; letter-spacing: -.035em; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: #c9d3e0; text-decoration: none; font-size: 14px; font-weight: 600; }
.crumb svg { width: 16px; height: 16px; }
.crumb:hover { color: #fff; }

/* Sections */
section.s { padding: 72px 0 0; }
main > section.s:first-child { padding-top: 64px; }
.sh { margin-bottom: 20px; }
.sh h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.6px; }
.sh h2.kicker { margin: 0; font-size: 12px; letter-spacing: .12em; }
.kicker { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--k); margin-bottom: 6px; }

/* Tuiles projets */
.tiles { display: grid; gap: 16px; }
.t {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.t:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--k); }
.t .im { overflow: hidden; }
.t .im img { aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s; }
.t:hover .im img { transform: scale(1.04); }
.t .bd { padding: 16px 18px 0; display: flex; flex-direction: column; gap: 2px; }
.t .bd b { font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.t .bd small { color: var(--muted); font-size: 13.5px; }
.t .ft { margin: auto 18px 0; padding: 12px 0 14px; border-top: 1px solid var(--line2); font-size: 12.5px; font-weight: 700; color: var(--k); display: flex; align-items: center; gap: 6px; }
.t .bd + .ft { margin-top: 14px; }
.t .ft svg { width: 14px; height: 14px; transition: transform .15s; }
.t:hover .ft svg { transform: translateX(3px); }

/* Profil */
.grid { display: grid; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 16px; font-weight: 800; }
.card h3 .ic { width: 34px; height: 34px; border-radius: 10px; }
.card h3 .ic svg { width: 18px; height: 18px; }
.card p { margin: 0; }
.card a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--k) 50%, transparent); text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
.card a:hover { color: var(--k); }
.note { display: block; color: var(--muted); font-size: 13.5px; }
.tl, .rows { list-style: none; margin: 0; padding: 0; }
.tl { position: relative; }
.tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line2); }
.tl li { position: relative; padding: 0 0 16px 28px; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--k); }
.tl small { display: block; font-size: 12.5px; font-weight: 700; color: var(--k); font-variant-numeric: tabular-nums; }
.rows li + li { margin-top: 12px; }
.rows small { display: block; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.prize { background: linear-gradient(150deg, var(--k-soft), var(--card) 70%); border-color: color-mix(in srgb, var(--k) 35%, var(--line)); }
.prize .big { font-size: 44px; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--k); margin-bottom: 8px; }
.prize .links { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.card a.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 700; text-decoration: none; }
.card a.pill:hover { border-color: var(--k); color: var(--k); }
.pill svg { width: 14px; height: 14px; }

/* Références : vignettes non cliquables */
.cos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.co { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.co .im { border-radius: 9px; overflow: hidden; margin-bottom: 8px; }
.co img { aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(1); }
.co b { font-size: 14px; font-weight: 800; padding: 0 4px; line-height: 1.3; }
.co small { color: var(--muted); font-size: 12.5px; padding: 0 4px; }

/* Page projet */
.prose { margin-top: 40px; }
.prose p { max-width: 42em; margin: 0 0 1em; font-size: 16px; line-height: 1.65; }
.prose p:last-child { margin-bottom: 0; }
.gallery { display: grid; gap: 12px; margin-top: 24px; }
main > .gallery:first-child { margin-top: 40px; }
.pair { display: grid; gap: inherit; }
.gallery figure { margin: 0; border-radius: 16px; overflow: hidden; background: var(--line2); }

/* Bandeau inférieur */
.band { margin-top: 72px; background: var(--head); color: #c9d3e0; }
.band .in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.fb { font-weight: 800; color: #fff; font-size: 15px; }
.fb i { font-style: normal; font-weight: 300; color: #c9d3e0; }
.fb em { font-style: normal; font-weight: 400; font-size: 12.5px; color: #8a94a6; margin-left: 10px; }

/* Formulaire de contact */
dialog { border: 0; padding: 0; border-radius: 20px; background: var(--card); color: var(--txt); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); width: min(440px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(13, 17, 23, .55); backdrop-filter: blur(3px); }
.cf { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 24px; }
.cf-h { display: flex; align-items: center; justify-content: space-between; }
.cf h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.cf .x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg); color: var(--txt); font-size: 20px; line-height: 1; cursor: pointer; }
.cf label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cf input, .cf textarea { border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--txt); padding: 11px 12px; font: inherit; font-size: 16px; }
.cf textarea { resize: vertical; }
.cf input:focus-visible, .cf textarea:focus-visible { outline: 2px solid var(--k); outline-offset: 0; border-color: transparent; }
.cf .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-msg { margin: 0; font-weight: 700; text-align: center; }
.cf-msg.ok { color: var(--k); }
.cf-msg.err { color: #b42318; }
:root[data-theme="dark"] .cf-msg.err { color: #ff8b7d; }

@media (min-width: 700px) {
  .nav { display: flex; }
  .hero .in { grid-template-columns: 1.1fr .9fr; padding-top: 80px; padding-bottom: 96px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid .wide { grid-column: span 2; grid-row: span var(--span, 1); }
  .grid .wide.full { grid-column: 1 / -1; }
  .cos { grid-template-columns: repeat(4, 1fr); }
  .pair { display: flex; align-items: flex-start; }
  .pair figure { flex: var(--r, 1) 1 0; min-width: 0; }
  .pair.single figure { flex: none; width: min(100%, calc(var(--r, 1) * 34rem)); }
}
@media (max-width: 699px) {
  .badge { left: 12px; right: 12px; max-width: none; bottom: -30px; }
  .hero .in { padding-bottom: 90px; }
  .hero.small .in { padding-bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .top, .band, .cta, dialog { display: none; }
  .hero { background: none; color: #000; }
}
