/* Costume Swipe — site public.
   Toutes les valeurs viennent de brand.css : aucune couleur, taille, police,
   espacement, rayon, ombre ou durée n'est écrit en dur ici. Les seuls littéraux
   restants sont structurels (0, 1px de filet, 100 %, fractions de grille,
   ratios d'image, multiplicateurs de calc) et les seuils des media queries,
   où var() n'est pas autorisé par CSS. */

@import url('brand.css');

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body { -webkit-font-smoothing: antialiased; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { overflow-wrap: break-word; hyphens: auto; }

:focus-visible {
  outline: var(--space-1) solid var(--color-accent);
  outline-offset: var(--space-1);
  border-radius: var(--radius-sm);
}

.wrap {
  width: 100%;
  max-width: calc(var(--space-10) * 8);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.narrow { max-width: calc(var(--space-9) * 8); }

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: calc(-1 * var(--space-10));
  background: var(--color-accent);
  color: var(--color-black);
  padding: var(--space-3) var(--space-4);
  z-index: var(--z-toast);
  font-weight: var(--font-weight-bold);
}
.skip-link:focus { top: var(--space-3); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--space-8);
}

.brand { display: flex; align-items: center; gap: var(--space-2); }
.brand:hover { text-decoration: none; }
.brand span {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  text-transform: var(--text-transform-display);
  letter-spacing: var(--letter-spacing-display);
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

.nav { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.nav a {
  color: var(--color-text);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--color-accent); text-decoration: none; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-base);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-accent); color: var(--color-black); }
.btn-primary:hover { background: var(--color-white); }
.btn-ghost { border-color: var(--color-text); color: var(--color-text); background: transparent; }
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---------- Hero ---------- */

.hero { padding: var(--space-9) 0 var(--space-8); }
.hero .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-4);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  text-transform: var(--text-transform-display);
  letter-spacing: var(--letter-spacing-display);
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-5);
}

.hero h1 { margin-bottom: var(--space-5); }
.hero p.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-6);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.hero-note { font-size: var(--text-sm); margin-top: var(--space-5); }

.hero-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-modal);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- Sections ---------- */

section { padding: var(--space-9) 0; }

h2 { margin-bottom: var(--space-4); }

.section-lead {
  max-width: calc(var(--space-9) * 6);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-7);
}

.subhead { color: var(--color-accent); margin-bottom: var(--space-4); }
.steps-group { margin-bottom: var(--space-7); }

.grid { display: grid; gap: var(--space-5); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
  transition: border-color var(--transition-normal);
}
.card:hover { border-color: var(--color-accent); }
.card h3 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.card p { font-size: var(--text-sm); }
.card .icon {
  width: var(--space-7);
  height: var(--space-7);
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-black);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-4);
}
.card .icon svg { width: var(--space-5); height: var(--space-5); }

.steps { counter-reset: step; }
.steps .card::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: var(--space-6);
  height: var(--space-6);
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-black);
  font-family: var(--font-body);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.band {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.cta-band { text-align: center; }
.cta-band .section-lead { margin-left: auto; margin-right: auto; margin-bottom: var(--space-5); }

/* ---------- Contenu long (pages légales / support) ---------- */

.page-head { padding: var(--space-8) 0 var(--space-4); }
.page-head h1 { font-size: var(--text-3xl); margin-bottom: var(--space-3); }
.updated { font-size: var(--text-sm); }

/* Le reset de brand.css met toutes les marges à 0 : on redonne un rythme
   vertical explicite au texte long. */
.prose { padding-bottom: var(--space-9); }
.prose :is(p, ul, ol, table) { margin-bottom: var(--space-4); }
.prose h2 { font-size: var(--text-2xl); margin: var(--space-7) 0 var(--space-3); }
.prose h3 { font-size: var(--text-xl); margin: var(--space-6) 0 var(--space-2); }
.prose p, .prose li { font-size: var(--text-base); line-height: var(--leading-loose); }
.prose ul, .prose ol { padding-left: var(--space-5); }
.prose li { margin-bottom: var(--space-2); }
.prose strong { font-weight: var(--font-weight-bold); }
.prose a { text-decoration: underline; text-underline-offset: var(--space-1); }
.prose .btn { text-decoration: none; }

.callout {
  border: 1px solid var(--color-border);
  border-left: var(--space-1) solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin: var(--space-5) 0;
}

.todo { border-left-color: var(--color-success); }

details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0 var(--space-5);
  margin-bottom: var(--space-3);
  transition: border-color var(--transition-fast);
}
details[open] { border-color: var(--color-accent); }
summary {
  cursor: pointer;
  padding: var(--space-4) 0;
  font-weight: var(--font-weight-bold);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  color: var(--color-accent);
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
}
details[open] summary::after { content: "–"; }
details > p:last-child { padding-bottom: var(--space-4); }

.contact-card {
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-6) 0;
}
.contact-card h2 { margin-top: 0; }
.contact-card .mail {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  word-break: break-all;
}

:is(.contact-card, .callout, details) > :last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th, td {
  text-align: left;
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
th { font-weight: var(--font-weight-bold); color: var(--color-accent); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-8) 0 var(--space-6);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-6); }
.footer-mark { width: var(--space-9); height: auto; margin-bottom: var(--space-4); }

.footer-grid h4 { font-size: var(--text-lg); color: var(--color-accent); margin-bottom: var(--space-3); }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: var(--space-2); }
.footer-grid a { color: var(--color-text); font-size: var(--text-sm); }
.footer-grid a:hover { color: var(--color-accent); }
.footer-grid p { font-size: var(--text-sm); margin-bottom: var(--space-3); }
.footer-bottom {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero { padding: var(--space-8) 0; }
  .hero .wrap { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  section { padding: var(--space-8) 0; }
  .nav { gap: var(--space-4); }
  .site-header .wrap { padding-top: var(--space-2); padding-bottom: var(--space-2); flex-wrap: wrap; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 var(--space-4); }
  .hero h1, .page-head h1 { font-size: var(--text-2xl); }
  .prose h2 { font-size: var(--text-xl); }
  .hero-actions .btn { width: 100%; }
  /* overflow-wrap (et non word-break) : seuls les mots trop longs pour la
     largeur disponible sont coupés, « Plateforme » reste entier. */
  th, td { padding: var(--space-2); overflow-wrap: break-word; hyphens: auto; }
  .card, .contact-card { padding: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* Impression : les pages légales doivent rester lisibles en PDF. */
@media print {
  body { background: var(--color-white); color: var(--color-black); }
  .site-header, .site-footer, .hero-visual { display: none; }
  a, th { color: var(--color-black); }
}
