/* ==========================================================================
   ARTICLE PAGES - Shared Styles for Legal/Content Pages
   DLM E-Formation Theme
   Reusable across: formation-haccp-obligatoire, controle-sanitaire-restaurant,
   attestation-haccp, permis-exploitation-obligatoire, licence-debit-boissons
   ========================================================================== */

/* Page wrapper */
.article-page {
    background: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Hero Section */
.article-hero {
    color: white;
    padding: 60px 20px;
    margin: 0;
    text-align: center;
}
.article-hero.hero-haccp {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}
.article-hero.hero-pe {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
}
.article-hero.hero-controle {
    background: linear-gradient(135deg, #7c5ccc 0%, #5e45b3 100%);
}
.article-hero .hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.article-hero .page-title {
    color: white !important;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    line-height: 1.3;
    text-align: center;
    display: block;
}
.article-hero .page-title i {
    color: #ffd700;
    margin-right: 0.5rem;
    font-size: 2rem;
    vertical-align: middle;
}
.article-hero .hero-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 400;
    text-align: center;
    display: block;
    max-width: 800px;
    margin: 0 auto;
}
.article-hero .hero-meta,
.article-hero p.hero-meta,
.article-hero .hero-meta i {
    margin-top: 16px;
    font-size: 0.85rem;
    color: #fff !important;
    opacity: 1 !important;
}

/* Main container */
.article-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Quick Navigation */
.article-nav {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 40px;
}
.article-nav h3 {
    color: #2c3e50;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.quick-nav-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.quick-nav-list li a {
    display: block;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: #495057;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}
.quick-nav-list li a:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}
.article-page.pe-page .quick-nav-list li a:hover {
    background: #1a365d;
    border-color: #1a365d;
    color: white;
}
.quick-nav-list li a i {
    font-size: 0.75rem;
    margin-right: 6px;
    opacity: 0.7;
}

/* Content sections */
.content-section {
    margin-bottom: 48px;
}
.section-header {
    border-bottom: 2px solid #dc3545;
    padding-bottom: 12px;
    margin-bottom: 24px;
}
.pe-page .section-header {
    border-bottom-color: #1a365d;
}
.section-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-header h2 i {
    color: #dc3545;
    font-size: 1.25rem;
}
.pe-page .section-header h2 i {
    color: #1a365d;
}
.section-content {
    color: #495057;
    line-height: 1.7;
}
.section-content p {
    margin-bottom: 16px;
}
.section-content strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Law cards */
.legal-framework {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.law-card {
    background: #f8f9fa;
    border-left: 3px solid #dc3545;
    padding: 20px;
    border-radius: 4px;
}
.pe-page .law-card {
    border-left-color: #1a365d;
}
.law-card h3 {
    color: #dc3545;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 12px 0;
}
.pe-page .law-card h3 {
    color: #1a365d;
}
.law-reference {
    background: white;
    border: 1px solid #e9ecef;
    padding: 12px;
    border-radius: 4px;
    margin: 12px 0;
    font-size: 0.9rem;
}
.law-reference strong {
    color: #dc3545;
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
}
.pe-page .law-reference strong {
    color: #1a365d;
}
.law-reference a {
    color: #0066cc;
    text-decoration: none;
}
.law-reference a:hover {
    text-decoration: underline;
}

/* Quote highlights */
.law-highlight {
    background: #fffbf0;
    border-left: 3px solid #ffc107;
    padding: 16px;
    margin: 16px 0;
    border-radius: 4px;
}
.law-highlight i {
    color: #ffc107;
    font-size: 1.25rem;
    margin-bottom: 8px;
}
.law-highlight blockquote {
    margin: 8px 0 0 0;
    font-style: italic;
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Info boxes */
.info-box {
    padding: 16px;
    border-radius: 4px;
    margin: 20px 0;
    border-left: 3px solid;
    font-size: 0.95rem;
}
.info-box i {
    margin-right: 8px;
}
.info-box h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
}
.info-box p {
    margin: 0;
    line-height: 1.6;
}
.info-box.info {
    background: #e7f3ff;
    border-left-color: #0066cc;
    color: #004085;
}
.info-box.warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}
.info-box.success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}
.info-box.danger {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

/* Lists */
.section-content ul {
    list-style: none;
    padding-left: 0;
}
.section-content ul li {
    padding: 6px 0 6px 24px;
    position: relative;
    line-height: 1.6;
}
.section-content ul li:before {
    content: '•';
    color: #dc3545;
    font-weight: bold;
    position: absolute;
    left: 8px;
}
.pe-page .section-content ul li:before {
    color: #1a365d;
}

/* Entity cards */
.entity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
.entity-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 20px;
}
.entity-card h3 {
    color: #2c3e50;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 16px 0;
}
.entity-card ul li {
    font-size: 0.95rem;
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
}
.comparison-table th {
    background: #2c3e50;
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}
.comparison-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
}
.comparison-table tr:nth-child(even) td {
    background: #f8f9fa;
}
.comparison-table .highlight-row td {
    background: #e7f3ff;
    font-weight: 600;
}

