/* ═══════════════════════════════════════════════════════════════════════
   site.css — Tunannu.com · Nouveau site public B2B premium
   Direction : rupture de palette vers un bleu profond "data platform"
   (inspiration GlobalDatabase), indépendant du design de l'espace membre.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Palette — 6 teintes nommées, choix délibéré */
  --ink:        #0B1B33;   /* fond des sections sombres, texte le plus fort */
  --primary:    #0F3D73;   /* bleu confiance — CTA secondaires, liens */
  --primary-2:  #1B62B5;   /* bleu premium interactif — CTA primaires, hover */
  --accent:     #00C2A8;   /* teal data — accent unique, réservé aux données/stats */
  --bg-soft:    #F4F7FB;   /* fond de section clair, gris-bleu très doux */
  --border:     #E1E7F0;
  --text-main:  #10192B;
  --text-muted: #5B6B82;
  --white:      #FFFFFF;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px rgba(11, 27, 51, 0.08);
  --shadow-strong: 0 20px 60px rgba(11, 27, 51, 0.18);
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }

body.tunannu-public {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-main);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.tunannu-public h1, .tunannu-public h2, .tunannu-public h3, .tunannu-public h4 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}

.tunannu-public .data-num {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tunannu-public a { color: var(--primary-2); text-decoration: none; }
.tunannu-public a:hover { color: var(--primary); }

/* ── Motif de fond "carte de données" (signature visuelle) ──────────── */
.data-grid-bg {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.14) 1px, transparent 0);
  background-size: 26px 26px;
}
.data-grid-bg-light {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(15,61,115,.08) 1px, transparent 0);
  background-size: 26px 26px;
}

/* ── NAVBAR ────────────────────────────────────────────────────────── */
.tp-navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky; top: 0; z-index: 1030;
}
.tp-navbar .brand {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--ink);
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.tp-navbar .brand img { display: block; }
.tp-navbar .brand:hover { color: var(--ink); }
.tp-navbar .brand .dot { color: var(--accent); }
.tp-navbar .nav-link {
  color: var(--text-main);
  font-weight: 600;
  font-size: .95rem;
  padding: 8px 16px !important;
}
.tp-navbar .nav-link:hover, .tp-navbar .nav-link.active { color: var(--primary-2); }
.tp-navbar .dropdown-menu { border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); }

/* ── BOUTONS ───────────────────────────────────────────────────────── */
.btn-tp-primary {
  background: var(--primary-2); color: #fff; border: none;
  padding: 12px 28px; border-radius: var(--radius-sm); font-weight: 700;
  transition: all var(--transition);
}
.btn-tp-primary:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn-tp-outline {
  background: transparent; color: var(--primary-2); border: 1.5px solid var(--primary-2);
  padding: 11px 26px; border-radius: var(--radius-sm); font-weight: 700;
  transition: all var(--transition);
}
.btn-tp-outline:hover { background: var(--primary-2); color: #fff; }
.btn-tp-accent {
  background: var(--accent); color: var(--ink); border: none;
  padding: 12px 28px; border-radius: var(--radius-sm); font-weight: 700;
  transition: all var(--transition);
}
.btn-tp-accent:hover { background: #00A891; transform: translateY(-2px); }
.btn-tp-ghost-light { color: #fff; border: 1.5px solid rgba(255,255,255,.4); padding: 11px 26px; border-radius: var(--radius-sm); font-weight: 700; }
.btn-tp-ghost-light:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ── HERO ──────────────────────────────────────────────────────────── */
.tp-hero {
  background: linear-gradient(160deg, var(--ink) 0%, var(--primary) 65%, var(--primary-2) 100%);
  color: #fff;
  padding: 90px 0 70px;
  position: relative;
  overflow: hidden;
}
.tp-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,194,168,.15); color: var(--accent);
  border: 1px solid rgba(0,194,168,.35);
  padding: 6px 16px; border-radius: 30px; font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.tp-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.15; }
.tp-hero p.lead { color: rgba(255,255,255,.78); font-size: 1.15rem; }

/* Barre de recherche flottante — signature "data card" (barre d'accent gauche) */
.data-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-strong);
  padding: 28px;
}
.tp-search-bar { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-strong); padding: 10px; }
.tp-search-bar .form-control, .tp-search-bar .form-select {
  border: none; padding: 14px 16px; font-size: 1rem; border-radius: var(--radius-sm);
}
.tp-search-bar .form-control:focus, .tp-search-bar .form-select:focus { box-shadow: none; background: var(--bg-soft); }

