/* assets/css/cavanapps.css
   Cavanapps — Indie Pro (chic + touche trash)
   Mobile-first, lisible, nerveux, pro.
*/

:root{
  /* Core palette (paper + ink) */
  --paper: #fbf7f2;          /* warm off-white */
  --paper2:#f4efe9;
  --ink:   #0b0f14;          /* deep ink */
  --ink2:  #121826;          /* slate ink */
  --muted: #5b6676;

  /* Indie accents (use sparingly) */
  --neon:  #ff2e7a;          /* neon magenta */
  --neon2: #ff4aa6;
  --acid:  #b7ff4a;          /* acid green */
  --acid2: #d4ff7a;

  /* Surfaces */
  --card:  rgba(255,255,255,.62);
  --card2: rgba(255,255,255,.48);
  --glass: rgba(11,15,20,.66);

  /* Lines & shadows */
  --line:  rgba(11,15,20,.12);
  --line2: rgba(255,255,255,.14);

  --shadow:     0 12px 40px rgba(11,15,20,.14);
  --shadowSoft: 0 4px 12px rgba(15,23,42,.06);

  /* Radius */
  --r: 18px;
  --rLg: 26px;
  --rSm: 14px;
  --radiusLg: 20px;

  /* Layout */
  --max: 1180px;

  /* Type */
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Motion */
  --ease: cubic-bezier(.2,.8,.2,1);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  overflow-x:hidden;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; height:auto; display:block; }

/* =========
   Background (paper + grain + indie neon)
   ========= */
.cvn-bg{
  position: fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(900px 560px at 6% 0%, rgba(240,45,122,.04), transparent 50%),
    linear-gradient(180deg, #f6f7f9 0%, #f4f5f7 100%);
}

.cvn-bg::before{
  display:none;
}

.cvn-bg::after{
  content:"";
  position:absolute;
  inset:0;
  opacity:.025;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  mix-blend-mode:multiply;
  pointer-events:none;
}

.cvn-wrap{ position:relative; z-index:1; }
.cvn-container{
  width: min(var(--max), calc(100% - 28px));
  margin:0 auto;
}

/* =========
   Header (UNIFIÉ — une seule source de vérité)
   ========= */
.cvn-header{
  position: sticky;
  top:0;
  z-index:60;
  background: linear-gradient(180deg, #1c2130 0%, #242b3a 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cvn-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 18px 0;       /* ✅ hauteur stable partout */
  min-height: 76px;      /* ✅ stable, évite variations */
}

.cvn-brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  line-height:1;
  min-width: 0;
  flex: 1 1 auto;
}

.cvn-brand img{
  height: 64px;          /* ✅ cohérent avec tes pages “register/index” */
  max-height: 64px;
  width:auto;
  max-width: none;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 26px rgba(0,0,0,.45));
  transform: translateZ(0);
}

.cvn-headTitle{
  display:none;
  font-weight: 950;
  letter-spacing: -.2px;
  font-size: 14px;
  color: rgba(255,255,255,.92);
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* Desktop links wrapper */
.cvn-links{
  display:none; /* mobile-first */
  gap:10px;
  align-items:center;
}

/* ✅ IMPORTANT : on style la classe réellement utilisée par header.php */
.cvn-navlink{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 999px;
  color: rgba(255,255,255,.86);
  text-decoration:none;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  font-size: 13.5px;
  white-space: nowrap;
}
.cvn-navlink:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.16);
  color: rgba(255,255,255,.95);
}
.cvn-navlink.is-active{
  border-color: rgba(240,32,96,.35);
  background: rgba(240,32,96,.18);
  color: rgba(255,255,255,.96);
}

/* actions */
.cvn-actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex: 0 0 auto;
}

/* Buttons header (utilisés par header.php) */
.cvn-headbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  text-decoration:none;
  font-weight: 900;
  font-size: 13.5px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.cvn-headbtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.18);
}
.cvn-headbtn--primary{
  background: rgba(240,32,96,.92);
  border-color: rgba(240,32,96,.35);
  box-shadow: 0 16px 30px rgba(240,32,96,.18);
  color: #fff;
}
.cvn-headbtn--primary:hover{
  background: rgba(240,32,96,.98);
  border-color: rgba(240,32,96,.45);
}

.cvn-avatar{
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  overflow:hidden;
  display:grid;
  place-items:center;
  color: rgba(255,255,255,.85);
  font-weight: 950;
  text-decoration:none;
  flex: 0 0 auto;
}
.cvn-avatar img{
  width:100%; height:100%;
  object-fit: cover;
  display:block;
}

.cvn-burger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 44px; height: 44px;
  border-radius: 999px; /* ✅ cohérent avec le style pill */
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  box-shadow: 0 12px 22px rgba(0,0,0,.18);
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.cvn-burger:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.22);
}

/* Mobile menu */
.cvn-mobilemenu{
  display:none;
  margin: 10px 0 14px;
  border-radius: var(--r);
  border:1px solid rgba(255,255,255,.14);
  background: rgba(11,15,20,.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,.24);
}

