/* ==========================================================================
   up2tech/page-generator — Rich content module styles.

   Host projects can override any of these CSS variables in their own
   stylesheet (set on :root or on .page-generator-content) to rebrand.

   Variable hierarchy per token:
     var(--pg-primary, var(--eth-primary, <default>))
   → first the generic --pg-* var (what new projects should set),
   → then a legacy --eth-* var (kept for the ETH boilerplate),
   → then the hardcoded default.
   ========================================================================== */

:root {
    /* Shape & shadow */
    --pg-radius: 12px;
    --pg-radius-sm: 8px;
    --pg-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
    --pg-shadow-strong: 0 10px 30px rgba(15, 23, 42, 0.12);
}

/* Resolve themed tokens once — host projects set --pg-primary / --pg-accent
   on :root to rebrand without touching this file. */
.page-generator-content,
.blog-content {
    --pg-c-text:          var(--pg-text,          var(--eth-dark,              #121417));
    --pg-c-muted:         var(--pg-muted,         var(--eth-gray,              #6b7280));
    --pg-c-border:        var(--pg-border,        var(--eth-border,            #e5e7eb));
    --pg-c-bg-soft:       var(--pg-bg-soft,       var(--eth-bg-light,          #f8f9fa));

    --pg-c-primary:       var(--pg-primary,       var(--eth-primary,           #051627));
    --pg-c-primary-dark:  var(--pg-primary-dark,  var(--eth-primary-dark,      #030e1a));
    --pg-c-primary-light: var(--pg-primary-light, var(--eth-primary-light,     #2a4055));
    --pg-c-primary-soft:  var(--pg-primary-soft,  var(--eth-bg-lighter,        #f3f4f6));

    --pg-c-accent:        var(--pg-accent,        var(--eth-accent,            #f27b2d));
    --pg-c-accent-hover:  var(--pg-accent-hover,  var(--eth-accent-hover,      #d96a22));
    --pg-c-accent-light:  var(--pg-accent-light,  var(--eth-accent-light,      #fff5ed));

    --pg-c-success:       var(--pg-success,       #16a34a);
    --pg-c-success-light: var(--pg-success-light, #f0fdf4);
    --pg-c-warning:       var(--pg-warning,       var(--eth-accent,            #f27b2d));
    --pg-c-warning-light: var(--pg-warning-light, var(--eth-accent-light,      #fff5ed));
    --pg-c-info:          var(--pg-info,          var(--eth-primary-light,     #2a4055));
    --pg-c-info-light:    var(--pg-info-light,    #eff3f8);
    --pg-c-fun:           var(--pg-fun,           #7c3aed);
    --pg-c-fun-light:     var(--pg-fun-light,     #f5f3ff);

    color: var(--pg-c-text);
    font-size: 1.05rem;
    line-height: 1.75;
}

/* ==========================================================================
   Base typography inside the content wrapper
   ========================================================================== */
.page-generator-content p,
.blog-content p {
    margin: 0 0 1.1em;
}

.page-generator-content h2,
.blog-content h2 {
    margin: 2.75rem 0 1.25rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--pg-c-primary);
    scroll-margin-top: 100px;
}

.page-generator-content h3,
.blog-content h3 {
    margin: 2rem 0 .75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pg-c-primary);
}

.page-generator-content h4,
.blog-content h4 {
    margin: 1.5rem 0 .5rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.page-generator-content a,
.blog-content a {
    color: var(--pg-c-primary);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color .15s ease;
}

.page-generator-content a:hover,
.blog-content a:hover {
    color: var(--pg-c-accent);
}

.page-generator-content ul,
.page-generator-content ol,
.blog-content ul,
.blog-content ol {
    margin: 1.2em 0;
    padding-left: 1.5em;
}

.page-generator-content li,
.blog-content li {
    margin-bottom: .4em;
}

/* ==========================================================================
   article-summary — TL;DR bullets (blog)
   ========================================================================== */
.article-summary {
    margin: 0 0 2.5rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, var(--pg-c-bg-soft) 0%, #fff 100%);
    border-left: 4px solid var(--pg-c-accent);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
    position: relative;
}

.article-summary::before {
    content: "À retenir";
    display: block;
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--pg-c-accent);
    margin-bottom: .75rem;
}

.article-summary ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-summary li {
    position: relative;
    padding-left: 1.6em;
    margin-bottom: .6em;
    line-height: 1.55;
}

.article-summary li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--pg-c-accent);
    font-weight: 900;
    font-size: 1.1em;
}

.article-summary li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   article-tip — "Notre conseil" inline callouts (blog)
   ========================================================================== */
.article-tip {
    margin: 1.75rem 0;
    padding: 1.1rem 1.4rem;
    background: var(--pg-c-accent-light);
    border-left: 4px solid var(--pg-c-accent);
    border-radius: var(--pg-radius-sm);
}

.article-tip p {
    margin: 0;
    color: var(--pg-c-text);
}

.article-tip strong {
    color: var(--pg-c-accent-hover);
    font-weight: 700;
}

/* ==========================================================================
   article-cta — inline conversion block (shared: blog + service)
   ========================================================================== */
.article-cta {
    margin: 2.5rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, var(--pg-c-primary) 0%, var(--pg-c-primary-dark) 100%);
    color: #fff;
    border-radius: var(--pg-radius);
    text-align: center;
    box-shadow: var(--pg-shadow-strong);
}

.article-cta p {
    margin: 0 0 1.25rem;
    font-size: 1.15rem;
    font-weight: 500;
    color: #fff;
}

/* Inline links inside the CTA paragraph — must stay readable on the navy
   gradient background. Override the default content-link color (which is
   --pg-c-primary = same navy as the CTA background). */
.article-cta a:not(.cta-button) {
    color: var(--pg-c-accent);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

.article-cta a:not(.cta-button):hover {
    color: #fff;
}

.article-cta .cta-button {
    display: inline-block;
    padding: .85rem 2rem;
    background: var(--pg-c-accent);
    color: #fff !important;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.article-cta .cta-button:hover {
    transform: translateY(-2px);
    background: var(--pg-c-accent-hover);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.3);
    color: #fff !important;
    text-decoration: none;
}

/* ==========================================================================
   blog-stats-grid + blog-stat — animated counters (blog)
   ========================================================================== */
.blog-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin: 2.25rem 0;
}

.blog-stat {
    padding: 1.75rem 1.25rem;
    background: #fff;
    border: 1px solid var(--pg-c-border);
    border-radius: var(--pg-radius);
    text-align: center;
    box-shadow: var(--pg-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}

.blog-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--pg-shadow-strong);
}

.blog-stat .stat-number {
    display: inline-block;
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    color: var(--pg-c-accent);
    letter-spacing: -0.02em;
}

.blog-stat .stat-suffix {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--pg-c-accent);
    margin-left: 2px;
}

.blog-stat .stat-label {
    margin: .5rem 0 0;
    font-size: .9rem;
    color: var(--pg-c-muted);
    line-height: 1.35;
}

/* ==========================================================================
   blog-highlight — typed callouts (blog)
   ========================================================================== */
.blog-highlight {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin: 1.75rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: var(--pg-radius);
    background: var(--pg-c-info-light);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--pg-c-info);
}

.blog-highlight[data-type="warning"] {
    background: var(--pg-c-warning-light);
    border-left-color: var(--pg-c-warning);
}

.blog-highlight[data-type="success"] {
    background: var(--pg-c-success-light);
    border-left-color: var(--pg-c-success);
}

.blog-highlight[data-type="fun"] {
    background: var(--pg-c-fun-light);
    border-left-color: var(--pg-c-fun);
}

.blog-highlight .highlight-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.blog-highlight .highlight-content { flex: 1 1 auto; }
.blog-highlight .highlight-content p { margin: 0; line-height: 1.6; }

/* ==========================================================================
   blog-keyfigure — big number (blog)
   ========================================================================== */
.blog-keyfigure {
    margin: 2rem 0;
    padding: 2rem 1.5rem;
    background: #fff;
    border: 2px dashed var(--pg-c-border);
    border-radius: var(--pg-radius);
    text-align: center;
}

.blog-keyfigure .keyfigure-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--pg-c-accent);
    letter-spacing: -0.02em;
    margin-bottom: .5rem;
}

.blog-keyfigure .keyfigure-label {
    display: block;
    font-size: 1rem;
    color: var(--pg-c-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.4;
}

/* ==========================================================================
   blog-comparison — two-column compare (shared: blog + service)
   ========================================================================== */
.blog-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.blog-comparison .comparison-col {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--pg-c-border);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
}

.blog-comparison .comparison-col h4 {
    margin: 0 0 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--pg-c-border);
    font-size: 1.1rem;
    color: var(--pg-c-text);
}

.blog-comparison .comparison-col ul { margin: 0; padding: 0; list-style: none; }

.blog-comparison .comparison-col li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: .55em;
    line-height: 1.5;
}

.blog-comparison .comparison-col li::before {
    content: "•";
    position: absolute;
    left: .35em;
    top: 0;
    color: var(--pg-c-muted);
    font-weight: 700;
}

.blog-comparison .comparison-highlight {
    background: linear-gradient(135deg, #fff 0%, var(--pg-c-accent-light) 100%);
    border: 2px solid var(--pg-c-accent);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    position: relative;
}

.blog-comparison .comparison-highlight::before {
    content: "Recommandé";
    position: absolute;
    top: -12px;
    right: 16px;
    padding: 4px 12px;
    background: var(--pg-c-accent);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-radius: 999px;
}

.blog-comparison .comparison-highlight h4 {
    color: var(--pg-c-accent-hover);
    border-bottom-color: var(--pg-c-border);
}

.blog-comparison .comparison-highlight li::before {
    content: "✓";
    color: var(--pg-c-accent);
}

/* ==========================================================================
   blog-steps — vertical timeline (blog)
   ========================================================================== */
.blog-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 2rem 0;
    padding-left: .5rem;
    border-left: 2px solid var(--pg-c-border);
}

.blog-steps .step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--pg-c-border);
    border-radius: var(--pg-radius-sm);
    box-shadow: var(--pg-shadow);
    margin-left: -17px;
}

.blog-steps .step-number {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pg-c-accent);
    color: #fff;
    font-weight: 800;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.blog-steps .step-content h4 { margin: 0 0 .25rem; font-size: 1.05rem; }
.blog-steps .step-content p { margin: 0; color: var(--pg-c-muted); }

/* ==========================================================================
   blog-accordion — native <details> FAQ (shared: blog + service)
   ========================================================================== */
.blog-accordion {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.blog-accordion details {
    background: #fff;
    border: 1px solid var(--pg-c-border);
    border-radius: var(--pg-radius-sm);
    overflow: hidden;
    transition: box-shadow .2s ease;
}

.blog-accordion details[open] { box-shadow: var(--pg-shadow); }

.blog-accordion summary {
    padding: 1rem 1.25rem;
    padding-right: 2.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--pg-c-primary);
    list-style: none;
    position: relative;
    transition: background .15s ease;
}

.blog-accordion summary::-webkit-details-marker { display: none; }
.blog-accordion summary:hover { background: var(--pg-c-bg-soft); }

.blog-accordion summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 1.25rem;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pg-c-accent-light);
    color: var(--pg-c-accent);
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 50%;
    transition: transform .2s ease;
}

.blog-accordion details[open] summary::after {
    content: "−";
    transform: translateY(-50%) rotate(180deg);
}

.blog-accordion .accordion-content {
    padding: 0 1.25rem 1.1rem;
    color: var(--pg-c-text);
    line-height: 1.7;
}

.blog-accordion .accordion-content p:last-child { margin-bottom: 0; }

/* ==========================================================================
   SERVICE PAGE MODULES — conversion-oriented
   ========================================================================== */

/* service-pillars — value props grid (3-4 cards) */
.service-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0 2.5rem;
}

@media (max-width: 640px) {
    .service-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.service-pillar {
    padding: 1.5rem 1.25rem;
    background: #fff;
    border: 1px solid var(--pg-c-border);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}

.service-pillar:hover {
    transform: translateY(-4px);
    box-shadow: var(--pg-shadow-strong);
}

.service-pillar .pillar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
    background: var(--pg-c-accent-light);
    color: var(--pg-c-accent);
    font-size: 1.6rem;
    line-height: 1;
    border-radius: 50%;
}

.service-pillar .pillar-icon i { line-height: 1; }

.service-pillar h3,
.service-pillar h4 {
    margin: 0 0 .5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pg-c-primary);
}

.service-pillar p {
    margin: 0;
    font-size: .9rem;
    color: var(--pg-c-muted);
    line-height: 1.55;
}

/* service-process — horizontal timeline (EXACTLY 4 steps on desktop) */
.service-process {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 2.5rem 0;
    padding: 2rem 0;
    position: relative;
}

@media (max-width: 768px) {
    .service-process {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 420px) {
    .service-process { grid-template-columns: 1fr; }
}

.service-process .process-step {
    position: relative;
    text-align: center;
    padding: 0 .25rem;
}

.service-process .process-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 24px;
    left: calc(50% + 32px);
    right: calc(-50% + 32px);
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        var(--pg-c-border) 0 6px,
        transparent 6px 12px
    );
    z-index: 0;
}

@media (max-width: 768px) {
    .service-process .process-step:not(:last-child)::after { display: none; }
}

.service-process .process-number {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: var(--pg-c-primary);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
}

.service-process .process-step h4 {
    margin: 0 0 .35rem;
    font-size: .95rem;
    font-weight: 700;
    color: var(--pg-c-primary);
    line-height: 1.3;
}

.service-process .process-step p {
    margin: 0;
    font-size: .82rem;
    color: var(--pg-c-muted);
    line-height: 1.45;
}

/* service-pricing — indicative pricing table */
.service-pricing {
    margin: 2rem 0;
    background: #fff;
    border: 1px solid var(--pg-c-border);
    border-radius: var(--pg-radius);
    overflow: hidden;
    box-shadow: var(--pg-shadow);
}

.service-pricing table { width: 100%; border-collapse: collapse; margin: 0; }

.service-pricing thead th {
    padding: 1rem 1.25rem;
    background: var(--pg-c-primary);
    color: #fff;
    text-align: left;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .02em;
}

.service-pricing thead th:last-child { text-align: right; }

.service-pricing tbody td {
    padding: .95rem 1.25rem;
    border-top: 1px solid var(--pg-c-border);
    font-size: .95rem;
}

.service-pricing tbody tr:nth-child(even) { background: var(--pg-c-bg-soft); }

.service-pricing tbody td:last-child {
    text-align: right;
    color: var(--pg-c-accent-hover);
    font-weight: 700;
    white-space: nowrap;
}

.service-pricing .pricing-note {
    display: block;
    padding: .65rem 1.25rem;
    background: var(--pg-c-bg-soft);
    font-size: .82rem;
    color: var(--pg-c-muted);
    text-align: center;
    border-top: 1px solid var(--pg-c-border);
}

/* service-testimonials — quote cards */
.service-testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0 2.5rem;
}

.service-testimonial {
    position: relative;
    margin: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: #fff;
    border: 1px solid var(--pg-c-border);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
}

.service-testimonial::before {
    content: "“";
    position: absolute;
    top: -14px;
    left: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pg-c-accent);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 2.4rem;
    line-height: 1;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.service-testimonial p {
    margin: 0 0 1rem;
    font-style: italic;
    line-height: 1.65;
    color: var(--pg-c-text);
}

.service-testimonial cite {
    display: block;
    font-style: normal;
    font-weight: 700;
    color: var(--pg-c-primary);
    font-size: .95rem;
}

.service-testimonial cite small {
    display: inline;
    font-weight: 500;
    color: var(--pg-c-muted);
    font-size: .85rem;
    margin-left: 4px;
}

/* service-trust-strip — thin row of certifications / stats (optional) */
.service-trust-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0 2.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--pg-c-primary);
    border-radius: var(--pg-radius);
    color: #fff;
}

.service-trust-strip .trust-item { text-align: center; padding: 0 .5rem; }

.service-trust-strip .trust-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--pg-c-accent);
    line-height: 1.1;
}

.service-trust-strip .trust-label {
    display: block;
    font-size: .8rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: .25rem;
    line-height: 1.3;
}

/* ==========================================================================
   Scroll-reveal animations (enhanced by page-generator.js)
   ========================================================================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Small-screen tweaks
   ========================================================================== */
@media (max-width: 640px) {
    .article-summary { padding: 1.25rem 1.25rem; }
    .article-cta { padding: 1.5rem 1rem; }
    .blog-stat .stat-number { font-size: 2.25rem; }
    .blog-keyfigure .keyfigure-number { font-size: 2.5rem; }
    .page-generator-content h2,
    .blog-content h2 { font-size: 1.4rem; }
}