/* ── SECTIONS ──────────────────────────────────────────────────────── */
.tp-section { padding: 80px 0; }
.tp-section.soft { background: var(--bg-soft); }
.tp-section.dark { background: var(--ink); color: #fff; }
.tp-section.dark h2, .tp-section.dark h3 { color: #fff; }
.tp-eyebrow { color: var(--primary-2); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.tp-section-title h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-top: 6px; }
.tp-section-title p { color: var(--text-muted); font-size: 1.05rem; max-width: 640px; }

/* ── STAT BLOCKS (motif "data card" avec barre gauche) ────────────── */
.tp-stat {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 18px;
}
.tp-stat .data-num { font-size: 2.4rem; color: var(--ink); display: block; line-height: 1; }
.tp-stat .stat-label { color: var(--text-muted); font-size: .9rem; }

/* ── CARDS ─────────────────────────────────────────────────────────── */
.tp-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: all var(--transition); height: 100%;
}
.tp-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: transparent; }
.tp-card .card-body { padding: 26px; }

.tp-category-card {
  display: block; text-align: center; padding: 30px 16px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: all var(--transition);
}
.tp-category-card:hover { border-color: var(--primary-2); box-shadow: var(--shadow); transform: translateY(-4px); }
.tp-category-card .icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(27,98,181,.08); color: var(--primary-2); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 1.5rem; }
.tp-category-card .count { color: var(--accent); font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: .82rem; }

.tp-company-card { border-left: 3px solid transparent; }
.tp-company-card:hover { border-left-color: var(--accent); }
.tp-company-card .logo-wrap { width: 56px; height: 56px; border-radius: 12px; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.tp-verified-badge { color: var(--primary-2); font-size: .78rem; font-weight: 700; }

/* ── PROCESS STEPS ─────────────────────────────────────────────────── */
.tp-step { position: relative; padding-left: 62px; }
.tp-step .step-num {
  position: absolute; left: 0; top: 0;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--primary-2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 1.1rem;
}

/* ── FOOTER ────────────────────────────────────────────────────────── */
.tp-footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 60px 0 24px; }
.tp-footer h6 { color: #fff; font-weight: 700; margin-bottom: 16px; }
.tp-footer a { color: rgba(255,255,255,.65); }
.tp-footer a:hover { color: var(--accent); }
.tp-footer hr { border-color: rgba(255,255,255,.1); }

/* ── FORMS (recherche avancée, inscription) ──────────────────────── */
.tp-filter-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; position: sticky; top: 90px; }
.tp-filter-panel .form-label { font-weight: 600; font-size: .85rem; color: var(--text-main); }

/* ── PAGINATION ────────────────────────────────────────────────────── */
.tp-pagination .page-link { border: none; color: var(--text-main); border-radius: var(--radius-sm) !important; margin: 0 3px; }
.tp-pagination .page-item.active .page-link { background: var(--primary-2); color: #fff; }

/* ── BREADCRUMB ────────────────────────────────────────────────────── */
.tp-breadcrumb { font-size: .85rem; color: var(--text-muted); }
.tp-breadcrumb a { color: var(--text-muted); }
.tp-breadcrumb a:hover { color: var(--primary-2); }

/* ── RESPONSIVE ────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .tp-section { padding: 56px 0; }
  .tp-hero { padding: 60px 0 44px; }
  .tp-filter-panel { position: static; }
}

/* ═══════════════════════════════════════════════════════════════════
   MÉDIAS — bannières photo avec superposition dégradée
   ═══════════════════════════════════════════════════════════════════ */
.tp-media-hero {
  position: relative;
  overflow: hidden;
}
.tp-media-hero img.bg-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.tp-media-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(11,27,51,.94) 0%, rgba(15,61,115,.88) 55%, rgba(27,98,181,.75) 100%);
  z-index: 1;
}
.tp-media-hero > .container { position: relative; z-index: 2; }

