/*
Theme Name: SEREINEO
Theme URI: https://sereineo.com
Author: SEREINEO
Author URI: https://sereineo.com
Description: Thème WordPress premium pour SEREINEO - Modulaire, Elementor-compatible, optimisé conversion. Inspiré des meilleures pratiques de thèmes comme Woodmart. Inclut pages de détail produit avec sidebar Stripe fixe, intégration SEO, et compatibilité Google Analytics / GTM.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: e-commerce, elementor, responsive, custom-colors, custom-menu, custom-logo, featured-images, full-width-template, right-sidebar, sticky-sidebar
Text Domain: sereineo
*/

/* ======================================
   VARIABLES CSS - SEREINEO BRAND SYSTEM
   ====================================== */
:root {
    --bleu-minuit:    #1A2B3C;
    --vert-boreal:    #2D5A27;
    --gris-perle:     #F8F9FA;
    --or-cuivre:      #B87333;
    --or-hover:       #9A612A;
    --blanc:          #FFFFFF;
    --gris-texte:     #343A40;
    --gris-clair:     #6C757D;
    --gris-border:    #DEE2E6;
    --danger:         #DC3545;
    --success:        #28A745;

    --font-titre:     'Montserrat', sans-serif;
    --font-corps:     'Inter', system-ui, sans-serif;

    --radius-sm:      4px;
    --radius-md:      8px;
    --radius-lg:      12px;
    --radius-xl:      20px;

    --shadow-sm:      0 1px 4px rgba(0,0,0,0.06);
    --shadow-md:      0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:      0 8px 32px rgba(0,0,0,0.14);

    --transition:     0.25s ease;

    --container:      1280px;
    --sidebar-width:  380px;
}

/* ======================================
   RESET & BASE
   ====================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-corps);
    color: var(--gris-texte);
    line-height: 1.7;
    background: var(--blanc);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--vert-boreal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--bleu-minuit); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-titre);
    color: var(--bleu-minuit);
    line-height: 1.25;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; }

/* ======================================
   LAYOUT UTILITIES
   ====================================== */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 2rem; }
.container-wide   { max-width: 1600px; margin: 0 auto; padding: 0 2rem; }

.section         { padding: 5rem 2rem; }
.section-sm      { padding: 3rem 2rem; }
.section-lg      { padding: 8rem 2rem; }
.section-bg      { background: var(--gris-perle); }
.section-dark    { background: var(--bleu-minuit); color: var(--blanc); }
.section-green   { background: var(--vert-boreal); color: var(--blanc); }

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 0.75rem;
}
.section-subtitle {
    text-align: center;
    color: var(--gris-clair);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.text-center { text-align: center; }
.text-white  { color: var(--blanc) !important; }
.text-gold   { color: var(--or-cuivre) !important; }
.text-green  { color: var(--vert-boreal) !important; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.gap-1       { gap: 1rem; }
.gap-2       { gap: 2rem; }

/* ======================================
   BUTTONS
   ====================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-family: var(--font-titre);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--or-cuivre);
    color: var(--blanc);
    border-color: var(--or-cuivre);
}
.btn-primary:hover {
    background: var(--or-hover);
    border-color: var(--or-hover);
    color: var(--blanc);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--bleu-minuit);
    border-color: var(--bleu-minuit);
}
.btn-secondary:hover {
    background: var(--bleu-minuit);
    color: var(--blanc);
}

.btn-white {
    background: var(--blanc);
    color: var(--bleu-minuit);
    border-color: var(--blanc);
}
.btn-white:hover {
    background: var(--gris-perle);
    color: var(--bleu-minuit);
}

.btn-green {
    background: var(--vert-boreal);
    color: var(--blanc);
    border-color: var(--vert-boreal);
}
.btn-green:hover {
    background: #234820;
    border-color: #234820;
    color: var(--blanc);
}

.btn-lg { padding: 1.125rem 2.5rem; font-size: 1.1rem; }
.btn-sm { padding: 0.625rem 1.25rem; font-size: 0.9rem; }
.btn-full { width: 100%; justify-content: center; }

/* ======================================
   NAVIGATION
   ====================================== */
.site-header {
    background: var(--blanc);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo {
    font-family: var(--font-titre);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--bleu-minuit);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.site-logo span { color: var(--vert-boreal); }

.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
    padding: 0.5rem 1rem;
    color: var(--gris-texte);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
}
.main-nav a:hover,
.main-nav a.current-menu-item { color: var(--vert-boreal); background: rgba(45, 90, 39, 0.06); }

.nav-cta { margin-left: 1rem; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: var(--bleu-minuit); border-radius: 2px; transition: all var(--transition); }

/* ======================================
   HERO SECTIONS
   ====================================== */
.hero {
    background: linear-gradient(135deg, var(--gris-perle) 0%, #e0e4e8 100%);
    padding: 7rem 2rem 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(45,90,39,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(45, 90, 39, 0.1);
    color: var(--vert-boreal);
    padding: 0.4rem 1.1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 { margin-bottom: 1.5rem; }
.hero .hero-sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gris-clair);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}
.hero .hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ======================================
   CARDS
   ====================================== */
.card {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gris-border);
    transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.card-featured {
    border: 2px solid var(--or-cuivre);
    position: relative;
}

.badge-featured {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--or-cuivre);
    color: var(--blanc);
    padding: 0.3rem 1.25rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.price-tag {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--bleu-minuit);
    font-family: var(--font-titre);
    line-height: 1;
    margin: 1.25rem 0;
}
.price-tag small {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gris-clair);
}

.feature-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.feature-list li {
    padding: 0.6rem 0;
    padding-left: 1.75rem;
    position: relative;
    border-bottom: 1px solid var(--gris-perle);
    font-size: 0.95rem;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--vert-boreal);
    font-weight: 700;
}

