/**
 * Guide Technique CSS - Copy Media
 * Design PDF-like moderne avec touches subtiles de la marque
 * Sobre, élégant, moderne, propre
 * Updated: 2025-01-29
 */

/* ===================================
   VARIABLES CSS COPY MEDIA
=================================== */
:root {
    /* Couleurs Copy Media */
    --cm-primary: #a1175b;
    --cm-secondary: #2c3e50;
    --cm-accent: #3498db;
    --cm-neon-subtle: rgba(161, 23, 91, 0.1);
    --cm-neon-glow: rgba(161, 23, 91, 0.3);
    
    /* Couleurs guide technique */
    --guide-white: #ffffff;
    --guide-paper: #fafafa;
    --guide-light-gray: #f8f9fa;
    --guide-gray: #6c757d;
    --guide-dark-gray: #343a40;
    --guide-border: #e9ecef;
    --guide-shadow: rgba(0, 0, 0, 0.1);
    --guide-shadow-strong: rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --guide-font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --guide-font-mono: 'Courier New', monospace;
    
    /* Spacing */
    --guide-spacing-xs: 0.25rem;
    --guide-spacing-sm: 0.5rem;
    --guide-spacing-md: 1rem;
    --guide-spacing-lg: 1.5rem;
    --guide-spacing-xl: 2rem;
    --guide-spacing-xxl: 3rem;
}

/* ===================================
   PAGE GUIDE TECHNIQUE - LAYOUT PDF
=================================== */
.guide-technique-page {
    font-family: var(--guide-font-primary);
    background: 
        linear-gradient(135deg, var(--guide-paper) 0%, var(--guide-white) 100%),
        radial-gradient(circle at 10% 20%, rgba(161, 13, 89, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 179, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(248, 249, 250, 0.8) 0%, transparent 50%);
    min-height: 100vh;
    position: relative;
}

/* Note: Breadcrumbs supprimés car navbar existe déjà via get_header() */

/* ===================================
   HERO SECTION - ASPECT PDF MODERNE
=================================== */
.guide-hero {
    background: linear-gradient(135deg, var(--guide-white) 0%, var(--guide-light-gray) 100%);
    padding: var(--guide-spacing-xxl) 0;
    border-bottom: 3px solid var(--cm-primary);
    position: relative;
    overflow: hidden;
}

.guide-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, var(--cm-neon-subtle) 0%, transparent 50%);
    pointer-events: none;
}

.guide-header {
    text-align: center;
    position: relative;
    z-index: 2;
}

/* ===================================
   SEO INTERNAL LINKING
=================================== */
.guide-cta-links {
    margin-top: var(--guide-spacing-lg);
    text-align: center;
}

.guide-intro-text {
    font-size: 1.1rem;
    color: var(--guide-dark-gray);
    margin: 0;
}

.internal-link {
    color: var(--cm-primary);
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.3s ease;
}

.internal-link:hover {
    color: var(--cm-secondary);
    text-decoration: none;
    background: linear-gradient(135deg, var(--cm-neon-subtle) 0%, transparent 100%);
    padding: 2px 6px;
    border-radius: 4px;
}

.guide-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--cm-secondary);
    margin-bottom: var(--guide-spacing-md);
    text-shadow: 2px 2px 4px var(--guide-shadow);
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.guide-subtitle {
    font-size: 1.25rem;
    color: var(--guide-gray);
    margin-bottom: var(--guide-spacing-lg);
    font-style: italic;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.guide-meta {
    display: flex;
    justify-content: center;
    gap: var(--guide-spacing-lg);
    margin-top: var(--guide-spacing-xl);
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--guide-spacing-sm);
    color: var(--guide-gray);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.8);
    padding: var(--guide-spacing-sm) var(--guide-spacing-md);
    border-radius: 8px;
    border: 1px solid rgba(161, 13, 89, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.meta-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(161, 13, 89, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(161, 13, 89, 0.1);
}

.meta-icon {
    color: var(--cm-primary);
    font-size: 1.1rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(161, 13, 89, 0.1), rgba(255, 107, 179, 0.1));
    border-radius: 6px;
    padding: 4px;
}