.cvn-mobilemenu a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 10px;
  border-radius: 12px;
  color: rgba(255,255,255,.90);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  margin: 8px 0;
}
.cvn-mobilemenu a:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.14);
}

.cvn-mobilemenu a.is-active{
  border-color: rgba(240,32,96,.35);
  background: rgba(240,32,96,.16);
}

.cvn-mobilemenu .groupTitle{
  margin: 10px 2px 6px;
  font-size: 12px;
  letter-spacing: .25px;
  color: rgba(255,255,255,.60);
  text-transform: uppercase;
}

/* Responsive header behavior */
@media (max-width: 980px){
  .cvn-links{ display:none; }
  .cvn-headbtn--primary{ display:none; } /* comme tu avais */
  .cvn-nav{ gap:8px; }
  .cvn-brand{ gap:6px; }
  .cvn-brand img{ height: 46px; max-height: 46px; }
  .cvn-actions{ gap:6px; }
  .cvn-headbtn,
  .cvn-avatar,
  .cvn-burger{ width:38px; height:38px; padding:0; }
}
@media (min-width: 860px){
  .cvn-links{ display:flex; }
  .cvn-burger{ display:none; }
  .cvn-mobilemenu{ display:none !important; }
}

@media (max-width: 420px){
  .cvn-brand img{ height: 40px; max-height: 40px; }
  .cvn-nav{ padding: 14px 0; min-height: 68px; }
}

/* =========
   Hero (manifesto + indie pro)
   ========= */
.cvn-hero{ padding: 14px 0 10px; }

.cvn-hero-banner{
  border-radius: var(--rLg);
  overflow:hidden;
  border: 1px solid rgba(11,15,20,.14);
  box-shadow: var(--shadow);
  background:
    radial-gradient(920px 420px at 18% 10%, rgba(255,46,122,.18), transparent 62%),
    radial-gradient(860px 520px at 88% 20%, rgba(183,255,74,.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.80), rgba(255,255,255,.54));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cvn-hero-inner{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}

.cvn-hero-left{ padding: 18px; }

.cvn-kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(11,15,20,.22);
  background: rgba(255,255,255,.68);
  font-size: 13px;
  color: rgba(11,15,20,.80);
}
.cvn-dot{
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 0 4px rgba(255,46,122,.08);
}

.cvn-h1{
  margin: 14px 0 10px;
  font-size: clamp(28px, 6.2vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.7px;
}
.cvn-h1 .cvn-underline{
  position:relative;
  display:inline-block;
}
.cvn-h1 .cvn-underline::after{
  content:"";
  position:absolute;
  left:0; right:0;
  bottom: 4px;
  height: 10px;
  background: linear-gradient(90deg, rgba(255,46,122,.20), rgba(183,255,74,.18));
  transform: skewX(-10deg);
  border-radius: 999px;
  z-index:-1;
}

.cvn-lead{
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(11,15,20,.78);
  max-width: 62ch;
}

.cvn-lead strong{ color: rgba(11,15,20,.92); }

.cvn-ctas{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items: stretch;
  margin-top: 12px;
}

/* Buttons (light) */
.cvn-btn-light{
  border: 1px solid rgba(11,15,20,.16);
  background: rgba(255,255,255,.78);
  color: rgba(11,15,20,.92);
  padding: 12px 14px;
  border-radius: 999px;
  cursor:pointer;
  box-shadow: var(--shadowSoft);
  font-size:14px;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  transition: transform .14s var(--ease), background .14s var(--ease), border-color .14s var(--ease);
  position:relative;
}
.cvn-btn-light:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.92);
  border-color: rgba(255,46,122,.30);
}
.cvn-btn-light--primary{
  border-color: rgba(255,46,122,.42);
  background:
    linear-gradient(135deg, rgba(255,46,122,.18), rgba(255,255,255,.88));
}
.cvn-btn-light--primary::after{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:999px;
  pointer-events:none;
  background: radial-gradient(420px 90px at 30% 0%, rgba(183,255,74,.22), transparent 60%);
  opacity:.55;
  filter: blur(10px);
}

.cvn-note{
  color: rgba(11,15,20,.62);
  font-size: 13px;
  line-height:1.35;
}

/* hero right “panel” */
.cvn-hero-right{
  padding: 0 18px 18px;
  display:flex;
  align-items:stretch;
  justify-content:stretch;
}

.cvn-panel{
  width:100%;
  border-radius: var(--rLg);
  border: 1px solid rgba(11,15,20,.14);
  background:
    linear-gradient(180deg, rgba(11,15,20,.80), rgba(11,15,20,.66));
  box-shadow: var(--shadowSoft);
  color: rgba(255,255,255,.92);
  padding: 14px;
  position:relative;
  overflow:hidden;
}
.cvn-panel::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(520px 240px at 18% 10%, rgba(255,46,122,.35), transparent 60%),
    radial-gradient(520px 240px at 82% 35%, rgba(183,255,74,.24), transparent 62%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0px, rgba(255,255,255,.05) 1px, transparent 1px, transparent 7px);
  opacity:.55;
  pointer-events:none;
}
.cvn-panel > *{ position:relative; z-index:1; }

