/* ============================================================
   Lina Community Challenge — custom styles
   Complète Tailwind (CDN). Mobile-first, thème pastel chaleureux.
   ============================================================ */

:root {
  --cream:      #F8F4EE;
  --panel:      #FDFBF7;
  --warm:       #F2ECE1;
  --warm-line:  #EADFCF;
  --ink:        #3B3733;
  --ink-soft:   #6E6761;
  --blush-50:   #FBEDEC;
  --blush-100:  #F6DEDD;
  --blush-200:  #EFC6C5;
  --blush-300:  #E6A9A8;
  --blush-400:  #DE8E8D;
  --blush-500:  #D26F6E;
  --blush-600:  #C05B59;
  --blush-ink:  #B4544F;
}

*, *::before, *::after { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Typo (fallbacks ; la config Tailwind mappe aussi ces familles) --- */
.font-serif  { font-family: "Playfair Display", Georgia, "Times New Roman", serif; }
.font-script { font-family: "Parisienne", "Segoe Script", cursive; }
.font-hand   { font-family: "Caveat", "Segoe Print", cursive; }

/* --- Cadre mobile --- */
.app-frame {
  background: var(--panel);
  box-shadow: 0 30px 60px -25px rgba(90, 60, 55, .35), 0 0 0 1px rgba(0, 0, 0, .02);
}

/* --- Visuels (le dégradé de secours s'affiche si l'image manque) --- */
.hero-photo, .media { position: relative; }

.hero-photo {
  background:
    radial-gradient(120% 90% at 78% 12%, #F5DCD9 0%, rgba(245, 220, 217, 0) 55%),
    radial-gradient(120% 120% at 8% 100%, #EADFD0 0%, rgba(234, 223, 208, 0) 60%),
    linear-gradient(160deg, #F0E3D6 0%, #E7D3CC 100%);
}
.media { background: linear-gradient(150deg, #F1E4D7, #E9D5CE); }

.hero-photo > img,
.media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.media-label {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: .5rem;
  font-family: "Caveat", cursive;
  font-size: .95rem;
  color: #B79E92;
}

/* --- Bords « papier déchiré » de la carte principale --- */
.paper { position: relative; }
.paper::before,
.paper::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  height: 16px;
  background: #fff;
  -webkit-mask-size: 120px 16px;          mask-size: 120px 16px;
  -webkit-mask-repeat: repeat-x;          mask-repeat: repeat-x;
}
.paper::before {
  top: -8px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16'%3E%3Cpath d='M0 16H120V7L112 9 104 5 96 10 88 6 80 9 72 4 64 9 56 6 48 10 40 5 32 9 24 5 16 10 8 6 0 9Z' fill='%23fff'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16'%3E%3Cpath d='M0 16H120V7L112 9 104 5 96 10 88 6 80 9 72 4 64 9 56 6 48 10 40 5 32 9 24 5 16 10 8 6 0 9Z' fill='%23fff'/%3E%3C/svg%3E");
}
.paper::after {
  bottom: -8px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16'%3E%3Cpath d='M0 0H120V9L112 7 104 11 96 6 88 10 80 7 72 12 64 7 56 10 48 6 40 11 32 7 24 11 16 6 8 10 0 7Z' fill='%23fff'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16'%3E%3Cpath d='M0 0H120V9L112 7 104 11 96 6 88 10 80 7 72 12 64 7 56 10 48 6 40 11 32 7 24 11 16 6 8 10 0 7Z' fill='%23fff'/%3E%3C/svg%3E");
}

/* --- Barres de progression --- */
.track {
  background: var(--blush-100);
  border-radius: 999px;
  overflow: hidden;
}
.fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #E79A9A, #D2696A);
  transition: width .9s cubic-bezier(.22, 1, .36, 1);
}

/* --- Boutons --- */
.btn-cta {
  background: linear-gradient(135deg, #E88B8B 0%, #D46C6C 100%);
  box-shadow: 0 16px 30px -12px rgba(206, 102, 102, .6);
  transition: transform .15s ease, filter .15s ease;
}
.btn-cta:hover   { filter: brightness(.98); }
.btn-cta:active  { transform: scale(.98); }

.btn-partner {
  background: linear-gradient(135deg, #E48B8B, #D46E6E);
  transition: transform .15s ease, filter .15s ease, background .2s ease, color .2s ease;
}
.btn-partner:hover  { filter: brightness(.97); }
.btn-partner:active { transform: scale(.98); }
.btn-partner.is-started {
  background: #F3E1E0;
  color: var(--blush-ink);
  box-shadow: none;
  filter: none;
}

/* --- Carte partenaire recommandée / démarrée --- */
.partner-featured {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blush-300), 0 18px 34px -20px rgba(180, 110, 110, .5);
}
.partner-card.is-started {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blush-200), 0 18px 34px -22px rgba(150, 110, 110, .45);
}

/* --- Bonus flottant --- */
.bonus-bubble {
  background: radial-gradient(circle at 30% 25%, #F7E1E1, #F0CFCF);
  box-shadow: 0 12px 24px -12px rgba(190, 120, 120, .55);
  transform: rotate(-7deg);
  z-index: 10;
}

/* --- Doodles dessinés main --- */
.doodle {
  fill: none;
  stroke: var(--blush-300);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.doodle-soft { stroke: var(--blush-200); }
.doodle-fill { fill: var(--blush-200); }

/* --- Barre fixe du bas --- */
.dock {
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-top: 1px solid var(--blush-100);
  box-shadow: 0 -10px 24px -18px rgba(120, 80, 80, .45);
}
.dock.is-complete { background: rgba(251, 237, 236, .96); }

/* --- Micro-animation compteur --- */
@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.pop { animation: pop .45s ease; }

/* --- Accessibilité : mouvement réduit --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fill { transition: none; }
  .pop  { animation: none; }
}