/* ===================================
   LAYOUT PDF - SIDEBAR + CONTENU
=================================== */
.guide-content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--guide-white);
    box-shadow: 0 0 30px var(--guide-shadow);
    min-height: calc(100vh - 200px);
}

/* ===================================
   NAVIGATION SIDEBAR - SOMMAIRE PDF
=================================== */
.guide-sidebar {
    background: linear-gradient(180deg, var(--guide-light-gray) 0%, var(--guide-white) 100%);
    border-right: 2px solid var(--guide-border);
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--cm-primary) var(--guide-light-gray);
    /* Isoler le scroll context pour éviter les conflits */
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.guide-sidebar::-webkit-scrollbar {
    width: 6px;
}

.guide-sidebar::-webkit-scrollbar-track {
    background: var(--guide-light-gray);
}

.guide-sidebar::-webkit-scrollbar-thumb {
    background: var(--cm-primary);
    border-radius: 3px;
}

.guide-toc {
    padding: var(--guide-spacing-lg);
}

.guide-toc h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cm-secondary);
    margin-bottom: var(--guide-spacing-md);
    padding-bottom: var(--guide-spacing-sm);
    border-bottom: 2px solid var(--cm-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: var(--guide-spacing-xs);
}

.toc-link {
    display: block;
    padding: var(--guide-spacing-sm);
    color: var(--guide-gray);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    border-left: 3px solid transparent;
    outline: none;
}

.toc-link:hover {
    background: var(--cm-neon-subtle);
    color: var(--cm-primary);
    border-left-color: var(--cm-primary);
    transform: translateX(5px);
    box-shadow: 0 2px 8px var(--guide-shadow);
}

.toc-link:focus {
    background: var(--cm-neon-subtle);
    color: var(--cm-primary);
    border-left-color: var(--cm-primary);
    outline: 2px solid var(--cm-primary);
    outline-offset: 2px;
}

.toc-link.active {
    background: var(--cm-primary);
    color: var(--guide-white);
    font-weight: 600;
    border-left-color: var(--cm-secondary);
    box-shadow: 0 4px 12px var(--cm-neon-glow);
}

.toc-link.active:focus {
    outline: 2px solid var(--cm-secondary);
    outline-offset: 2px;
}

.toc-link.active::before {
    content: '▸';
    position: absolute;
    left: -15px;
    color: var(--guide-white);
    font-weight: bold;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Numérotation des sections */
.toc-link::after {
    content: attr(data-section);
    position: absolute;
    right: var(--guide-spacing-sm);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ===================================
   CONTENU PRINCIPAL - STYLE PDF
=================================== */
.guide-main-content {
    padding: var(--guide-spacing-xxl);
    background: var(--guide-white);
    line-height: 1.7;
    position: relative;
}

/* Sections du guide */
.guide-section {
    margin-bottom: var(--guide-spacing-xxl);
    padding-bottom: var(--guide-spacing-xl);
    border-bottom: 1px solid var(--guide-border);
    position: relative;
    scroll-margin-top: 100px;
    color: var(--guide-dark-gray);
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Délais progressifs pour les sections */
.guide-section:nth-child(1) { animation-delay: 0.8s; }
.guide-section:nth-child(2) { animation-delay: 1.0s; }
.guide-section:nth-child(3) { animation-delay: 1.2s; }
.guide-section:nth-child(4) { animation-delay: 1.4s; }
.guide-section:nth-child(5) { animation-delay: 1.6s; }
.guide-section:nth-child(6) { animation-delay: 1.8s; }

.guide-section:last-child {
    border-bottom: none;
}

/* S'assurer que tous les textes sont lisibles */
.guide-section h3,
.guide-section h4,
.guide-section h5,
.guide-section h6 {
    color: var(--cm-secondary);
}

.guide-section p,
.guide-section li {
    color: var(--guide-dark-gray);
}

/* Headers style PDF */
.section-header {
    margin-bottom: var(--guide-spacing-xl);
    position: relative;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--cm-secondary);
    margin-bottom: var(--guide-spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--guide-spacing-md);
}

.section-number {
    background: var(--cm-primary);
    color: var(--guide-white);
    padding: var(--guide-spacing-sm) var(--guide-spacing-md);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--cm-neon-glow);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--guide-gray);
    font-style: italic;
    margin-top: var(--guide-spacing-sm);
}