/* ======================================
   PRODUCT DETAIL LAYOUT (Sticky Sidebar)
   ====================================== */
.product-detail-wrapper {
    max-width: var(--container);
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 3rem;
    align-items: start;
}

.product-content { min-width: 0; }

.product-sidebar {
    position: sticky;
    top: 90px; /* under header */
}

.payment-box {
    background: var(--blanc);
    border: 2px solid var(--gris-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.payment-box-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gris-border);
    margin-bottom: 1.5rem;
}

.payment-box-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bleu-minuit);
    margin-bottom: 0.5rem;
}

.payment-box-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--bleu-minuit);
    font-family: var(--font-titre);
}

.payment-box-price .currency {
    font-size: 1.25rem;
    vertical-align: top;
    margin-top: 0.5rem;
    display: inline-block;
    color: var(--gris-clair);
}

.payment-guarantees { margin: 1.25rem 0; }
.payment-guarantee {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--gris-texte);
}
.payment-guarantee svg { flex-shrink: 0; color: var(--vert-boreal); }

.secure-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gris-border);
    font-size: 0.8rem;
    color: var(--gris-clair);
}

/* Stripe Element Styles */
.stripe-form { margin-top: 1.25rem; }
.stripe-element {
    border: 1.5px solid var(--gris-border);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    background: var(--gris-perle);
    margin-bottom: 1rem;
    transition: border-color var(--transition);
}
.stripe-element.StripeElement--focus { border-color: var(--vert-boreal); background: var(--blanc); }
.stripe-element.StripeElement--invalid { border-color: var(--danger); }

#stripe-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    min-height: 1.2em;
}

.payment-methods {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}
.payment-methods span {
    background: var(--gris-perle);
    border: 1px solid var(--gris-border);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gris-clair);
}

/* Product Detail Content Styles */
.product-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(45, 90, 39, 0.1);
    color: var(--vert-boreal);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-title { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.product-subtitle { font-size: 1.15rem; color: var(--gris-clair); margin-bottom: 2rem; }

.product-section { margin-bottom: 2.5rem; }
.product-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gris-perle);
}

.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0; }
.detail-item {
    background: var(--gris-perle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.detail-icon { font-size: 1.5rem; flex-shrink: 0; }
.detail-text h4 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.detail-text p { font-size: 0.9rem; color: var(--gris-clair); margin: 0; }

.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: var(--bleu-minuit);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}
.stat-item h3 { color: var(--or-cuivre); font-size: 2rem; }
.stat-item p  { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin: 0; }

.accordion { border: 1px solid var(--gris-border); border-radius: var(--radius-md); overflow: hidden; }
.accordion-item { border-bottom: 1px solid var(--gris-border); }
.accordion-item:last-child { border-bottom: none; }
.accordion-trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 1.1rem 1.5rem;
    text-align: left;
    font-family: var(--font-corps);
    font-size: 1rem;
    font-weight: 600;
    color: var(--bleu-minuit);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--transition);
}
.accordion-trigger:hover { background: var(--gris-perle); }
.accordion-trigger .arrow { transition: transform var(--transition); }
.accordion-trigger.active .arrow { transform: rotate(180deg); }
.accordion-content {
    display: none;
    padding: 0 1.5rem 1.25rem;
    color: var(--gris-clair);
    font-size: 0.95rem;
    line-height: 1.7;
}
.accordion-content.open { display: block; }

