/**
 * Styles pour le template Guide Numerique
 */

/* Container */
.skifo-guide-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Header */
.guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid #E5E7EB;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    color: #667085;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.back-link:hover {
    background: #F3F4F6;
    color: #323334;
    border-color: #D1D5DB;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.guide-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-item svg {
    color: #98A2B3;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #323334;
}

.stat-label {
    font-size: 12px;
    color: #98A2B3;
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    background: #FA5C15;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-edit:hover {
    background: #E65312;
    transform: translateY(-1px);
}

/* Guide Content */
.guide-content {
    background: white;
    border-radius: 24px;
    border: 1px solid #eee4d8;
    overflow: hidden;
}

/* Hero Section */
.guide-hero {
    padding: 48px;
    background: linear-gradient(to bottom right, #FFFBF7, white);
    border-bottom: 1px solid #eee4d8;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #FA5C15, #FF8A50);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 100px;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 24px;
    }
}

.hero-subtitle {
    font-size: 16px;
    color: #667085;
    line-height: 1.6;
}

/* Sous-titre facultatif, distinct du texte d'introduction historique. */
.skifo-guide-container .guide-hero-subtitle {
    margin: 0 0 20px;
    color: #344054;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.skifo-guide-container .guide-hero-subtitle p,
.skifo-guide-container .guide-errors-intro p,
.skifo-guide-container .guide-pillars-intro p,
.skifo-guide-container .guide-plan-intro p {
    margin: 0 0 12px;
}

.skifo-guide-container .guide-hero-subtitle p:last-child,
.skifo-guide-container .guide-errors-intro p:last-child,
.skifo-guide-container .guide-pillars-intro p:last-child,
.skifo-guide-container .guide-plan-intro p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .skifo-guide-container .guide-hero-subtitle {
        font-size: 17px;
    }
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: cover;
}

/* Image Placeholder */
.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 200px;
    background: #F9FAFB;
    border: 2px dashed #E5E7EB;
    border-radius: 16px;
    color: #98A2B3;
    cursor: pointer;
    transition: all 0.2s;
}

.image-placeholder:hover {
    background: #F3F4F6;
    border-color: #FA5C15;
    color: #FA5C15;
}

.image-placeholder svg {
    opacity: 0.5;
}

.image-placeholder span {
    font-size: 13px;
    font-weight: 500;
}

/* Section Styles */
.guide-section {
    padding: 48px;
}

@media (max-width: 768px) {
    .guide-section {
        padding: 32px 24px;
    }
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    text-align: center;
    margin-bottom: 32px;
}

.section-subtitle {
    font-size: 16px;
    color: #667085;
    text-align: center;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Section Pourquoi */
.section-pourquoi {
    background: #FAFBFC;
    border-bottom: 1px solid #eee4d8;
}

/* +1 px sur tous les textes de la section « Pourquoi ce guide ? » */
.section-pourquoi .section-title {
    font-size: 25px;
}

.pourquoi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .pourquoi-grid {
        grid-template-columns: 1fr;
    }
}

.pourquoi-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    padding: 24px;
    transition: box-shadow 0.2s;
}

.pourquoi-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-number {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.card-number.blue {
    background: #DBEAFE;
    color: #2563EB;
}

.card-number.green {
    background: #DCFCE7;
    color: #16A34A;
}

.card-number.purple {
    background: #F3E8FF;
    color: #9333EA;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #323334;
}

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

.card-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 16px;
    color: #667085;
    margin-bottom: 10px;
    line-height: 1.5;
}

.card-list li svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.card-list li:last-child {
    margin-bottom: 0;
}

/* Section Erreurs */
.section-erreurs {
    background: #FEF8F6;
    border-bottom: 1px solid #eee4d8;
}

.skifo-guide-container .guide-errors-intro,
.skifo-guide-container .guide-pillars-intro,
.skifo-guide-container .guide-plan-intro {
    max-width: 880px;
    margin: 0 auto 28px;
    color: #667085;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.erreurs-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.erreur-card {
    display: block;
    min-width: 0;
    background: white;
    border-radius: 20px;
    border: 1px solid #F5E6E1;
    overflow: hidden;
}

/* Image pleine largeur. La hauteur appartient au visuel, pas au bloc qui
   contient aussi le bouton d'import et les messages de l'éditeur. */
.skifo-guide-container .erreur-image {
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0;
}

.skifo-guide-container .erreur-image .skifo-funnel-visual-wrap,
.skifo-guide-container .erreur-image .skifo-funnel-visual {
    width: 100%;
    max-width: none;
    margin: 0;
}

