/* ============================================================
   AR'Digit — site.css
   Shared styles for every page of the site.
   Aesthetic: warm paper, torn-paper section seams, restrained
   pencil accents, clean readable UI.
   ============================================================ */
@import url('colors_and_type.css');

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* tiny paper grain so flat areas feel like a sheet, not a screen */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: var(--grain-opacity, .5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}
.page-wrap { position: relative; z-index: 1; }

/* ---------- shared layout ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: clamp(64px, 9vw, 120px) 0; }
.section.cream { background: var(--cream); }
.section.ink {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- torn-paper seam ----------
   The seam is the *next* section's sheet tearing over the previous one.
   Put .tear-top on a section: its sheet color rips down over what's above. */
.tear-top::before,
.tear-bottom::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 26px;
  background: inherit;
  z-index: 2;
}
.tear-top::before {
  top: -1px;
  -webkit-mask: var(--tear-mask); mask: var(--tear-mask);
  -webkit-mask-size: 220px 26px; mask-size: 220px 26px;
  filter: drop-shadow(0 -2px 3px rgba(33,33,33,.06));
}
.tear-bottom::after {
  bottom: -1px;
  transform: scaleY(-1);
  -webkit-mask: var(--tear-mask); mask: var(--tear-mask);
  -webkit-mask-size: 220px 26px; mask-size: 220px 26px;
  filter: drop-shadow(0 2px 3px rgba(33,33,33,.06));
}
:root {
  --tear-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='26' viewBox='0 0 220 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26 V12 L8 9 L16 14 L26 7 L34 13 L44 6 L53 12 L62 5 L72 11 L82 4 L92 12 L102 6 L112 13 L122 5 L132 11 L142 4 L152 12 L162 7 L172 13 L182 6 L192 12 L202 5 L212 11 L220 8 V26 Z' fill='%23000'/%3E%3C/svg%3E");
}
/* thin pencil stroke variant of a seam */
.pencil-rule {
  height: 3px; border: 0; margin: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='6' viewBox='0 0 400 6'%3E%3Cpath d='M0 3 Q40 1 80 3 T160 3 T240 4 T320 2 T400 3' stroke='%23212121' stroke-width='1.4' fill='none' stroke-linecap='round' opacity='0.5'/%3E%3C/svg%3E") repeat-x center / 400px 6px;
}

/* ---------- header / nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 48px);
  background: rgba(253,250,245,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-08);
}
.nav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav .brand img { height: 40px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.nav-links a {
  font: 600 15px var(--font-body); color: var(--ink);
  text-decoration: none; position: relative;
}
.nav-links a.plain:hover { color: var(--rust); }
.nav-links a.plain::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px;
  height: 2px; background: var(--rust); border-radius: 2px;
  transition: right var(--dur) var(--ease);
}
.nav-links a.plain:hover::after { right: 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px var(--font-body); cursor: pointer;
  padding: 11px 18px; border-radius: var(--radius);
  border: 1.5px solid transparent; text-decoration: none;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--rust); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink-40); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(33,33,33,.04); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }

/* burger */
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .25s var(--ease); }

/* ---- "Autour d'un café" hint bubble shown under a CTA button (desktop only).
   Used by the nav CTA and the home-page hero CTA. ---- */
.coffee-bubble { display: none; }
@media (min-width: 861px) {
  .coffee-wrap { position: relative; display: inline-block; }
  .coffee-bubble {
    position: absolute;
    top: 100%; left: 50%;
    margin-top: 14px;
    transform: translate(-50%, -8px) scale(.85);
    transform-origin: 50% -20%;
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    padding: 8px 14px;
    border: 2.5px solid var(--ink);
    border-radius: 14px;
    box-shadow: 3px 3px 0 rgba(33,33,33,.18);
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    transition: opacity .16s ease, transform .28s cubic-bezier(.34,1.56,.64,1);
  }
  /* tail — ink outline + white fill, pointing up at the button */
  .coffee-bubble::before {
    content: ""; position: absolute; bottom: 100%; left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent; border-bottom-color: var(--ink);
  }
  .coffee-bubble::after {
    content: ""; position: absolute; bottom: 100%; left: 50%;
    transform: translateX(-50%) translateY(3.5px);
    border: 5.5px solid transparent; border-bottom-color: #fff;
  }
  .coffee-wrap:hover .coffee-bubble {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font: 700 12px var(--font-body); letter-spacing: .14em;
  text-transform: uppercase; color: var(--rust); margin: 0 0 16px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--rust); border-radius: 2px; }
h1.display {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(44px, 8vw, 92px); line-height: .95;
  letter-spacing: -.025em; margin: 0;
}
h1.display .ap { color: var(--rust); }
h2.display {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08;
  letter-spacing: -.02em; margin: 0 0 18px;
}
.script {
  font-family: var(--font-script); font-weight: 700; color: var(--rust);
}
.handnote {
  font-family: var(--font-script); font-weight: 600;
  font-size: 22px; color: var(--ink-70);
  transform: rotate(-3deg); display: inline-block;
}
.lead { font-size: clamp(17px, 2vw, 20px); line-height: 1.6; color: var(--ink-70); max-width: 54ch; }
.muted { color: var(--ink-55); }