/* Licence cards */
.licence-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}
.licence-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
    position: relative;
}
.licence-card h3 {
    color: #1a365d;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}
.licence-card .licence-tag {
    display: inline-block;
    background: #1a365d;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.licence-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #495057;
    margin: 0;
}

/* Checklist */
.checklist {
    list-style: none !important;
    padding-left: 0 !important;
}
.checklist li {
    padding: 10px 0 10px 32px !important;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}
.checklist li:before {
    content: '\f058' !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900;
    color: #28a745 !important;
    position: absolute;
    left: 4px !important;
    font-size: 1rem;
}
.checklist li.danger-item:before {
    content: '\f057' !important;
    color: #dc3545 !important;
}

/* Steps */
.steps-list {
    counter-reset: step-counter;
    list-style: none !important;
    padding-left: 0 !important;
}
.steps-list li {
    counter-increment: step-counter;
    padding: 16px 16px 16px 56px !important;
    position: relative;
    background: #f8f9fa;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}
.steps-list li:before {
    content: counter(step-counter) !important;
    color: white !important;
    font-weight: 700;
    position: absolute;
    left: 12px !important;
    top: 50%;
    transform: translateY(-50%);
    background: #dc3545;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.pe-page .steps-list li:before {
    background: #1a365d;
}

/* Sanction levels */
.sanction-levels {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}
.sanction-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}
.sanction-item .level-badge {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    text-align: center;
    line-height: 1.2;
}
.sanction-item .level-badge.level-1 { background: #ffc107; color: #333; }
.sanction-item .level-badge.level-2 { background: #fd7e14; }
.sanction-item .level-badge.level-3 { background: #dc3545; }
.sanction-item .level-badge.level-4 { background: #721c24; }
.sanction-item h4 {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px 0;
}
.sanction-item p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* CTA section */
.final-cta {
    background: #ffffff;
    padding: 48px 20px;
    margin: 48px 0 0 0;
}
.cta-box {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, #7c5ccc 0%, #5e45b3 100%);
    border: none;
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(124, 92, 204, 0.2);
}
.cta-box.cta-pe {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    box-shadow: 0 8px 24px rgba(26, 54, 93, 0.2);
}
.final-cta h2 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 12px 0;
}
.final-cta .cta-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin-bottom: 32px;
}
.cta-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
}
.cta-features .feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
}
.cta-features .feature i {
    color: #ffd700;
}
.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}
.btn-xl {
    padding: 16px 36px;
    font-size: 1.1rem;
}
.btn-primary {
    background: #ffd700;
    color: #1f2937;
}
.btn-primary:hover {
    background: #e6c200;
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline:hover {
    background: white;
    color: #1f2937;
}

/* Legal sources footer */
.legal-sources {
    margin-top: 48px;
    padding: 0 20px 40px;
}
.sources-box {
    max-width: 900px;
    margin: 0 auto;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
}
.sources-box h3 {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 12px 0;
}
.sources-box h3 i {
    color: #dc3545;
    margin-right: 8px;
}
.sources-box p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #495057;
    margin: 0;
}
.sources-box p strong {
    color: #2c3e50;
}

/* Related articles */
.related-articles {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #e9ecef;
}
.related-articles h3 {
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 20px 0;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}
.related-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
}
.related-card:hover {
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.related-card h4 {
    color: #2c3e50;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}
.related-card p {
    color: #6c757d;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}
.related-card .read-link {
    color: #dc3545;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 8px;
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .article-hero .page-title { font-size: 1.6rem; }
    .quick-nav-list { grid-template-columns: 1fr; }
    .entity-grid { grid-template-columns: 1fr; }
    .licence-grid { grid-template-columns: 1fr; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .cta-features { flex-direction: column; align-items: center; }
    .final-cta h2 { font-size: 1.5rem; }
    .comparison-table { font-size: 0.85rem; }
    .comparison-table th, .comparison-table td { padding: 8px 10px; }
}
@media (max-width: 480px) {
    .article-hero { padding: 40px 16px; }
    .article-content-wrapper { padding: 24px 16px 40px; }
    .section-header h2 { font-size: 1.25rem; }
    .sanction-item { flex-direction: column; }
}

/* ==========================================================================
   RELATED ARTICLES - Internal Linking Section
   ========================================================================== */

.related-articles {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 24px 2rem;
}

.related-articles h3 {
    font-family: 'Playfair Display', serif;
    color: #102a43;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-articles h3 i {
    color: #d4a012;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.related-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    border-left: 3px solid #102a43;
}

.related-card:hover {
    background: #fff;
    border-color: #d4a012;
    border-left-color: #d4a012;
    box-shadow: 0 4px 16px rgba(16, 42, 67, 0.1);
    transform: translateY(-2px);
}

.related-icon {
    font-size: 1.5rem;
    color: #102a43;
    margin-bottom: 0.5rem;
}

.related-card:hover .related-icon {
    color: #d4a012;
}

.related-title {
    font-weight: 700;
    color: #102a43;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    font-family: 'Inter', sans-serif;
}

.related-desc {
    font-size: 0.85rem;
    color: #486581;
    line-height: 1.45;
}

@media (max-width: 600px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}
