/* tipii-web-kit 0.1.0 · public.css — public, marketing and product sites.
 *
 * Needs tokens.css first. Drawn from the tipii.fr theme: two-tone titles,
 * full-width two-block banners, pill uppercase buttons, a light footer with the
 * brands row. Fonts are the page's job (see the README).
 */

/* ── Base ── */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Type ── */

/* Two-tone title: <h2 class="title">Nos créations. <span>Trouvez celle qui vous ressemble.</span></h2> */
.title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 820px;
}
.title span { color: var(--muted); }
.title--light { color: var(--on-highlight); }
.title--light span { color: var(--on-highlight); opacity: .8; }
.banner-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
  text-transform: uppercase;
}
.h3 { font-family: var(--font-heading); font-weight: 600; font-size: 17px; line-height: 1.3; }
.lead { font-size: 16px; color: var(--muted); line-height: 1.55; max-width: 600px; }
.small { font-size: 13px; color: var(--muted); }

/* ── Layout ── */

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; align-items: center; }
.section { padding: 56px 0; }
.section--alt { background: var(--ground); }

/* ── Announcement bar + header ── */

.announce { background: var(--gold); text-align: center; font-family: var(--font-heading); font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 8px var(--gutter); }
.header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; }
.header__logo { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.header__logo img { height: 34px; width: auto; }
.header__left, .header__right { display: flex; gap: 22px; align-items: center; font-family: var(--font-heading); font-size: 13px; }
.header__right { justify-content: flex-end; }
.header a, .header button { text-decoration: none; }
.header .hide-mobile { display: none; }

/* Signed-in visitor: initial, first name, sign-out button */
.account { display: inline-flex; align-items: center; gap: 10px; }
.account__avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); font-family: var(--font-display); font-size: 20px; line-height: 1; }
.account__name { font-family: var(--font-heading); font-size: 13px; }
.account__out { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); transition: color .15s, border-color .15s; }
.account__out:hover { color: var(--ink); border-color: var(--accent); }

/* ── Buttons: pill, uppercase ── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 24px;
  font-family: var(--font-heading); font-weight: 400; font-size: 14px; text-transform: uppercase; letter-spacing: .02em;
  border-radius: var(--r-pill); border: 1.5px solid transparent;
  text-decoration: none; transition: background .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: var(--primary-ink); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--outline { border-color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: var(--primary-ink); }
.btn--white { background: #fff; color: #000; }
.btn--outline-light { border-color: var(--on-highlight); color: var(--on-highlight); }
.btn--gold { background: var(--gold); color: var(--primary); }
.btn--block { width: 100%; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.link { font-family: var(--font-heading); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.tag { display: inline-block; padding: 4px 10px; border-radius: var(--r-pill); background: var(--ground); border: 1px solid var(--line); font-family: var(--font-heading); font-size: 12px; }

/* ── Full-width two-block banner: photo + coloured block ── */

.banner { display: grid; grid-template-columns: 1fr; }
.banner__media { position: relative; min-height: 260px; background: var(--chip) center/cover no-repeat; overflow: hidden; }
.banner__block { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 40px var(--gutter); color: var(--on-highlight); background: var(--highlight); }
.banner__block p { font-size: 16px; max-width: 460px; }
.banner--gold .banner__block { background: var(--gold); color: var(--primary); }
.banner .btn { align-self: flex-start; }
.sticker { pointer-events: none; }
.banner__media .sticker { position: absolute; }

/* ── Scrolling band ── */

.marquee { background: var(--gold); overflow: hidden; border-block: 1px solid rgb(23 15 12 / .08); }
.marquee__track { display: flex; align-items: center; gap: 28px; width: max-content; padding: 14px 0; animation: marquee 32s linear infinite; }
.marquee__track span { font-family: var(--font-heading); font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.marquee__track img { width: 18px; height: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── How it works: intro beside a numbered vertical timeline ── */

.how { display: grid; gap: 36px; }
.timeline { list-style: none; position: relative; display: flex; flex-direction: column; gap: 36px; }
.timeline::before { content: ''; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: linear-gradient(var(--gold), var(--highlight)); border-radius: 2px; }
.timeline__step { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 20px; }
.timeline__dot { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); font-family: var(--font-heading); font-weight: 700; font-size: 18px; box-shadow: 0 0 0 6px var(--paper); }
.timeline__dot--last { background: var(--ink); color: var(--paper); }
.timeline__body { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.timeline__body .h3 { font-size: 20px; }
.timeline__body .small { font-size: 15px; max-width: 460px; }
.timeline__visual { margin-top: 10px; }

/* ── Product cards ── */

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.card__media { position: relative; }
.card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-card); }
.card__badge { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--gold); font-family: var(--font-heading); font-weight: 600; font-size: 12px; }

