/**
 * FICHE-PAIE.FR - Blog SEO
 *
 * @copyright 2025-2026 Purple Telecom EURL
 * @license   Proprietary - All Rights Reserved
 */

/* =====================================================
   BLOG - LISTE DES ARTICLES
   ===================================================== */
.blog-hero {
    background: linear-gradient(135deg, var(--gp-bleu-marine) 0%, #2a5298 100%);
    color: var(--gp-blanc);
    padding: 60px 20px;
    text-align: center;
}

.blog-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: #ffffff;
}

.blog-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    color: #ffffff;
}

/* Recherche blog */
.blog-search {
    margin-top: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.blog-search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--gp-bleu-marine);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 18px center;
}

.blog-search-input:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.blog-search-input::placeholder {
    color: #6c757d;
}

.blog-search-count {
    margin-top: 12px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Message aucun résultat */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--gp-gris);
}

.no-results p {
    font-size: 1.1rem;
    margin: 0;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* =====================================================
   BLOG - CARDS ARTICLES
   ===================================================== */
.article-card {
    background: var(--gp-blanc);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.article-card-image {
    height: 200px;
    display: block;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--gp-bleu-marine) 0%, var(--gp-turquoise) 100%);
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

/* Image card en erreur : on la cache pour montrer le fond dégradé */
.article-card-image img.img-error {
    opacity: 0;
}

/* Placeholder texte centré pour les cards */
.article-card-image::before {
    content: "Fiche-Paie.fr";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 0;
    pointer-events: none;
}

.article-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--gp-gris);
    margin-bottom: 12px;
}

.article-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gp-bleu-marine);
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-card h2 a {
    text-decoration: none;
    color: inherit;
}

.article-card h2 a:hover {
    color: var(--gp-turquoise);
}

.article-card-excerpt {
    color: var(--gp-gris);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.article-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gp-bleu-marine);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

.article-card-link:hover {
    color: var(--gp-turquoise);
}

.article-card-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.article-card-link:hover svg {
    transform: translateX(4px);
}

/* =====================================================
   ARTICLE - PAGE COMPLETE
   ===================================================== */

/* Layout article avec sidebar */
.article-layout {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Sidebar sticky */
.article-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.article-nav {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.25rem;
    border-left: 3px solid var(--gp-bleu-marine, #1a3a5c);
}

.article-nav h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-nav-list li {
    margin-bottom: 0.5rem;
}

.article-nav-list a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #495057;
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.article-nav-list a:hover {
    background: #e9ecef;
    color: var(--gp-bleu-marine, #1a3a5c);
}

.article-nav-list a.active {
    background: var(--gp-bleu-marine, #1a3a5c);
    color: white;
    font-weight: 500;
}

/* Contenu principal */
.article-main {
    flex: 1;
    min-width: 0;
    max-width: 800px;
}

/* Ancien style .article-page pour rétro-compatibilité */
.article-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--gp-gris);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--gp-bleu-marine);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--gp-turquoise);
}

.breadcrumb-separator {
    color: var(--gp-gris);
}

/* Article Header */
.article-header {
    margin-bottom: 40px;
}

.article-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gp-bleu-marine);
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--gp-gris);
    font-size: 0.9rem;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gp-gris-clair);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta svg {
    width: 16px;
    height: 16px;
}

/* Article Hero Image - avec fallback dégradé */
.article-hero-image {
    position: relative;
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #1d458c 0%, #2563eb 50%, #00b894 100%);
    min-height: 300px;
}

.article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 300px;
    position: relative;
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* Image en erreur : on la cache pour montrer le fond dégradé */
.article-hero-image img.img-error {
    opacity: 0;
}

/* Placeholder texte centré */
.article-hero-image::before {
    content: "Fiche-Paie.fr";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    z-index: 0;
    pointer-events: none;
}

/* Table of Contents (mobile uniquement) */
.toc,
.mobile-toc {
    background: var(--gp-gris-clair);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 30px;
}

.toc-title {
    font-weight: 600;
    color: var(--gp-bleu-marine);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list a {
    color: var(--gp-gris);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-list a:hover {
    color: var(--gp-bleu-marine);
}

.toc-list a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gp-turquoise);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Article Content */
.article-content {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #333;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gp-bleu-marine);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gp-gris-clair);
    scroll-margin-top: 100px;
}

.article-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gp-bleu-marine);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1rem;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content strong {
    color: var(--gp-bleu-marine);
}

.article-content a {
    color: var(--gp-turquoise);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--gp-bleu-marine);
}

/* Info Box */
.info-box,
.definition-box {
    background: var(--gp-jaune-pale);
    border-left: 4px solid var(--gp-jaune-bordure);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 12px 12px 0;
}

