/* Tutii — complément à Tailwind CSS (CDN). Tout ce qui est utilitaire
   (couleurs, espacements, radius, ombres) vit directement dans les classes
   Tailwind des templates. Ce fichier ne contient que ce que Tailwind ne
   couvre pas nativement sans configuration/build : keyframes personnalisées,
   zones de sécurité PWA, et quelques comportements d'état. */

html {
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100%;
}

details {
  position: relative;
  z-index: 0;
}

details > div {
  z-index: 99999;
}

.dropdown-menu {
  position: absolute;
  z-index: 99999;
  background: #ffffff;
  box-shadow: 0 16px 48px rgba(17, 17, 17, 0.08);
}

#app-splash {
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

@media (max-width: 767px) {
  #app-splash.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }
}

#app-splash.hide {
  opacity: 0;
  pointer-events: none;
}

.page-loading {
  position: fixed;
  z-index: 1001;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 40px);
  padding: 14px 19px;
  border: 1px solid #d1fae5;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.18);
  color: #065f46;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 10px));
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.page-loading.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.page-loading-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(17, 24, 39, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.page-loading-backdrop.is-visible {
  opacity: 1;
}

.page-loading__spinner {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 2px solid #a7f3d0;
  border-top-color: #059669;
  border-radius: 50%;
  animation: page-loading-spin 0.75s linear infinite;
}

@keyframes page-loading-spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 768px) {
  .page-loading, .page-loading-backdrop { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .page-loading__spinner { animation: none; border-top-color: #059669; }
}

.splash-mark {
  transform: scale(0.35);
  animation: splash-grow 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.splash-logo {
  opacity: 0;
  transform: translateY(10px);
  animation: splash-appear 0.5s ease forwards 0.35s;
}

@keyframes splash-grow {
  0% { transform: scale(0.35); opacity: 0.45; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes splash-appear {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@supports (height: 100dvh) {
  html, body {
    min-height: 100dvh;
  }
}

body {
  -webkit-tap-highlight-color: transparent;
}

input, textarea, select, button {
  font-size: 16px;
  touch-action: manipulation;
}

@media (max-width: 768px) {
  input, textarea, select, button {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Titres display (Fraunces) : rendu plus doux ---------- */
.font-display {
  font-feature-settings: "ss01" 1;
}
.text-balance {
  text-wrap: balance;
}

/* ---------- Révélation douce au scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: 0.06s; }
[data-reveal-delay="2"] { transition-delay: 0.12s; }
[data-reveal-delay="3"] { transition-delay: 0.18s; }

/* Variantes directionnelles (sections éditoriales en zig-zag) : le même
   mécanisme [data-reveal] / .is-visible piloté par main.js, juste un état
   de départ différent. */
[data-reveal][data-reveal-x="left"] { transform: translateX(-28px); }
[data-reveal][data-reveal-x="left"].is-visible { transform: translateX(0); }
[data-reveal][data-reveal-x="right"] { transform: translateX(28px); }
[data-reveal][data-reveal-x="right"].is-visible { transform: translateX(0); }
[data-reveal][data-reveal-x="scale"] { transform: scale(0.96); }
[data-reveal][data-reveal-x="scale"].is-visible { transform: scale(1); }

/* ---------- PWA : mode application installée ---------- */
body.is-standalone .app-toolbar { display: flex; padding-top: calc(10px + env(safe-area-inset-top)); }
body.is-standalone nav.sticky.top-0:not(.app-toolbar) { position: static; }

/* ---------- Barre d'onglets mobile : zone de sécurité ---------- */
@supports (padding: max(0px)) {
  .safe-bottom { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

/* ---------- Toggle segmenté "Dons / Marché" ---------- */
.segmented { position: relative; }
.segmented-thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  background: #FFFFFF;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(17,17,17,0.08);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.segmented[data-active="1"] .segmented-thumb { transform: translateX(100%); }


/* ---------- Confettis / cœur de validation ---------- */
.celebrate-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -14px;
  border-radius: 3px;
  opacity: 0.95;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(var(--rot, 360deg)); opacity: 0.2; }
}
.celebrate-heart {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0;
  z-index: 201;
  pointer-events: none;
  animation: heart-pop 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes heart-pop {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  30% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  55% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -60%) scale(0.9); opacity: 0; }
}

/* ---------- Indice de scroll (hero) ---------- */
@keyframes scroll-cue {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}
.animate-scroll-cue { animation: scroll-cue 2s ease-in-out infinite; }

.hero-bg {
  background-image: url('/static/1.jpg');
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) contrast(1.06);
  transform: scale(1.03);
}

.home-hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  right: -6%;
  bottom: -1px;
  left: -6%;
  height: 34px;
  clip-path: ellipse(65% 100% at 50% 100%);
  background: #ffffff;
  pointer-events: none;
}

.showcase-section {
  background: #f6f8f7;
}

.tutii-showcase-stage {
  position: relative;
  isolation: isolate;
  height: 590px;
  max-width: 1120px;
  margin: 0 auto;
  perspective: 1400px;
  transform-style: preserve-3d;
}

.showcase-card {
  position: absolute;
  z-index: 4;
  display: block;
  width: 228px;
  height: 218px;
  overflow: hidden;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 22px 45px rgba(22, 38, 32, 0.16), 0 4px 12px rgba(22, 38, 32, 0.08);
  transform-style: preserve-3d;
  transition: transform 350ms ease, box-shadow 350ms ease;
}

.showcase-card:hover {
  z-index: 25;
  box-shadow: 0 28px 55px rgba(22, 38, 32, 0.22), 0 6px 14px rgba(22, 38, 32, 0.1);
}

.showcase-card__image {
  display: block;
  width: 100%;
  height: 132px;
  border-radius: 14px;
  object-fit: cover;
}

.showcase-card__meta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 6px;
  padding: 7px 5px 2px;
  color: #18211d;
}

.showcase-card__tag {
  justify-self: start;
  grid-column: 1 / -1;
  margin-bottom: 3px;
  color: #047857;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.showcase-card__meta strong {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.showcase-card__meta small {
  overflow: hidden;
  color: #66716c;
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.showcase-card--1 {
  top: 60px;
  left: 8%;
  transform: rotate(-12deg) rotateY(15deg) translateZ(-30px);
}

.showcase-card--2 {
  bottom: 46px;
  left: 20%;
  width: 196px;
  height: 196px;
  transform: rotate(9deg) rotateY(12deg) translateZ(12px);
}

.showcase-card--2 .showcase-card__image { height: 113px; }

.showcase-card--3 {
  top: 52px;
  right: 8%;
  transform: rotate(12deg) rotateY(-15deg) translateZ(-24px);
}

.showcase-card--4 {
  right: 20%;
  bottom: 40px;
  width: 198px;
  height: 198px;
  transform: rotate(-9deg) rotateY(-12deg) translateZ(8px);
}

.showcase-card--4 .showcase-card__image { height: 114px; }

.showcase-phone {
  position: absolute;
  z-index: 20;
  top: 50%;
  left: 50%;
  width: 276px;
  height: 520px;
  padding: 9px;
  border: 1px solid #303733;
  border-radius: 40px;
  background: #171b19;
  box-shadow: 0 34px 70px rgba(24, 35, 30, 0.28), 0 8px 20px rgba(24, 35, 30, 0.16);
  transform: translate(-50%, -50%) rotateY(-5deg) rotateX(2deg);
}

.showcase-phone__screen {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 32px;
  background: #f6f8f7;
  padding: 17px 13px 10px;
}

.showcase-phone__status {
  display: flex;
  justify-content: space-between;
  padding: 0 7px;
  color: #27312c;
  font-size: 8px;
  font-weight: 700;
}

.showcase-phone__header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: #18211d;
  font-size: 13px;
}

.showcase-brand-mark {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 8px;
  background: #d9f2e6;
  color: #047857;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
}

.showcase-phone__location {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  color: #57635c;
  font-size: 8px;
}

.showcase-phone__content { min-height: 0; padding-top: 20px; }
.showcase-phone__eyebrow { color: #64716a; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.showcase-phone__content h3 { margin-top: 3px; color: #1c2620; font-family: Georgia, serif; font-size: 21px; font-weight: 700; }

.showcase-phone__search {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  border: 1px solid #e5e9e6;
  border-radius: 12px;
  background: #ffffff;
  padding: 0 9px;
  color: #7c8781;
  font-size: 8px;
}

.showcase-phone__categories { display: flex; gap: 5px; margin-top: 9px; }
.showcase-phone__categories span { border-radius: 999px; background: #e8f5ed; padding: 4px 7px; color: #166b48; font-size: 7px; font-weight: 700; }

.showcase-phone__feed { display: grid; gap: 8px; margin-top: 13px; }

.showcase-phone__item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  border: 1px solid #e8ece9;
  border-radius: 12px;
  background: #ffffff;
  padding: 6px;
  text-decoration: none;
}

.showcase-phone__item img,
.showcase-phone__item-fallback { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 8px; object-fit: cover; }
.showcase-phone__item-fallback { display: grid; place-items: center; background: #e8f5ed; color: #047857; }
.showcase-phone__item > span:last-child { display: grid; min-width: 0; gap: 4px; }
.showcase-phone__item strong { overflow: hidden; color: #202923; font-size: 8px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.showcase-phone__item small { color: #78837d; font-size: 7px; }

.showcase-phone__empty {
  margin-top: 16px;
  border: 1px dashed #d4ded8;
  border-radius: 12px;
  padding: 16px 12px;
  color: #65736b;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.showcase-phone__tabs {
  display: flex;
  justify-content: space-around;
  margin-top: auto;
  border-top: 1px solid #e7ece8;
  padding: 10px 4px 2px;
  color: #8a958f;
}

@media (max-width: 767px) {
  .tutii-showcase-stage {
    width: calc(100% + 2.5rem);
    height: 430px;
    margin-left: -1.25rem;
    overflow: hidden;
  }

  .showcase-phone {
    width: 196px;
    height: 374px;
    padding: 7px;
    border-radius: 32px;
    transform: translate(-50%, -50%) rotateY(-4deg) rotateX(1deg);
  }

  .showcase-phone__screen { border-radius: 25px; padding: 13px 10px 8px; }

  .showcase-card {
    width: 132px;
    height: 152px;
    padding: 5px;
    border-radius: 15px;
  }

  .showcase-card__image { height: 88px; border-radius: 10px; }
  .showcase-card__meta { padding: 5px 3px 1px; }
  .showcase-card__tag { margin-bottom: 2px; font-size: 7px; }
  .showcase-card__meta strong { font-size: 8px; }
  .showcase-card__meta small { font-size: 7px; }

  .showcase-card--1 { top: 22px; left: -10px; transform: rotate(-12deg) rotateY(12deg) scale(0.9); }
  .showcase-card--2 { bottom: 7px; left: -7px; width: 124px; height: 144px; transform: rotate(9deg) rotateY(10deg) scale(0.88); }
  .showcase-card--2 .showcase-card__image { height: 82px; }
  .showcase-card--3 { top: 22px; right: -10px; transform: rotate(12deg) rotateY(-12deg) scale(0.9); }
  .showcase-card--4 { right: -7px; bottom: 7px; width: 124px; height: 144px; transform: rotate(-9deg) rotateY(-10deg) scale(0.88); }
  .showcase-card--4 .showcase-card__image { height: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-card { transition: none; }
}

@keyframes home-photo-arrive {
  from { transform: scale(1.045); opacity: 0.78; }
  to { transform: scale(1); opacity: 1; }
}

@media (min-width: 768px) {
  .home-hero::after { height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero::after { clip-path: none; }
}

.hero-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 190px;
  z-index: 5;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.72) 62%, #ffffff 100%);
  pointer-events: none;
}

/* ---------- Flottement doux (visuel hero) ---------- */
@keyframes float-soft {
  0%, 100% { transform: translateY(0) rotate(var(--float-rot, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--float-rot, 0deg)); }
}
.animate-float { animation: float-soft 5s ease-in-out infinite; }
.animate-float-delay { animation: float-soft 5s ease-in-out infinite; animation-delay: 1.1s; }

/* ---------- Accordéon FAQ (details/summary natif) ---------- */
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-chevron { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); transform: rotate(-90deg); }
.faq-item[open] .faq-chevron { transform: rotate(90deg); }
.faq-item[open] summary { color: #111111; }

/* ---------- Utilitaire : clamp de texte ---------- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

