/* ================================================
   AS Consult - Custom Styles
   ================================================ */

/* ------------------------------------------------
   Base Styles
   ------------------------------------------------ */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection Color — handled by scrapbook.css */

/* ------------------------------------------------
   Scrollbar Styling — handled by scrapbook.css
   ------------------------------------------------ */

/* ------------------------------------------------
   Hero Swiper Customization
   ------------------------------------------------ */
.hero-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(250, 246, 238, 0.45);
    opacity: 1;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: var(--terracotta);
    width: 40px;
    border-radius: 6px;
}

.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    transition: all 0.3s ease;
}

.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
    transform: scale(1.1);
}

/* ------------------------------------------------
   Navigation Link Styles
   ------------------------------------------------ */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--terracotta);
    transition: width 0.3s ease;
}

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

/* ------------------------------------------------
   Card Hover Effects
   ------------------------------------------------ */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-8px);
}

/* ------------------------------------------------
   Button Animations
   ------------------------------------------------ */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ------------------------------------------------
   Glassmorphism Effect
   ------------------------------------------------ */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ------------------------------------------------
   FAQ Accordion Transitions
   ------------------------------------------------ */
[x-cloak] {
    display: none !important;
}

/* Smooth height transition for accordion */
.accordion-content {
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
}

/* ------------------------------------------------
   Form Input Focus Styles
   ------------------------------------------------ */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(195, 99, 61, 0.18);
}

/* Floating label effect (optional enhancement) */
.form-group {
    position: relative;
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label {
    transform: translateY(-24px) scale(0.85);
    color: var(--terracotta);
}

/* ------------------------------------------------
   Parallax Effect (subtle)
   ------------------------------------------------ */
.parallax-bg {
    transform: translateZ(0);
    will-change: transform;
}

/* ------------------------------------------------
   Gradient Text
   ------------------------------------------------ */
.gradient-text {
    background: linear-gradient(135deg, var(--terracotta), var(--warm-brown));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ------------------------------------------------
   Pulse Animation for CTA
   ------------------------------------------------ */
@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(195, 99, 61, 0.55);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(195, 99, 61, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(195, 99, 61, 0);
    }
}

.pulse-btn {
    animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

/* ------------------------------------------------
   Number Badge Animation
   ------------------------------------------------ */
.number-badge {
    position: relative;
    overflow: hidden;
}

.number-badge::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* ------------------------------------------------
   Image Hover Zoom
   ------------------------------------------------ */
.img-zoom {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-zoom:hover {
    transform: scale(1.1);
}

/* ------------------------------------------------
   Section Dividers
   ------------------------------------------------ */
.section-divider {
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--terracotta), var(--ochre));
    border-radius: 2px;
}

/* ------------------------------------------------
   Feature Cards Hover
   ------------------------------------------------ */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    background-color: rgba(195, 99, 61, 0.06);
    transform: translateX(4px);
}

/* ------------------------------------------------
   Counter Animation
   ------------------------------------------------ */
.counter-number {
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------
   Tooltip Styles
   ------------------------------------------------ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.875rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 8px);
}

/* ------------------------------------------------
   AOS Custom Animations
   ------------------------------------------------ */
[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

/* ------------------------------------------------
   Print Styles
   ------------------------------------------------ */
@media print {

    header,
    footer,
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: black;
    }

    a {
        text-decoration: underline;
    }
}

/* ------------------------------------------------
   Reduced Motion
   ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ------------------------------------------------
   Blog Styles
   ------------------------------------------------ */

/* Blog Card - Liste des articles */
.blog-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-8px);
}

.blog-card:hover .blog-card-image {
    transform: scale(1.03);
}

.blog-card-image {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Paper Frame for Blog Images (remplace l'ancien iOS glass) */
.ios-glass-frame {
    background: linear-gradient(135deg, var(--paper), var(--ivory));
    box-shadow:
        inset 0 0 20px rgba(250, 246, 238, 0.8),
        inset 0 0 5px rgba(139, 111, 71, 0.08),
        0 4px 10px rgba(70, 45, 20, 0.12);
    border: 1px solid rgba(139, 111, 71, 0.2);
    backdrop-filter: blur(4px);
}

.article-content {
    line-height: 1.8;
    font-family: var(--font-sans);
    color: var(--ink);
}

.article-content h2 {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(139, 111, 71, 0.3);
}

.article-content h3 {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.015em;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content h4 {
    font-family: var(--font-serif);
    font-size: 1.175rem;
    font-weight: 500;
    color: var(--ink-soft);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.article-content p {
    margin-bottom: 1.25rem;
    color: var(--ink-soft);
}

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

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: var(--ink-soft);
}

.article-content li::marker {
    color: var(--terracotta);
}

.article-content a {
    color: var(--terracotta);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.article-content a:hover {
    color: var(--terracotta-dk);
}

.article-content blockquote {
    border-left: 3px solid var(--terracotta);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--cream);
    border-radius: 0 0.75rem 0.75rem 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--ink-soft);
}

.article-content img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    max-width: 100%;
    height: auto;
}

.article-content pre {
    background: var(--ink);
    color: var(--paper);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.article-content code {
    background: var(--cream);
    color: var(--terracotta-dk);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.article-content th,
.article-content td {
    border: 1px solid rgba(139, 111, 71, 0.22);
    padding: 0.75rem 1rem;
    text-align: left;
}

.article-content th {
    background: var(--cream);
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--ink);
}

.article-content hr {
    border: none;
    border-top: 1px solid rgba(139, 111, 71, 0.25);
    margin: 2rem 0;
}

/* Article Meta - Auteur et date */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    color: var(--warm-brown);
    font-size: 0.875rem;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Article Share - Boutons partage */
.article-share {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.article-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.article-share-btn:hover {
    transform: translateY(-2px);
}

.article-share-btn.facebook {
    background: #1877f2;
    color: white;
}

.article-share-btn.facebook:hover {
    background: #0d65d9;
}

.article-share-btn.twitter {
    background: #000000;
    color: white;
}

.article-share-btn.twitter:hover {
    background: #333333;
}

.article-share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.article-share-btn.linkedin:hover {
    background: #005e93;
}

/* Related Articles - Articles connexes */
.related-articles {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .related-articles {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .related-articles {
        grid-template-columns: repeat(3, 1fr);
    }
}

.related-article-card {
    background: var(--paper);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.related-article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Blog Empty State */
.blog-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--cream);
    border-radius: 1rem;
    border: 2px dashed rgba(139, 111, 71, 0.3);
    color: var(--ink-soft);
}

/* Blog Loading State */
.blog-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

.blog-loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(139, 111, 71, 0.2);
    border-top-color: var(--terracotta);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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