/* Chat-marche: woad blue, madder pink and weld yellow, the dyes of the
   Bayeux embroidery, with stitched edges and cat ears on the photo cards. */
:root {
  --fond: #e4edf0;
  --lin: #fbf8f1;
  --encre: #22395c;
  --encre-doux: #4a5d7a;
  --garance: #b83a60;
  --garance-fonce: #962c4c;
  --gaude: #e9b83a;
  --gaude-pale: #f8e7b5;
  --sauge: #5f8a5b;
  --rose: #f2b8c6;
  --rose-pale: #fbe4ea;
  --titres: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", "Trebuchet MS", sans-serif;
  --texte: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --point: 2px dashed;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 1.0625rem/1.6 var(--texte);
}
img { max-width: 100%; height: auto; }
a { color: var(--garance-fonce); text-underline-offset: .18em; }
a:hover { color: var(--garance); }
:focus-visible { outline: 3px solid var(--gaude); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--titres); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.largeur { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.evitement { position: absolute; left: -999px; top: .5rem; background: var(--lin); padding: .5rem 1rem; z-index: 10; }
.evitement:focus { left: .5rem; }

/* ------------------------------------------------------------ header */
.entete { background: var(--encre); color: var(--lin); border-bottom: 4px solid var(--gaude); }
.entete-ligne { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: .65rem; color: var(--lin); text-decoration: none; font: 700 1.6rem/1 var(--titres); }
.marque:hover { color: var(--gaude-pale); }
.marque img { width: 52px; height: 52px; }
.entete nav ul { display: flex; gap: .25rem 1.2rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.entete nav a, .entete .lien { color: var(--lin); text-decoration: none; font: 600 1.05rem var(--titres); padding: .3rem .1rem; border-bottom: var(--point) transparent; }
.entete nav a:hover, .entete nav a[aria-current="page"], .entete .lien:hover { border-bottom-color: var(--gaude); color: var(--lin); }
.lien { background: none; border: 0; cursor: pointer; }

/* ------------------------------------------------------------ buttons */
.bouton {
  display: inline-block; cursor: pointer;
  background: var(--garance); color: #fff; border: 0; border-radius: 999px;
  padding: .7rem 1.35rem; font: 700 1.02rem/1.2 var(--titres); text-decoration: none;
  box-shadow: 0 3px 0 var(--garance-fonce);
  outline: var(--point) rgba(255, 255, 255, .55); outline-offset: -6px;
}
.bouton:hover { background: var(--garance-fonce); color: #fff; }
.bouton:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--garance-fonce); }
.bouton:focus-visible { outline: 3px solid var(--gaude); outline-offset: 3px; }
.bouton:disabled { opacity: .6; cursor: wait; }
.bouton-doux { background: var(--lin); color: var(--encre); box-shadow: 0 3px 0 #c9d3dc; outline-color: #c9d3dc; }
.bouton-doux:hover { background: #fff; color: var(--encre); }
.bouton-danger { background: #fff; color: var(--garance-fonce); box-shadow: 0 3px 0 #e7c3cf; outline-color: #e7c3cf; }
.bouton-danger:hover { background: var(--rose-pale); color: var(--garance-fonce); }
.bouton-petit { padding: .45rem .9rem; font-size: .92rem; }

/* ------------------------------------------------------------ home hero */
.accroche { position: relative; padding: clamp(2.5rem, 6vw, 4.5rem) 0 4.5rem; overflow: hidden; }
.accroche-grille { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2rem; align-items: center; }
.accroche h1 { max-width: 15ch; }
.accroche-texte > p { max-width: 52ch; font-size: 1.15rem; color: var(--encre-doux); }
.accroche-boutons { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.accroche-chat { justify-self: center; width: min(420px, 100%); }
.traces { position: absolute; left: 0; bottom: .2rem; width: 100%; height: 70px; color: var(--encre); opacity: .2; }
.traces use { opacity: 0; animation: pas .35s ease-out forwards; }
.traces use:nth-child(1) { animation-delay: .2s; } .traces use:nth-child(2) { animation-delay: .45s; }
.traces use:nth-child(3) { animation-delay: .7s; }  .traces use:nth-child(4) { animation-delay: .95s; }
.traces use:nth-child(5) { animation-delay: 1.2s; } .traces use:nth-child(6) { animation-delay: 1.45s; }
.traces use:nth-child(7) { animation-delay: 1.7s; } .traces use:nth-child(8) { animation-delay: 1.95s; }
.traces use:nth-child(9) { animation-delay: 2.2s; }
@keyframes pas { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .traces use { animation: none; opacity: 1; } }

/* ------------------------------------------------------------ cat cards */
.chats { background: var(--lin); padding: 4rem 0 4.5rem; border-top: 4px var(--point) var(--rose); }
.chats-intro { max-width: 62ch; color: var(--encre-doux); margin-bottom: 3rem; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 3.2rem 1.8rem; }

.chat {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border-radius: 26px; padding: .9rem .9rem 1.3rem;
  box-shadow: 0 6px 0 var(--rose);
  outline: var(--point) var(--rose); outline-offset: -7px;
}
/* the ears */
.chat::before, .chat::after {
  content: ""; position: absolute; top: -24px; width: 62px; height: 46px;
  background: var(--rose); clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.chat::before { left: 22px; transform: rotate(-14deg); }
.chat::after { right: 22px; transform: rotate(14deg); }
.chat-cadre { position: relative; z-index: 1; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--fond); }
.chat-cadre img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-texte { position: relative; z-index: 1; padding: 1rem .45rem 0; display: flex; flex-direction: column; flex: 1; }
.chat h3 { font-size: 1.65rem; margin-bottom: .3rem; }
.chat-puces { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.puce { display: inline-block; font: 600 .86rem/1 var(--titres); padding: .38rem .7rem; border-radius: 999px; background: var(--fond); color: var(--encre); }
.puce-femelle { background: var(--rose-pale); color: var(--garance-fonce); }
.puce-male { background: #dbe8f5; color: var(--encre); }
.puce-exemple { background: var(--gaude-pale); color: #6b4f00; }
.chat-desc { font-size: .98rem; color: var(--encre-doux); flex: 1; }
.chat-desc p:last-child { margin-bottom: 1.1rem; }
.chat .bouton { align-self: flex-start; }
.vide { grid-column: 1 / -1; background: #fff; border-radius: 20px; padding: 2rem; max-width: 60ch; outline: var(--point) var(--rose); outline-offset: -7px; }

/* ------------------------------------------------------------ adopted */
.adoptes { padding: 4rem 0; }
.adoptes-liste { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; }
.adopte { display: flex; gap: 1rem; align-items: flex-start; background: var(--lin); border-radius: 20px; padding: 1rem 1.1rem; }
.adopte img { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; border: 4px solid var(--gaude); flex: none; background: var(--fond); }
.adopte h3 { margin: .2rem 0 .1rem; font-size: 1.25rem; }
.adopte-quand { font: 600 .92rem var(--titres); color: var(--sauge); margin-bottom: .35rem; }
.adopte p { font-size: .95rem; color: var(--encre-doux); margin-bottom: .3rem; }

/* ------------------------------------------------------------ help */
.aider { background: var(--encre); color: var(--lin); padding: 3.5rem 0; }
.aider-grille { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem; align-items: start; }
.aider h2 { color: #fff; }
.aider p { color: #d6deea; max-width: 46ch; }
.aider-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.aider-liste li { border: var(--point) rgba(233, 184, 58, .7); border-radius: 18px; padding: .9rem 1.1rem; color: #d6deea; }
.aider-liste strong { color: var(--gaude); font-family: var(--titres); font-size: 1.1rem; }

/* ------------------------------------------------------------ text pages */
.page-titre { padding: 3.5rem 0 2.5rem; border-bottom: 4px var(--point) var(--rose); background: var(--lin); }
.page-titre p { max-width: 62ch; font-size: 1.15rem; color: var(--encre-doux); margin: 0; }
.page-texte { padding: 3rem 0 4rem; }
.page-texte > section { max-width: 780px; }
.page-texte section { margin-bottom: 3.2rem; }
.page-texte h2 { padding-bottom: .35rem; border-bottom: 3px var(--point) var(--gaude); display: inline-block; }
.page-texte p, .page-texte li { max-width: 68ch; }

.etapes { list-style: none; counter-reset: etape; padding: 0; margin: 1.5rem 0 0; }
.etapes li { counter-increment: etape; position: relative; padding: 0 0 1.6rem 4.2rem; }
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: -.2rem;
  width: 2.9rem; height: 2.9rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--garance); color: #fff; font: 700 1.35rem var(--titres);
  outline: var(--point) rgba(255, 255, 255, .6); outline-offset: -5px;
}
.etapes li:not(:last-child)::after { content: ""; position: absolute; left: 1.4rem; top: 2.9rem; bottom: .2rem; border-left: 3px var(--point) var(--garance); opacity: .45; }
.etapes h3 { margin-bottom: .3rem; }

.tarifs { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.2rem 0 1.4rem; }
.tarifs div { background: #fff; border-radius: 18px; padding: .9rem 1.4rem; outline: var(--point) var(--rose); outline-offset: -6px; min-width: 12rem; }
.tarifs dt { font: 600 .95rem var(--titres); color: var(--encre-doux); }
.tarifs dd { margin: .1rem 0 0; font: 700 1.5rem var(--titres); }

.budget { width: 100%; border-collapse: collapse; background: #fff; border-radius: 18px; overflow: hidden; margin: 1rem 0 1.2rem; }
.budget th, .budget td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--fond); }
.budget thead th { background: var(--encre); color: var(--lin); font-family: var(--titres); }
.budget tbody th { font-weight: 400; }
.budget td { white-space: nowrap; font-weight: 600; }

.liste-pattes { list-style: none; padding: 0; margin: 1rem 0; }
.liste-pattes li { position: relative; padding-left: 2.1rem; margin-bottom: .75rem; }
.liste-pattes li::before {
  content: ""; position: absolute; left: 0; top: .2rem; width: 1.25rem; height: 1.25rem;
  background: var(--garance);
  -webkit-mask: url("/static/img/patte.svg?v=2") center / contain no-repeat;
  mask: url("/static/img/patte.svg?v=2") center / contain no-repeat;
}
.urgence li::before { background: #c0392b; }

.calendrier { list-style: none; padding: 0; margin: 1.2rem 0; border-left: 3px var(--point) var(--gaude); }
.calendrier li { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; align-items: baseline; padding: .55rem 0 .55rem 1.2rem; position: relative; }
.calendrier li::before { content: ""; position: absolute; left: -.55rem; top: .95rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--garance); }
.quand { font: 700 1rem var(--titres); }

.a-completer { background: var(--gaude-pale); color: #6b4f00; border-radius: 6px; padding: 0 .35em; font-style: italic; }
.introuvable { padding-top: 4rem; }

/* ------------------------------------------------------------ footer */
.pied { background: var(--lin); border-top: 4px var(--point) var(--rose); padding: 3rem 0 2rem; }
.pied-grille { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2.5rem; }
.pied p { color: var(--encre-doux); max-width: 60ch; }
.pied-mini { font-size: .9rem; margin-top: 1.5rem; }
.contact-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.contact-type { display: inline-block; min-width: 6.5rem; font: 600 .95rem var(--titres); color: var(--encre-doux); }

/* ------------------------------------------------------------ admin */
.admin-page { padding: 2rem 0 4rem; }
.message { min-height: 1.6em; font-weight: 600; color: var(--sauge); }
.message.erreur { color: var(--garance-fonce); }
.carte-admin { background: #fff; border-radius: 22px; padding: 1.6rem; outline: var(--point) var(--rose); outline-offset: -7px; }
.connexion { max-width: 420px; margin: 2rem auto; }
.admin-colonnes { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 2.5rem; align-items: start; }
.admin-colonnes > .carte-admin { position: sticky; top: 1rem; }
.admin h1 { font-size: 1.8rem; }
label { display: block; font: 600 .98rem var(--titres); margin: 1rem 0 .3rem; }
input:not([type="file"]), select, textarea {
  width: 100%; font: inherit; color: var(--encre); background: var(--lin);
  border: 2px solid #c9d3dc; border-radius: 12px; padding: .55rem .75rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--encre); outline: none; box-shadow: 0 0 0 3px var(--gaude-pale); }
input[type="file"] { font: inherit; max-width: 100%; }
textarea { resize: vertical; }
.champs-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.aide { font-size: .88rem; color: var(--encre-doux); margin: .4rem 0; }
.apercu { display: block; width: 160px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; margin: .6rem 0; background: var(--fond); }
.form-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }
.connexion .bouton { margin-top: 1.2rem; }
.admin-sous-titre { margin-top: 1.6rem; font-size: 1.15rem; color: var(--encre-doux); }
.admin-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.admin-chat { display: flex; gap: 1rem; background: #fff; border-radius: 18px; padding: .8rem; align-items: flex-start; }
.admin-chat img { width: 72px; height: 90px; object-fit: cover; border-radius: 12px; flex: none; background: var(--fond); }
.admin-nom { margin: .1rem 0; font-size: 1.15rem; font-family: var(--titres); }
.admin-infos { margin: 0 0 .6rem; font-size: .92rem; color: var(--encre-doux); }
.admin-boutons { display: flex; gap: .5rem; flex-wrap: wrap; }
.admin-vide { color: var(--encre-doux); font-style: italic; }
code { background: var(--fond); padding: .1em .35em; border-radius: 5px; }

/* ------------------------------------------------------------ small screens */
@media (max-width: 820px) {
  .accroche-grille, .aider-grille, .pied-grille, .admin-colonnes { grid-template-columns: 1fr; }
  .accroche-chat { width: min(230px, 65%); order: -1; }
  .admin-colonnes > .carte-admin { position: static; }
  .calendrier li { grid-template-columns: 1fr; gap: .1rem; }
}
@media (max-width: 480px) {
  .marque { font-size: 1.35rem; }
  .marque img { width: 42px; height: 42px; }
  .champs-ligne { grid-template-columns: 1fr; }
  .grille { gap: 3rem 1rem; }
}