.cvn-panel h3{
  margin:0;
  font-size: 16px;
  letter-spacing: -.2px;
}
.cvn-panel .cvn-mini{
  margin: 8px 0 10px;
  font-size: 13px;
  color: rgba(255,255,255,.78);
  line-height:1.45;
}

.cvn-goals{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
  margin-top:10px;
}

.cvn-goalBtn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 12px;
  border-radius: 14px;
  cursor:pointer;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  text-align:left;
  transition: transform .14s var(--ease), border-color .14s var(--ease), background .14s var(--ease);
}
.cvn-goalBtn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.10);
}
.cvn-goalBtn[aria-pressed="true"]{
  border-color: rgba(183,255,74,.55);
  background: linear-gradient(135deg, rgba(183,255,74,.14), rgba(255,255,255,.06));
}
.cvn-goalBtn .left{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.cvn-goalBtn .label{
  font-weight:800;
  letter-spacing:.2px;
}
.cvn-goalBtn .hint{
  font-size: 12.5px;
  color: rgba(255,255,255,.76);
}

.cvn-panelActions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top: 12px;
}

/* microtrust pills */
.cvn-microtrust{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 10px;
}
.cvn-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius:999px;
  border:1px solid rgba(11,15,20,.14);
  background: rgba(255,255,255,.64);
  box-shadow: 0 10px 18px rgba(11,15,20,.10);
  font-size: 12.8px;
  color: rgba(11,15,20,.82);
}
.cvn-pill b{ font-family: var(--mono); font-weight:800; }

/* =========
   Sections
   ========= */
.cvn-section{ padding: 18px 0 46px; }
.cvn-section h2{
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -.2px;
}
.cvn-sub{
  margin: 0 0 16px;
  color: rgba(11,15,20,.68);
  line-height: 1.5;
}

/* =========
   Cards grid
   ========= */
.cvn-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.cvn-card{
  padding: 16px;
  border-radius: var(--rLg);
  border: 1px solid rgba(11,15,20,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.52));
  box-shadow: var(--shadowSoft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
  min-height: 220px;
  display:flex;
  flex-direction: column;
  position:relative;
  overflow:hidden;
}
.cvn-card::after{
  content:"";
  position:absolute;
  right:-38px;
  top:-38px;
  width: 90px;
  height: 90px;
  transform: rotate(18deg);
  background: radial-gradient(circle at 40% 40%, rgba(255,46,122,.18), transparent 62%);
  opacity:.55;
  pointer-events:none;
}
.cvn-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,46,122,.24);
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.56));
}

.cvn-card-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.cvn-badge{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11,15,20,.14);
  background: rgba(255,255,255,.58);
  color: rgba(11,15,20,.86);
  display:inline-flex;
  align-items:center;
  gap: 8px;
  transform: rotate(-0.6deg);
}
.cvn-badge .b-dot{
  width:7px; height:7px; border-radius:50%;
  background: var(--neon);
  box-shadow: 0 0 0 3px rgba(255,46,122,.08);
}

.cvn-chip{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11,15,20,.12);
  background: rgba(255,255,255,.66);
  color: rgba(11,15,20,.78);
  white-space: nowrap;
}

.cvn-card h3{
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -.2px;
}
.cvn-card p{
  margin:0 0 12px;
  color: rgba(11,15,20,.70);
  font-size: 13.6px;
  line-height: 1.5;
}

.cvn-features{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin: 6px 0 14px;
}

.cvn-card-bottom{
  margin-top:auto;
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap:10px;
}

.cvn-link{
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(11,15,20,.88);
  transition: background .14s var(--ease), transform .14s var(--ease);
}
.cvn-link:hover{
  background: rgba(255,46,122,.10);
  transform: translateY(-1px);
}

/* =========
   Footer
   ========= */
.cvn-footer{
  padding: 22px 0 36px;
  border-top: 1px solid rgba(11,15,20,.12);
  color: rgba(11,15,20,.64);
  font-size: 13px;
}
.cvn-foot{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content: space-between;
  gap:12px;
}
.cvn-foot a{ color: rgba(11,15,20,.72); }
.cvn-foot a:hover{ color: rgba(11,15,20,.92); }

/* =========
   Responsive (desktop enhancements)
   ========= */
@media (min-width: 860px){
  .cvn-container{ width: min(var(--max), calc(100% - 40px)); }

  .cvn-hero{ padding: 20px 0 10px; }
  .cvn-hero-inner{
    grid-template-columns: 1.12fr .88fr;
    gap: 16px;
    min-height: 380px;
  }
  .cvn-hero-left{ padding: 26px; }
  .cvn-hero-right{ padding: 18px 18px 18px 0; }

  .cvn-ctas{
    flex-direction:row;
    align-items:center;
    justify-content:flex-start;
  }
  .cvn-btn-light{ justify-content:center; }

  .cvn-panelActions{ flex-direction:row; }

  .cvn-grid{
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; scroll-behavior:auto !important; }
}
