/**
 * CSS pour les templates de services et pages structurées
 * Extraits depuis header.php pour une meilleure organisation
 */

/* Variables CSS */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --radius: 0.5rem;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --max-width: 1200px;
}

/* Hero Section pour templates Plan */
.plan-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 4rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.plan-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 150%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.plan-hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.plan-hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: white;
}

.plan-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Quick Answers Grid */
.plan-answer-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 2rem;
}

.plan-answer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.plan-answer-item {
    text-align: center;
}

.plan-answer-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Smart Navigation */
.plan-smart-navigation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.plan-nav-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.plan-nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.plan-nav-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.plan-nav-card:hover::before {
    transform: translateX(0);
}

.plan-nav-card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.plan-nav-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Content Sections */
.plan-content-section {
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.plan-content-section:hover {
    box-shadow: var(--shadow-lg);
}

.plan-content-section h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.plan-content-section h3 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

/* Info Boxes */
.plan-info-box {
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.plan-info-box.primary {
    background: linear-gradient(to right, #eff6ff, #ffffff);
    border-left-color: var(--primary);
}

.plan-info-box.success {
    background: linear-gradient(to right, #f0fdf4, #ffffff);
    border-left-color: var(--success);
}

.plan-info-box.warning {
    background: linear-gradient(to right, #fffbeb, #ffffff);
    border-left-color: var(--warning);
}

.plan-info-box-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* CTA Section */
.plan-cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 3rem;
    border-radius: var(--radius);
    text-align: center;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}

.plan-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.plan-cta-content {
    position: relative;
    z-index: 1;
}

.plan-cta-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.plan-cta-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.plan-cta-button {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.plan-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Content Wrapper avec Sidebar */
.plan-content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 1rem;
}

/* TOC Sidebar */
.plan-toc-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.plan-toc-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.plan-toc-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.plan-toc-item {
    margin-bottom: 0.25rem;
}

.plan-toc-link {
    display: block;
    padding: 0.625rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.plan-toc-link:hover {
    background: var(--bg-light);
    color: var(--primary);
    transform: translateX(4px);
}

.plan-toc-link.active {
    background: linear-gradient(to right, #eff6ff, #dbeafe);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

/* Main Content Area */
.plan-main-content {
    min-width: 0;
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.plan-type-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.plan-type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.plan-type-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.plan-type-content {
    padding: 1.5rem;
}

.plan-type-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.plan-type-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.plan-type-features {
    list-style: none;
    padding: 0;
}

.plan-type-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.plan-type-features li:last-child {
    border-bottom: none;
}

.plan-type-link {
    display: inline-block;
    margin-top: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.plan-type-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Progress Bar */
.plan-progress-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.plan-progress-wrapper.scrolled {
    box-shadow: var(--shadow);
}

.plan-progress-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.plan-progress-bar-wrapper {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.plan-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.plan-progress-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Back to Top Button */
.plan-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    border: none;
    font-size: 1.2rem;
}

.plan-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.plan-back-to-top:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* Container Section */
.container-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .plan-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .plan-toc-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .plan-answer-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-smart-navigation {
        grid-template-columns: 1fr;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-content-section {
        padding: 1.5rem;
    }
    
    .plan-hero-title {
        font-size: 1.75rem;
    }
    
    .plan-progress-info {
        display: none;
    }
}