.tp-photo-banner {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; height: 220px;
}
.tp-photo-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-photo-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(11,27,51,.75) 0%, rgba(11,27,51,.15) 60%, transparent 100%);
}
.tp-photo-banner .banner-caption {
  position: absolute; left: 24px; bottom: 18px; z-index: 2; color: #fff;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.3rem;
}

.tp-photo-card { border-radius: var(--radius-md); overflow: hidden; position: relative; }
.tp-photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.tp-photo-card:hover img { transform: scale(1.06); }

/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS — formes flottantes, parallax, compteurs, tilt
   ═══════════════════════════════════════════════════════════════════ */
.tp-float-shape {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,194,168,.35), transparent 70%);
  filter: blur(4px);
  animation: tp-float 8s ease-in-out infinite;
  pointer-events: none; z-index: 1;
}
.tp-float-shape.s1 { width: 220px; height: 220px; top: -60px; right: 8%; animation-delay: 0s; }
.tp-float-shape.s2 { width: 140px; height: 140px; bottom: 10%; left: 4%; animation-delay: 1.5s; background: radial-gradient(circle, rgba(27,98,181,.4), transparent 70%); }
.tp-float-shape.s3 { width: 90px; height: 90px; top: 30%; right: 25%; animation-delay: 3s; }

@keyframes tp-float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-22px) translateX(10px); }
}

.tp-parallax-layer { will-change: transform; }

.tp-card.tilt-ready { transition: transform .25s ease, box-shadow .25s ease; transform-style: preserve-3d; }

/* Compteurs : légère pulsation à l'entrée en viewport */
@keyframes tp-pop { 0% { transform: scale(.85); opacity:.4; } 100% { transform: scale(1); opacity:1; } }
.data-num.counted { animation: tp-pop .4s ease; }

/* Effet machine à écrire pour le sous-titre hero */
.tp-typed::after { content: '▍'; animation: tp-blink 1s step-start infinite; color: var(--accent); }
@keyframes tp-blink { 50% { opacity: 0; } }

/* Skeleton de chargement pour la recherche AJAX */
.tp-skeleton-card { border-radius: var(--radius-md); border: 1px solid var(--border); padding: 26px; background: #fff; }
.tp-skeleton-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg,var(--border) 25%,#eef2f8 37%,var(--border) 63%); background-size: 400% 100%; animation: tp-skel 1.3s ease infinite; margin-bottom: 10px; }
@keyframes tp-skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Fondu d'apparition des résultats AJAX */
.tp-results-enter { animation: tp-fadein .4s ease both; }
@keyframes tp-fadein { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }

/* Auto-complétion recherche */
.tp-autocomplete { position: relative; }
.tp-autocomplete-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1050;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-strong);
  margin-top: 6px; overflow: hidden; text-align: left; display: none;
}
.tp-autocomplete-list.show { display: block; }
.tp-autocomplete-item { padding: 12px 18px; display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-main); font-size: .92rem; }
.tp-autocomplete-item:hover, .tp-autocomplete-item.active { background: var(--bg-soft); }
.tp-autocomplete-item .ac-sub { color: var(--text-muted); font-size: .78rem; }

/* Carrousel témoignages */
.tp-testimonial-card { background: #fff; border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow); }
.tp-testimonial-card .quote-mark { font-family: 'Sora', sans-serif; font-size: 3rem; color: var(--accent); line-height: 1; opacity: .5; }
.tp-testimonial-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }

/* Bouton retour en haut */
.tp-scrolltop {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary-2); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-strong); opacity: 0; pointer-events: none; transition: all .3s ease; z-index: 1040; border: none;
}
.tp-scrolltop.show { opacity: 1; pointer-events: auto; }
.tp-scrolltop:hover { background: var(--ink); transform: translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  .tunannu-public *, .tp-float-shape { animation: none !important; transition: none !important; }
}