/* Paragraphes style PDF */
.guide-section p {
    margin-bottom: var(--guide-spacing-md);
    text-align: justify;
    color: var(--guide-dark-gray);
    font-size: 1rem;
    line-height: 1.7;
}

.guide-section p:first-of-type {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--cm-secondary);
}

/* Listes style PDF */
.guide-section ul,
.guide-section ol {
    margin: var(--guide-spacing-lg) 0;
    padding-left: var(--guide-spacing-xl);
}

.guide-section li {
    margin-bottom: var(--guide-spacing-sm);
    line-height: 1.6;
}

/* ===================================
   IMAGES ET FIGURES - STYLE PDF
=================================== */
.guide-figure {
    margin: var(--guide-spacing-xl) 0;
    text-align: center;
    position: relative;
}

.guide-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--guide-shadow-strong);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--guide-white);
    padding: var(--guide-spacing-sm);
    border: 1px solid var(--guide-border);
}

.guide-figure img:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 12px 40px rgba(161, 13, 89, 0.15);
    border-color: rgba(161, 13, 89, 0.3);
}

.figure-caption {
    margin-top: var(--guide-spacing-md);
    font-style: italic;
    color: var(--guide-gray);
    font-size: 0.9rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Images en grille */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--guide-spacing-lg);
    margin: var(--guide-spacing-xl) 0;
}

/* ===================================
   TABLEAUX STYLE PDF
=================================== */
.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--guide-spacing-xl) 0;
    background: var(--guide-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--guide-shadow);
}

.guide-table th {
    background: var(--cm-primary);
    color: var(--guide-white);
    padding: var(--guide-spacing-md);
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.guide-table td {
    padding: var(--guide-spacing-md);
    border-bottom: 1px solid var(--guide-border);
    color: var(--guide-dark-gray);
}

.guide-table tr:hover {
    background: var(--cm-neon-subtle);
}

/* ===================================
   ENCADRÉS ET CONSEILS
=================================== */
.guide-tip,
.guide-warning,
.guide-info {
    padding: var(--guide-spacing-lg);
    border-radius: 8px;
    margin: var(--guide-spacing-xl) 0;
    border-left: 4px solid;
    position: relative;
    background: var(--guide-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: var(--guide-dark-gray);
}

.guide-tip {
    border-left-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.03) 0%, var(--guide-white) 100%);
}

.guide-warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.03) 0%, var(--guide-white) 100%);
}

.guide-info {
    border-left-color: var(--cm-primary);
    background: linear-gradient(135deg, var(--cm-neon-subtle) 0%, var(--guide-white) 100%);
}