.skifo-guide-container .erreur-image .skifo-funnel-visual {
    height: clamp(240px, 32vw, 360px);
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.skifo-guide-container .erreur-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    object-fit: cover;
    object-position: center;
}

.skifo-guide-container .erreur-image .image-placeholder,
.skifo-guide-container .erreur-image .skifo-funnel-visual--placeholder {
    box-sizing: border-box;
    height: clamp(240px, 32vw, 360px);
    min-height: 0;
    border-radius: 0;
    border: 1px dashed #D0D5DD;
}

.skifo-guide-container .erreur-image .skifo-funnel-visual-actions {
    margin: 0;
    padding: 16px 32px 0;
}

.skifo-guide-container .erreur-image .skifo-funnel-visual-status {
    margin: 8px 32px 0;
    overflow-wrap: anywhere;
}

.erreur-content {
    padding: 28px 32px 32px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.erreur-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    color: #B34414;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.erreur-content > h3 {
    font-size: 25px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin: 0 0 18px;
}

.erreur-description {
    font-size: 16px;
    color: #667085;
    line-height: 1.7;
    margin: 0 0 24px;
}

.erreur-description p {
    margin: 0 0 16px;
}

.erreur-description p:last-child,
.erreur-points li p:last-child {
    margin-bottom: 0;
}

.erreur-points {
    background: #FFF5ED;
    border-radius: 0 12px 12px 0;
    padding: 20px 22px;
    border: 0;
    border-left: 3px solid #FA5C15;
}

.erreur-points .points-label {
    font-size: 16px;
    font-weight: 700;
    color: #B34414;
    line-height: 1.4;
    margin: 0 0 12px;
}

.erreur-points ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.erreur-points li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 16px;
    color: #344054;
    margin-bottom: 8px;
    line-height: 1.7;
}

.erreur-points li svg {
    flex-shrink: 0;
    margin-top: 4px;
    color: #FA5C15;
}

.erreur-points li:last-child {
    margin-bottom: 0;
}

/* Section Piliers */
.section-piliers {
    background: #F6FAF7;
    border-bottom: 1px solid #eee4d8;
}

.piliers-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.pilier-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #667085;
    cursor: pointer;
    transition: all 0.2s;
}

.pilier-tab:hover {
    border-color: #D1D5DB;
    color: #323334;
}

.pilier-tab.active {
    background: #FA5C15;
    border-color: #FA5C15;
    color: white;
}

.pilier-num {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.pilier-tab.active .pilier-num {
    background: rgba(255,255,255,0.2);
    color: white;
}

.pilier-panel {
    display: none;
}

.pilier-panel.active {
    display: block;
}

/* Affichage continu : les trois piliers restent visibles sans onglets. */
.piliers-content--stacked {
    display: grid;
    gap: 32px;
}

.pilier-panel--stacked {
    display: block;
}

.pilier-grid {
    display: block;
    overflow: hidden;
    background: white;
    border-radius: 20px;
    border: 1px solid #E5E7EB;
}

.pilier-image {
    width: 100%;
    background: #F3F4F6;
}

.pilier-image .skifo-funnel-image,
.pilier-image .skifo-funnel-visual,
.pilier-image .guide-pillar-visual,
.pilier-image picture,
.pilier-image a {
    display: block;
    width: 100%;
}

.pilier-image img {
    display: block;
    width: 100%;
    height: clamp(210px, 24vw, 290px);
    max-height: 290px;
    object-fit: cover;
    border-radius: 0;
}

.pilier-image .image-placeholder,
.pilier-image .skifo-funnel-visual--placeholder {
    min-height: 210px;
    height: clamp(210px, 24vw, 290px);
    max-height: 290px;
    aspect-ratio: auto;
    border-radius: 0;
}

.pilier-body {
    padding: 28px 32px 34px;
}

.pilier-text {
    min-width: 0;
}

.pilier-text h3 {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 12px;
}

.pilier-description {
    font-size: 16px;
    font-weight: 500;
    color: #323334;
    margin-bottom: 16px;
    line-height: 1.6;
}

.pilier-explication {
    font-size: 16px;
    color: #667085;
    line-height: 1.75;
    margin-bottom: 0;
}

.pilier-details {
    list-style: none;
    padding: 22px 0 0;
    margin: 24px 0 0;
    border-top: 1px solid #E5E7EB;
    width: 100%;
}

.pilier-details li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    font-size: 16px;
    color: #475467;
    margin-bottom: 18px;
    line-height: 1.55;
}

.pilier-details li svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: #10B981;
}

