/*
Theme Name: Crediopti
Theme URI: https://monkreditt.com
Author: Crediopti
Author URI: https://monkreditt.com
Description: Thème premium fintech pour Crediopti — comparateur de mini crédit en ligne. Design moderne, performant et responsive.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crediopti
Tags: fintech, business, one-column, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   CREDIOPTI — Premium Fintech Design System
   Palette: Deep navy + electric cyan accents
   Typography: Sora (display) + Manrope (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Manrope:wght@300;400;500;600;700&display=swap');

:root {
  --background: #f8fafc;
  --surface: #f1f5f9;
  --surface-elevated: #ffffff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --border: #e2e8f0;
  --primary: #1e3a8a;
  --primary-glow: #38bdf8;
  --accent: #06b6d4;
  --gradient-hero: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #06b6d4 100%);
  --gradient-text: linear-gradient(135deg, #06b6d4, #6366f1);
  --gradient-card: linear-gradient(160deg, rgba(255,255,255,0.9), rgba(241,245,249,0.6));
  --shadow-soft: 0 4px 16px -4px rgba(30, 58, 138, 0.08);
  --shadow-elegant: 0 20px 50px -20px rgba(30, 58, 138, 0.25);
  --shadow-pop: 0 10px 30px -8px rgba(99, 102, 241, 0.35);
  --radius: 1rem;
  --transition: 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', system-ui, sans-serif;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 700;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.site-logo { display: flex; align-items: center; gap: 0.6rem; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.site-logo img { height: 36px; width: auto; }
.main-nav ul { list-style: none; display: flex; gap: 2rem; align-items: center; }
.main-nav a { color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--primary); }

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--gradient-hero);
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-pop);
  transition: transform var(--transition), box-shadow var(--transition);
  border: none;
  cursor: pointer;
}
.cta-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-elegant); color: #fff !important; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: var(--transition); }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  background: var(--gradient-hero);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(at 20% 0%, rgba(56,189,248,0.4) 0px, transparent 50%),
    radial-gradient(at 80% 100%, rgba(99,102,241,0.4) 0px, transparent 50%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
.hero .eyebrow { display: inline-block; padding: 0.4rem 1rem; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2.25rem, 5vw, 4rem); color: #fff; margin-bottom: 1.5rem; line-height: 1.1; }
.hero h1 span { background: linear-gradient(135deg, #67e8f9, #ffffff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,0.9); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ===== SECTIONS ===== */
.section { padding: 5rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title .label { display: inline-block; color: var(--primary); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.75rem; }
.section-title h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.section-title p { color: var(--ink-soft); margin-top: 1rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ===== CARDS GRID ===== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-elegant); }
.card .icon-wrap { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--gradient-hero); color: #fff; margin-bottom: 1rem; box-shadow: var(--shadow-pop); }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ===== STEPS ===== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; counter-reset: step; }
.step { text-align: center; }
.step::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--gradient-hero); color: #fff; font-weight: 700; font-size: 1.5rem; font-family: 'Sora', sans-serif; margin-bottom: 1rem; box-shadow: var(--shadow-pop); }
.step h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step p { color: var(--ink-soft); font-size: 0.95rem; }

/* ===== CTA SECTION ===== */
.cta-section {
  background: var(--gradient-hero);
  color: #fff;
  border-radius: 2rem;
  padding: 4rem 2rem;
  text-align: center;
  margin: 0 1.5rem;
  position: relative;
  overflow: hidden;
}
.cta-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(at 30% 50%, rgba(56,189,248,0.3) 0px, transparent 50%); }
.cta-section > * { position: relative; z-index: 1; }
.cta-section h2 { color: #fff; font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.9); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-section .cta-button { background: #fff; color: var(--primary) !important; }

/* ===== CONTENT (single/page) ===== */
.entry-content { max-width: 760px; margin: 3rem auto; padding: 0 1.5rem; }
.entry-content h1, .entry-content h2, .entry-content h3 { margin-top: 2rem; margin-bottom: 1rem; }
.entry-content p { margin-bottom: 1.25rem; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.75; }
.entry-content ul, .entry-content ol { margin: 1rem 0 1.5rem 1.5rem; color: var(--ink-soft); }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content blockquote { border-left: 4px solid var(--accent); padding: 1rem 1.5rem; background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; font-style: italic; }
.entry-content img { border-radius: var(--radius); margin: 1.5rem 0; }

/* ===== POSTS GRID ===== */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.post-card { background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform var(--transition), box-shadow var(--transition); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-elegant); }
.post-card-image { aspect-ratio: 16/10; overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms ease; }
.post-card:hover .post-card-image img { transform: scale(1.05); }
.post-card-body { padding: 1.5rem; }
.post-card-body h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.post-card-body h3 a { color: var(--ink); }
.post-card-body .meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.75rem; }

/* ===== FOOTER ===== */
.site-footer { background: #0f172a; color: rgba(255,255,255,0.7); padding: 4rem 0 2rem; margin-top: 5rem; }
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.site-footer a:hover { color: var(--primary-glow); }
.footer-brand p { font-size: 0.9rem; margin-top: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 3rem; padding-top: 1.5rem; text-align: center; font-size: 0.85rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .header-inner .cta-button { display: none; }
  .site-footer .container { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 540px) {
  .site-footer .container { grid-template-columns: 1fr; }
  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3rem 0; }
}