/* ======================================
   TESTIMONIALS
   ====================================== */
.testimonial {
    background: var(--blanc);
    border-left: 4px solid var(--vert-boreal);
    padding: 1.5rem 2rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 1.5rem;
}
.testimonial-text { font-style: italic; margin-bottom: 0.75rem; color: var(--gris-texte); }
.testimonial-author { font-weight: 600; font-size: 0.9rem; color: var(--bleu-minuit); }
.testimonial-role { color: var(--gris-clair); font-size: 0.85rem; }

.stars { color: #FFB800; font-size: 1.1rem; margin-bottom: 0.5rem; }

/* ======================================
   FOOTER
   ====================================== */
.site-footer {
    background: var(--bleu-minuit);
    color: rgba(255,255,255,0.75);
    padding: 4rem 2rem 2rem;
}

.footer-grid {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .site-logo { color: var(--blanc); font-size: 1.5rem; }
.footer-brand p { margin-top: 1rem; font-size: 0.9rem; line-height: 1.7; }

.footer-col h4 { color: var(--blanc); font-size: 0.95rem; margin-bottom: 1rem; letter-spacing: 0.5px; text-transform: uppercase; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: rgba(255,255,255,0.65); font-size: 0.9rem; text-decoration: none; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--or-cuivre); }

.footer-bottom {
    max-width: var(--container);
    margin: 2rem auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    flex-wrap: wrap;
    gap: 1rem;
}

/* ======================================
   BLOG
   ====================================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.blog-card {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gris-border);
    transition: all var(--transition);
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.blog-card-img { height: 200px; background: var(--gris-perle); position: relative; overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 1.5rem; }
.blog-cat {
    display: inline-block;
    background: rgba(45,90,39,0.1);
    color: var(--vert-boreal);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.blog-card h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.blog-card h3 a { color: var(--bleu-minuit); text-decoration: none; }
.blog-card h3 a:hover { color: var(--vert-boreal); }
.blog-card-meta { font-size: 0.85rem; color: var(--gris-clair); margin-bottom: 0.75rem; }
.read-more { color: var(--vert-boreal); font-weight: 600; font-size: 0.9rem; }

/* ======================================
   NOTICES & ALERTS
   ====================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.alert-success { background: rgba(40,167,69,0.08); border-color: var(--success); color: #155724; }
.alert-error   { background: rgba(220,53,69,0.08); border-color: var(--danger);  color: #721c24; }
.alert-info    { background: rgba(26,43,60,0.06);  border-color: var(--bleu-minuit); color: var(--bleu-minuit); }

/* ======================================
   BREADCRUMB
   ====================================== */
.breadcrumb-bar {
    background: var(--gris-perle);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gris-border);
    font-size: 0.875rem;
    color: var(--gris-clair);
}
.breadcrumb-bar .container { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.breadcrumb-bar a { color: var(--vert-boreal); }
.breadcrumb-bar span.sep { color: var(--gris-border); }

/* ======================================
   RESPONSIVE
   ====================================== */
@media (max-width: 1024px) {
    .product-detail-wrapper { grid-template-columns: 1fr; }
    .product-sidebar { position: static; top: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .main-nav { display: none; flex-direction: column; width: 100%; }
    .main-nav.open { display: flex; }
    .hamburger { display: flex; }
    .header-inner { flex-wrap: wrap; height: auto; padding: 1rem 2rem; }
    
    .grid-2, .grid-3, .blog-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .stats-bar { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .hero { padding: 5rem 1.5rem 4rem; }
    .section { padding: 3.5rem 1.5rem; }
    
    .product-detail-wrapper { padding: 2rem 1rem; gap: 2rem; }
}

@media (max-width: 480px) {
    :root { --sidebar-width: 100%; }
    .hero .hero-actions { flex-direction: column; align-items: center; }
    .btn-lg { width: 100%; justify-content: center; }
    .grid-4 { grid-template-columns: 1fr; }
}