.guide-tip::before {
    content: '⚡';
    position: absolute;
    top: var(--guide-spacing-lg);
    left: -12px;
    background: #28a745;
    color: white;
    padding: 6px;
    border-radius: 50%;
    font-size: 0.8rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-warning::before {
    content: '⚠';
    position: absolute;
    top: var(--guide-spacing-lg);
    left: -12px;
    background: #ffc107;
    color: #000;
    padding: 6px;
    border-radius: 50%;
    font-size: 0.8rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-info::before {
    content: '◐';
    position: absolute;
    top: var(--guide-spacing-lg);
    left: -12px;
    background: var(--cm-primary);
    color: white;
    padding: 6px;
    border-radius: 50%;
    font-size: 0.8rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Texte dans les encadrés */
.guide-tip h3,
.guide-warning h3,
.guide-info h3 {
    color: var(--guide-dark-gray);
    margin-bottom: var(--guide-spacing-sm);
}

.guide-tip p,
.guide-warning p,
.guide-info p,
.guide-tip li,
.guide-warning li,
.guide-info li {
    color: var(--guide-dark-gray);
}

/* ===================================
   CTA ET NAVIGATION
=================================== */
.guide-cta {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(248, 249, 250, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(161, 13, 89, 0.1);
    border-radius: 16px;
    padding: var(--guide-spacing-xxl);
    margin: var(--guide-spacing-xxl) 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(161, 13, 89, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(161, 13, 89, 0.15);
    border-color: rgba(161, 13, 89, 0.2);
}

.guide-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 85% 20%, rgba(161, 13, 89, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 15% 80%, rgba(255, 107, 179, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.cta-content h2 {
    color: var(--cm-secondary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--guide-spacing-md);
    background: linear-gradient(135deg, var(--cm-primary), var(--cm-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-content p {
    color: var(--guide-gray);
    font-size: 1.1rem;
    margin-bottom: var(--guide-spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: var(--guide-spacing-lg);
    justify-content: center;
    margin-top: var(--guide-spacing-lg);
    flex-wrap: wrap;
}

/* Contact Info Styling */
.contact-info {
    background: linear-gradient(135deg, #f8f9fa 0%, var(--guide-white) 100%);
    border: 1px solid var(--guide-border);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.contact-section {
    margin-bottom: 2rem;
}

.contact-title {
    color: var(--cm-primary);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phone-numbers {
    display: grid;
    gap: 1rem;
}

.phone-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(161, 23, 91, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--cm-primary);
}

.phone-label {
    font-weight: 600;
    color: var(--cm-primary);
    min-width: 90px;
}

.phone-number {
    font-family: var(--guide-font-mono);
    color: var(--guide-dark-gray);
    font-weight: 500;
}

.social-section {
    padding-top: 2rem;
    border-top: 1px solid var(--guide-border);
}

.social-title {
    color: var(--cm-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--guide-white);
    border: 1px solid var(--guide-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--guide-dark-gray);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    background: var(--cm-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(161, 23, 91, 0.2);
}

.social-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.social-name {
    font-weight: 500;
}

/* Buttons - Modern and Elegant - Style unique */
.btn {
    padding: var(--guide-spacing-md) var(--guide-spacing-xl);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: var(--guide-spacing-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: var(--guide-white);
    color: var(--cm-primary);
    border: 2px solid var(--cm-primary);
    box-shadow: 0 2px 12px rgba(161, 23, 91, 0.1);
}

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

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

.btn:hover {
    background: var(--cm-primary);
    color: var(--guide-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(161, 23, 91, 0.25);
    border-color: var(--cm-primary);
}

/* ===================================
   RESPONSIVE DESIGN
=================================== */
@media (max-width: 1024px) {
    .guide-content-wrapper {
        grid-template-columns: 250px 1fr;
    }
    
    .guide-main-content {
        padding: var(--guide-spacing-xl);
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .guide-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .guide-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 2px solid var(--guide-border);
    }
    
    .guide-main-content {
        padding: var(--guide-spacing-lg);
    }
    
    .guide-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-number {
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .guide-meta {
        flex-direction: column;
        align-items: center;
        gap: var(--guide-spacing-sm);
    }
}

@media (max-width: 480px) {
    .guide-hero {
        padding: var(--guide-spacing-xl) 0;
    }
    
    .guide-title {
        font-size: 2rem;
    }
    
    .guide-main-content {
        padding: var(--guide-spacing-md);
    }
    
    .section-title {
        font-size: 1.3rem;
        flex-direction: column;
        text-align: center;
        gap: var(--guide-spacing-sm);
    }
}

/* ===================================
   ANIMATIONS SUBTILES
=================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.guide-section {
    animation: fadeInUp 0.6s ease-out;
}

.guide-sidebar {
    animation: slideInLeft 0.6s ease-out;
}

/* Animation au scroll */
.guide-section.in-view {
    animation: fadeInUp 0.6s ease-out;
}

/* ===================================
   PRINT STYLES
=================================== */
@media print {
    .guide-sidebar,
    .breadcrumb-navigation,
    .guide-cta {
        display: none;
    }
    
    .guide-content-wrapper {
        grid-template-columns: 1fr;
        box-shadow: none;
    }
    
    .guide-main-content {
        padding: 0;
    }
    
    .guide-section {
        break-inside: avoid;
    }
}