/* ---------- quote block (pencil-margin style) ---------- */
.quote-pencil {
  font-family: var(--font-script); font-weight: 700;
  font-size: clamp(24px, 3.2vw, 38px); line-height: 1.25;
  color: var(--ink); position: relative; padding-left: 22px; margin: 0;
  max-width: 22ch;
}
.quote-pencil::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 4px; border-radius: 4px; background: var(--rust);
}

/* ---------- image placeholders (production stand-in for design-tool slots) ---------- */
.img-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--cream); color: var(--ink-55);
  font: 600 13.5px var(--font-body);
  border: 1.5px dashed var(--ink-15);
  padding: 16px;
}
.slot-frame {
  background: #fff; padding: 12px 12px 40px; border-radius: 4px;
  box-shadow: var(--shadow-2); position: relative;
}
.slot-frame.tape::before {
  content: ""; position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  width: 96px; height: 26px; background: rgba(246,157,75,.4);
  border: 1px dashed rgba(195,95,1,.3);
}
.slot-frame .cap {
  position: absolute; left: 0; right: 0; bottom: 10px; text-align: center;
  font-family: var(--font-script); font-weight: 600; font-size: 19px; color: var(--ink-70);
}

/* ---------- cards / chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px var(--font-body); color: var(--ink);
  background: #fff; border: 1.5px solid var(--ink-15);
  padding: 10px 16px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-1);
}
.chip .ic { color: var(--rust); display: inline-flex; }

.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.svc {
  position: relative;
  background: #fff; border: 1px solid var(--ink-08); border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow:
    0 1px 1px rgba(33,33,33,.04),
    0 2px 4px rgba(33,33,33,.05),
    0 6px 10px rgba(33,33,33,.05);
  transition:
    transform .3s var(--svc-ease, cubic-bezier(.21,.79,.27,1)),
    box-shadow .3s var(--svc-ease, cubic-bezier(.21,.79,.27,1)),
    border-color .3s var(--svc-ease, cubic-bezier(.21,.79,.27,1));
  will-change: transform;
}
/* faint top sheen that strengthens on hover — adds realism to the lift */
.svc::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0) 38%);
  opacity: 0; transition: opacity .3s var(--svc-ease, cubic-bezier(.21,.79,.27,1));
}
.svc:hover {
  transform: translateY(-10px);
  box-shadow:
    0 2px 4px rgba(33,33,33,.05),
    0 10px 20px rgba(33,33,33,.09),
    0 24px 44px rgba(33,33,33,.13);
  border-color: var(--peach);
}
.svc:hover::after { opacity: 1; }
.svc .ic {
  width: 46px; height: 46px; border-radius: 10px; background: var(--peach);
  color: var(--rust); display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  transition: transform .3s var(--svc-ease, cubic-bezier(.21,.79,.27,1));
}
.svc:hover .ic { transform: translateY(-2px) scale(1.06) rotate(-3deg); }
.svc h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin: 0 0 8px; letter-spacing: -.01em; }
.svc p { font-size: 14.5px; line-height: 1.55; color: var(--ink-70); margin: 0; }

/* ---------- "Identité graphique" tile: hover thumbnails ---------- */
.svc-identity { padding-bottom: 88px; overflow: hidden; }
.svc-identity-imgs { position: absolute; right: 16px; bottom: 16px; width: 62px; height: 62px; pointer-events: none; }
.svc-identity-img {
  position: absolute; right: 0; bottom: 0; width: 46px; height: 46px; border-radius: 8px;
  background: #fff; border: 1px solid var(--ink-08); box-shadow: var(--shadow-2);
  object-fit: cover; opacity: 0; transform: translateY(28px);
  transition: transform .3s var(--svc-ease, cubic-bezier(.21,.79,.27,1)), opacity .25s ease;
}
.svc-identity-img--2 { right: 12px; bottom: 12px; }
.svc-identity:hover .svc-identity-img--1 { opacity: 1; transform: translateY(0); transition-delay: .05s; }
.svc-identity:hover .svc-identity-img--2 { opacity: 1; transform: translateY(0); transition-delay: .25s; }

/* ---------- pencil avatar (gray pencil mascot) ---------- */
.pencil-avatar {
  position: relative; flex-shrink: 0;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #fbf7f0, var(--cream));
  border: 2px solid var(--ink-15);
  box-shadow: var(--shadow-1), inset 0 -6px 16px rgba(33,33,33,.04);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pencil-avatar svg { width: 64%; height: 64%; display: block; }
.pencil-avatar.sm { width: 72px; height: 72px; }
.pencil-avatar.lg { width: 160px; height: 160px; }
.pencil-avatar.on-ink {  border-color: rgba(255,255,255,.18); }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding: 56px 0 32px; }
.footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer .brand-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer .brand-line img { height: 46px; filter: brightness(0) invert(1) sepia(.3) saturate(2) hue-rotate(-10deg); }
.footer h4 { font: 700 12px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.footer .legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; color: rgba(255,255,255,.5); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .svc-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links { position: fixed; inset: 0 0 auto auto; top: 69px; right: 12px;
    flex-direction: column; align-items: flex-start; gap: 16px;
    background: var(--paper); border: 1px solid var(--ink-15); border-radius: 14px;
    padding: 20px 24px; box-shadow: var(--shadow-2); width: min(260px, 80vw);
    transform-origin: top right; transform: scale(.9); opacity: 0; pointer-events: none;
    transition: .2s var(--ease); }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .burger { display: block; }
}