/* ── FAQ ── */

.faq { margin-top: 28px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 20px 0; cursor: pointer; font-family: var(--font-heading); font-weight: 500; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 300; font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 680px; }

/* ── Footer: logo, brands row, legal links ── */

.footer { background: var(--paper); border-top: 1px solid var(--line); font-family: var(--font-heading); }
.footer__brand { display: flex; justify-content: center; padding: 56px 0 40px; }
.footer__brand img { width: 230px; height: auto; }
.footer__brands { border-top: 1px solid var(--line); }
.footer__brands .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 28px; padding-top: 18px; padding-bottom: 18px; }
.footer__brand-link { font-family: var(--font-heading); font-weight: 600; font-size: 15px; text-decoration: none; }
.footer__brand-link:hover { color: var(--accent); }
.footer__legal .container { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-bottom: 28px; font-size: 12px; color: var(--muted); justify-content: center; }
.footer__legal a { text-decoration: none; }

/* ── Forms ── */

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-heading); font-weight: 500; font-size: 13px; }
.input { width: 100%; min-height: 52px; padding: 0 16px; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-field); }
.input:focus { outline: none; border-color: var(--primary); }
.input--error { border-color: var(--danger); }
.field-error { font-size: 13px; color: var(--danger); }
.fields-2 { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.4; cursor: pointer; }
.check input { appearance: none; width: 20px; height: 20px; flex-shrink: 0; border: 1.5px solid var(--primary); border-radius: 5px; cursor: pointer; }
.check input:checked { background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%23FAF9F6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 42px; height: 24px; border-radius: var(--r-pill); background: var(--line); transition: background .2s; }
.switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(23 15 12 / .3); transition: transform .2s; }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--focus); outline-offset: 2px; }
.alert { padding: 16px; border-radius: var(--r-card); background: var(--danger-soft); }
.alert strong { display: block; font-family: var(--font-heading); font-weight: 600; color: var(--danger); margin-bottom: 4px; }
.alert p { font-size: 14px; color: var(--muted); }
/* One-time code: six boxes */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp input { min-height: 62px; text-align: center; font-family: var(--font-heading); font-weight: 600; font-size: 26px; padding: 0; }

/* Sign-in: form beside a photo (the photo is a .banner__media) */
.auth { display: grid; grid-template-columns: 1fr; }
.auth .banner__media { min-height: 180px; }
.auth__body { padding: 40px var(--gutter) 56px; width: 100%; max-width: 560px; margin: 0 auto; }
.auth .title { font-size: clamp(28px, 3vw, 38px); }

/* ── Full-screen modal ── */

.modal { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--ground); color: var(--ink); overflow-y: auto; animation: fade .25s ease-out; }
.modal__inner { width: 100%; max-width: 520px; margin: auto; padding: 24px var(--gutter) 32px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.modal__inner .title { text-align: center; font-size: clamp(26px, 3vw, 36px); }
.modal__inner form { width: 100%; text-align: left; }

/* ── Feedback ── */

.toast { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 20px; border-radius: var(--r-pill); background: var(--gold); color: var(--ink); font-family: var(--font-heading); font-size: 14px; box-shadow: var(--shadow-pop); animation: fade .2s; }
.loading { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }

/* ── Responsive ── */

@media (min-width: 560px) and (max-width: 899px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .header .container { height: 84px; }
  .header__logo img { height: 40px; }
  .header .hide-mobile { display: inline; }
  .section { padding: 88px 0; }
  .lead { font-size: 18px; }

  .banner { grid-template-columns: 1fr 1fr; min-height: 460px; }
  .banner--reverse .banner__media { order: 2; }
  .banner__media { min-height: 460px; }
  .banner__block { padding: 56px 72px; }

  .how { grid-template-columns: 400px 1fr; gap: 80px; align-items: start; }
  .how__intro { position: sticky; top: 120px; }
  .timeline { gap: 56px; }

  .cards { grid-template-columns: repeat(auto-fit, minmax(220px, 300px)); gap: 24px; }
  .faq-layout { display: grid; grid-template-columns: 400px 1fr; gap: 80px; align-items: start; }
  .faq-layout .faq { margin-top: 0; }

  .auth { grid-template-columns: 1fr 1fr; min-height: calc(100dvh - 113px); }
  .auth .banner__media { order: 2; min-height: 100%; }
  .auth__body { align-self: center; }

  .modal { background: color-mix(in srgb, var(--ground) 97%, transparent); }
}

@media (max-width: 899px) {
  .hide-on-mobile { display: none !important; }
  .header .container { grid-template-columns: 1fr auto; gap: 12px; }
  .header__left { display: none; }
  .header__right { white-space: nowrap; }
  .header__logo img { height: 28px; }
  .account__name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