.info-box-title {
    font-weight: 600;
    color: var(--gp-jaune-fonce);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box p {
    margin: 0;
    color: #665c3d;
}

/* Warning Box */
.warning-box {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 12px 12px 0;
}

/* Example Box */
.example-box,
.formula-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 12px;
}

.example-box-title {
    font-weight: 600;
    color: var(--gp-bleu-marine);
    margin-bottom: 12px;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--gp-bleu-marine) 0%, #2a5298 100%);
    color: var(--gp-blanc);
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    margin: 50px 0;
}

.cta-box h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--gp-blanc);
}

.cta-box p {
    opacity: 0.9;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.cta-box .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gp-turquoise);
    color: var(--gp-blanc);
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.cta-box .btn:hover {
    background: #35a0ab;
}

/* Related Articles */
.related-articles {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--gp-gris-clair);
}

.related-articles h3 {
    font-size: 1.4rem;
    color: var(--gp-bleu-marine);
    margin-bottom: 25px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-card {
    background: var(--gp-gris-clair);
    padding: 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.related-card:hover {
    background: #e5e7eb;
}

.related-card h4 {
    font-size: 1rem;
    color: var(--gp-bleu-marine);
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-card p {
    font-size: 0.85rem;
    color: var(--gp-gris);
    margin: 0;
}

/* =====================================================
   BLOG CTA SECTION (Page liste)
   ===================================================== */
.blog-cta {
    background: var(--gp-gris-clair);
    padding: 50px 30px;
    border-radius: 12px;
    text-align: center;
}

.blog-cta h2 {
    font-size: 1.8rem;
    color: var(--gp-bleu-marine);
    margin-bottom: 15px;
}

.blog-cta p {
    color: var(--gp-gris);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.blog-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gp-bleu-marine);
    color: var(--gp-blanc);
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.blog-cta .btn-primary:hover {
    background: #16356e;
}

/* =====================================================
   HOME - SECTION GUIDES
   ===================================================== */
.guides-section {
    padding: 60px 20px;
    background: var(--gp-gris-clair);
}

.guides-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.guides-section h2 {
    font-size: 1.8rem;
    color: var(--gp-bleu-marine);
    text-align: center;
    margin-bottom: 40px;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.guide-link {
    background: var(--gp-blanc);
    padding: 25px;
    border-radius: 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.guide-link:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.guide-link-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gp-bleu-marine) 0%, var(--gp-turquoise) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-link-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--gp-blanc);
}

.guide-link-text h3 {
    font-size: 1rem;
    color: var(--gp-bleu-marine);
    margin-bottom: 5px;
}

.guide-link-text p {
    font-size: 0.85rem;
    color: var(--gp-gris);
    margin: 0;
}

/* =====================================================
   BOUTONS DE PARTAGE
   ===================================================== */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.share-buttons-label {
    color: #9CA3AF;
    font-size: 12px;
    margin-right: 4px;
    font-weight: 500;
}

.share-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #6B7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.linkedin:hover {
    background: #0A66C2;
    color: white;
}

.share-btn.twitter:hover {
    background: #000000;
    color: white;
}

.share-btn.whatsapp:hover {
    background: #25D366;
    color: white;
}

.share-btn.copy:hover {
    background: #10B981;
    color: white;
}

.share-btn svg {
    width: 16px;
    height: 16px;
}

/* Tooltip copié */
.share-btn.copy.copied {
    background: #10B981;
    color: white;
}

.share-btn.copy.copied::after {
    content: 'Copié !';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* Desktop : masquer le TOC mobile */
@media (min-width: 1025px) {
    .mobile-toc,
    .toc {
        display: none;
    }
}

/* Tablette et mobile : masquer la sidebar, afficher TOC inline */
@media (max-width: 1024px) {
    .article-layout {
        flex-direction: column;
        padding: 30px 20px;
    }

    .article-sidebar {
        display: none;
    }

    .article-main {
        width: 100%;
        max-width: 100%;
    }

    .mobile-toc,
    .toc {
        display: block;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 1.8rem;
    }

    .blog-hero p {
        font-size: 1rem;
    }

    .blog-search {
        max-width: 100%;
        padding: 0 10px;
    }

    .blog-search-input {
        padding: 12px 15px 12px 45px;
        font-size: 0.95rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 1.7rem;
    }

    .article-content h2 {
        font-size: 1.35rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .share-btn {
        width: 38px;
        height: 38px;
    }

    .cta-box {
        padding: 25px 20px;
    }

    .cta-box h3 {
        font-size: 1.3rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .article-layout {
        padding: 20px 15px;
    }
}