.pilier-details li:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .piliers-content--stacked {
        gap: 22px;
    }

    .pilier-image img,
    .pilier-image .image-placeholder,
    .pilier-image .skifo-funnel-visual--placeholder {
        height: 210px;
        min-height: 210px;
    }

    .pilier-body {
        padding: 24px 22px 28px;
    }

    .pilier-text h3 {
        font-size: 21px;
    }
}

/* Section Plan */
.section-plan {
    background: white;
    border-bottom: 1px solid #eee4d8;
}

.plan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.plan-card {
    background: #FAFBFC;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    padding: 24px;
    transition: all 0.2s;
}

.plan-card:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #FA5C15;
}

.plan-day {
    display: inline-flex;
    padding: 6px 12px;
    background: linear-gradient(135deg, #FA5C15, #FF8A50);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    margin-bottom: 12px;
}

.plan-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #323334;
    margin-bottom: 8px;
}

.plan-card p {
    font-size: 16px;
    color: #667085;
    line-height: 1.6;
}

/* CTA Final */
.guide-cta {
    padding: 48px;
    background: linear-gradient(135deg, #1F2937, #374151);
}

.cta-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.guide-cta-title {
    font-size: 20px;
    line-height: 1.35;
    font-weight: 800;
    color: white;
    margin: 0 0 12px;
}

.cta-content p,
.guide-cta-description {
    font-size: 16px;
    line-height: 1.6;
    color: #D1D5DB;
    margin: 0 0 24px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: #FA5C15;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #E65312;
    transform: translateY(-2px);
}

/* CTA suite du parcours : lisibilité sur fond sombre */
.guide-cta--more .cta-content h2 {
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.guide-cta--more .guide-cta-title {
    font-size: 22px;
    line-height: 1.3;
    font-weight: 850;
    color: #FFFFFF;
}

.guide-cta--more .guide-cta-description {
    color: #F3F4F6;
}

.guide-cta--more .btn-primary,
.guide-cta--more .btn-primary:visited {
    color: #FFFFFF !important;
}

.guide-cta--more .btn-primary:hover,
.guide-cta--more .btn-primary:focus {
    color: #FFFFFF !important;
    background: #E65312;
    text-decoration: none;
}

.guide-cta--more .btn-primary svg,
.guide-cta--more .btn-primary:hover svg,
.guide-cta--more .btn-primary:focus svg {
    color: #FFFFFF !important;
    stroke: currentColor;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* Responsive */
@media (max-width: 640px) {
    .guide-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .guide-stats {
        width: 100%;
        justify-content: center;
    }
    
    .btn-edit {
        width: 100%;
        justify-content: center;
    }
    
    .guide-hero {
        padding: 32px 24px;
    }
    
    .guide-cta--more .cta-content h2 {
        font-size: 16px;
    }

    .guide-cta--more .guide-cta-title {
        font-size: 20px;
    }

    .cta-buttons {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}


/* Corrections rendu HTML généré */
.card-list li > div,
.erreur-points li > div,
.pilier-details li > div {
    flex: 1;
    min-width: 0;
}

.card-list li h3,
.erreur-points li h3,
.pilier-details li h3,
.plan-action h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.card-list li p,
.erreur-points li p,
.pilier-details li p,
.plan-action p,
.plan-objective p {
    margin: 0 0 10px;
}

.card-list li ul,
.erreur-points li ul,
.pilier-details li ul,
.plan-action ul,
.plan-objective ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.plan-action {
    font-size: 16px;
    color: #323334;
    line-height: 1.65;
}

.plan-objective {
    font-size: 16px;
    color: #667085;
    line-height: 1.6;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .skifo-guide-container .erreur-image .skifo-funnel-visual,
    .skifo-guide-container .erreur-image .image-placeholder {
        height: 240px;
    }

    .erreurs-list {
        gap: 24px;
    }

    .erreur-content {
        padding: 24px 20px;
    }

    .erreur-content > h3 {
        font-size: 22px;
    }

    .erreur-points {
        padding: 18px;
    }

    .skifo-guide-container .erreur-image .skifo-funnel-visual-actions {
        padding: 16px 20px 0;
    }

    .skifo-guide-container .erreur-image .skifo-funnel-visual-status {
        margin: 8px 20px 0;
    }
}

/* Paragraphes de la description finale, y compris le HTML synchronisé. */
.skifo-guide-container .guide-cta-description p {
    margin: 0 0 12px;
    color: inherit;
}
.skifo-guide-container .guide-cta-description p:last-child {
    margin-bottom: 0;
}
