/* ============================================================
   Mes Demoiselles — Premium Custom Styles
   Magazine feminin : Mode, Beaute, Bien-etre & Lifestyle
   ============================================================ */

/* ----------------------------------------
   BASE & GLOBAL
   ---------------------------------------- */

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: #ec4899;
  color: #fff;
}

/* ----------------------------------------
   CUSTOM SCROLLBAR
   ---------------------------------------- */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

::-webkit-scrollbar-thumb {
  background: #0891b2;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0e7490;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #0891b2 #f8fafc;
}

/* ----------------------------------------
   ANIMATIONS — Scroll Reveal
   ---------------------------------------- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes chevronBounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(10px);
    opacity: 1;
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.3);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(236, 72, 153, 0);
  }
}

@keyframes thinLineExpand {
  from {
    width: 0;
  }
  to {
    width: 60px;
  }
}

.anim-fade-in-up {
  animation: fadeInUp 0.8s ease-out both;
}

.anim-fade-in {
  animation: fadeIn 0.6s ease-out both;
}

.anim-slide-left {
  animation: slideInLeft 0.7s ease-out both;
}

.anim-slide-right {
  animation: slideInRight 0.7s ease-out both;
}

.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.35s; }
.anim-delay-4 { animation-delay: 0.5s; }
.anim-delay-5 { animation-delay: 0.65s; }

/* ----------------------------------------
   HERO SECTION
   ---------------------------------------- */

.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  will-change: transform;
}

@media (max-width: 768px) {
  .hero-section .hero-bg {
    background-attachment: scroll;
  }
}

.hero-section .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.45) 40%,
    rgba(14, 116, 144, 0.3) 100%
  );
}

.hero-masthead-line {
  display: block;
  width: 60px;
  height: 1px;
  background: #ec4899;
  margin-bottom: 1.25rem;
  animation: thinLineExpand 1s ease-out 0.3s both;
}

.hero-scroll-indicator {
  animation: chevronBounce 2s ease-in-out infinite;
}

/* ----------------------------------------
   ARTICLE CARDS — Hover Effects
   ---------------------------------------- */

.card-article {
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-article:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.12),
              0 8px 20px -8px rgba(0, 0, 0, 0.08);
}

/* Image zoom on card hover */
.card-article .card-image-wrapper {
  overflow: hidden;
}

.card-article .card-image-wrapper img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-article:hover .card-image-wrapper img {
  transform: scale(1.06);
}

/* ----------------------------------------
   UNIVERSE CARDS — Explore Section
   ---------------------------------------- */

.universe-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
}

.universe-card .universe-image {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.universe-card:hover .universe-image {
  transform: scale(1.08);
}

.universe-card .universe-overlay {
  transition: background 0.4s ease;
}

.universe-card:hover .universe-overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.2) 60%,
    transparent 100%
  );
}

.universe-card-horizontal {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.universe-card-horizontal:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.1);
}

.universe-card-horizontal .card-image-side {
  overflow: hidden;
}

.universe-card-horizontal .card-image-side img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.universe-card-horizontal:hover .card-image-side img {
  transform: scale(1.06);
}

/* ----------------------------------------
   FEATURED ARTICLE
   ---------------------------------------- */

.featured-article {
  transition: box-shadow 0.35s ease;
}

.featured-article:hover {
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.1);
}

.featured-article .featured-image-wrapper {
  overflow: hidden;
}

.featured-article .featured-image-wrapper img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.featured-article:hover .featured-image-wrapper img {
  transform: scale(1.05);
}

/* ----------------------------------------
   NEWSLETTER SECTION
   ---------------------------------------- */

.newsletter-section {
  position: relative;
  overflow: hidden;
}

.newsletter-section .newsletter-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .newsletter-section .newsletter-bg {
    background-attachment: scroll;
  }
}

.newsletter-section .newsletter-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(8, 145, 178, 0.88) 0%,
    rgba(14, 116, 144, 0.82) 45%,
    rgba(236, 72, 153, 0.65) 100%
  );
}

.newsletter-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.3);
  border-color: #ec4899;
}

.newsletter-btn {
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.newsletter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4);
}

.newsletter-btn:active {
  transform: translateY(0);
}

/* ----------------------------------------
   SECTION TITLES
   ---------------------------------------- */

.section-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: #ec4899;
  margin-top: 0.75rem;
}

.section-title-center::after {
  margin-left: auto;
  margin-right: auto;
}

/* ----------------------------------------
   PROSE TYPOGRAPHY — Article Content
   ---------------------------------------- */

.prose {
  max-width: 68ch;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}

.prose p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: #374151;
}

.prose ul,
.prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.prose blockquote {
  border-left: 3px solid #ec4899;
  padding-left: 1.25rem;
  margin: 2rem 0;
  font-style: italic;
  color: #4b5563;
  font-family: 'Playfair Display', serif;
}

.prose a {
  color: #0891b2;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: #ec4899;
}

.prose img {
  border-radius: 0.75rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.prose figure figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

/* ----------------------------------------
   LINE CLAMP UTILITIES
   ---------------------------------------- */

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----------------------------------------
   FOCUS STATES — Accessibility
   ---------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ----------------------------------------
   GLOBAL TRANSITIONS
   ---------------------------------------- */

a,
button {
  transition: color 0.2s ease,
              background-color 0.2s ease,
              transform 0.2s ease;
}

img {
  image-rendering: auto;
}

/* ----------------------------------------
   CATEGORY LABEL PILL
   ---------------------------------------- */

.category-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ----------------------------------------
   READ MORE LINK
   ---------------------------------------- */

.read-more-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 500;
  transition: color 0.2s ease, gap 0.3s ease;
}

.read-more-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.read-more-link:hover::after {
  width: 100%;
}

.read-more-link:hover {
  gap: 0.625rem;
}

/* ----------------------------------------
   ARTICLE HERO — Single page
   ---------------------------------------- */

.article-hero img {
  transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.article-hero:hover img {
  transform: scale(1.03);
}

/* ----------------------------------------
   ARTICLE PROSE — Enhanced typography
   ---------------------------------------- */

.article-prose ul li::marker {
  color: #0891b2;
}

.article-prose ol li::marker {
  color: #0891b2;
  font-weight: 600;
}

/* Lettrine decorative sur le premier paragraphe */
.article-prose > p:first-of-type::first-letter {
  float: left;
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.25rem;
  color: #0891b2;
}

/* ----------------------------------------
   PRINT STYLES
   ---------------------------------------- */

@media print {
  header,
  footer,
  nav,
  .hero-section,
  .newsletter-section,
  .hero-scroll-indicator {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
  }

  .prose {
    max-width: 100%;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }
}
