/* ============================================================
   Tremplin — Feuille de style
   Thème clair, professionnel et rassurant.
   ============================================================ */

:root {
    --indigo:      #4f46e5;
    --indigo-dark: #4338ca;
    --indigo-soft: #eef2ff;
    --teal:        #0d9488;
    --teal-soft:   #ccfbf1;
    --ink:         #1e293b;
    --ink-soft:    #475569;
    --muted:       #94a3b8;
    --line:        #e2e8f0;
    --bg:          #f8fafc;
    --white:       #ffffff;
    --green:       #16a34a;
    --amber:       #d97706;
    --red:         #dc2626;
    --radius:      14px;
    --radius-sm:   9px;
    --shadow-sm:   0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
    --shadow:      0 4px 20px rgba(15,23,42,.08);
    --shadow-lg:   0 18px 50px rgba(15,23,42,.16);
    --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 1.2rem; }
.mt-2 { margin-top: 2rem; }
.mb { margin-bottom: 1.2rem; }

/* ---------------- Barre supérieure ---------------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-text { font-size: 1.2rem; letter-spacing: -.5px; }
.brand-mark {
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--indigo), var(--teal));
    color: #fff; font-weight: 800; font-size: 1.1rem;
}
.brand-mark.small { width: 24px; height: 24px; font-size: .85rem; border-radius: 7px; }

.mainnav { display: flex; gap: 4px; margin-left: 12px; flex: 1; flex-wrap: wrap; }
.mainnav a {
    color: var(--ink-soft); font-weight: 500; font-size: .92rem;
    padding: 8px 11px; border-radius: 8px;
}
.mainnav a:hover { background: var(--indigo-soft); color: var(--indigo-dark); text-decoration: none; }
.mainnav a.active { background: var(--indigo-soft); color: var(--indigo-dark); font-weight: 600; }

.usermenu { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-chip {
    font-weight: 600; color: var(--ink); padding: 6px 12px;
    background: var(--indigo-soft); border-radius: 999px; font-size: .9rem;
}
.user-chip:hover { text-decoration: none; }

/* ---------------- Boutons ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-weight: 600; font-size: .95rem;
    padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
    cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-sm { padding: 7px 14px; font-size: .88rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-dark); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { filter: brightness(.94); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); border-color: var(--muted); }
.btn-danger { background: #fef2f2; color: var(--red); border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-block { width: 100%; }

/* ---------------- Messages flash ---------------- */
.flash-zone { margin-top: 16px; }
.flash {
    padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 10px;
    font-weight: 500; border: 1px solid;
}
.flash-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.flash-error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.flash-info    { background: var(--indigo-soft); color: var(--indigo-dark); border-color: #c7d2fe; }

/* ---------------- Layout principal ---------------- */
.main { padding: 30px 0 60px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .subtitle { color: var(--ink-soft); margin: 0; }

/* ---------------- Cartes ---------------- */
.card {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 18px; }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .mainnav { display: none; }
    h1 { font-size: 1.6rem; }
}

/* ---------------- Formulaires ---------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=url], input[type=date], input[type=number], select, textarea {
    width: 100%; font-family: inherit; font-size: .95rem; color: var(--ink);
    padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; transition: .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-soft);
}
textarea { resize: vertical; min-height: 90px; }
.field-row { display: flex; gap: 14px; }
.field-row > * { flex: 1; }
@media (max-width: 620px) { .field-row { flex-direction: column; gap: 0; } }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

/* ---------------- Page d'authentification ---------------- */
.auth-wrap { max-width: 440px; margin: 40px auto; }
.auth-wrap .card { padding: 30px; }
.auth-switch { text-align: center; margin-top: 16px; color: var(--ink-soft); }

/* ---------------- Landing ---------------- */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: 2.9rem; letter-spacing: -1px; }
@media (max-width: 880px) { .hero h1 { font-size: 2.1rem; } }
.hero .lead { font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 28px; }
.eyebrow {
    display: inline-block; background: var(--teal-soft); color: #0f766e;
    font-weight: 600; font-size: .82rem; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual {
    background: linear-gradient(135deg, var(--indigo), var(--teal));
    border-radius: 24px; padding: 30px; color: #fff; box-shadow: var(--shadow-lg);
}
.hero-visual .mini-card {
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
    border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; backdrop-filter: blur(4px);
}
.hero-visual .mini-card:last-child { margin-bottom: 0; }
.hero-visual .mini-card strong { display: block; font-size: 1rem; }
.hero-visual .mini-card span { font-size: .85rem; opacity: .85; }

.section { padding: 50px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

.feature { padding: 24px; }
.feature .ico {
    width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
    background: var(--indigo-soft); font-size: 1.4rem; margin-bottom: 14px;
}
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* Étapes du parcours */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step {
    display: flex; gap: 16px; align-items: flex-start;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.step .num {
    flex: none; width: 38px; height: 38px; border-radius: 50%;
    background: var(--indigo); color: #fff; font-weight: 700;
    display: grid; place-items: center;
}
.step h3 { margin: 4px 0 4px; }
.step p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

.cta-band {
    background: linear-gradient(135deg, var(--indigo-dark), var(--teal));
    color: #fff; border-radius: 24px; padding: 46px; text-align: center; margin: 30px 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { opacity: .9; font-size: 1.1rem; }

/* ---------------- Tableau de bord ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 880px) { .stat-grid { grid-template-columns: repeat(2,1fr); } }
.stat {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.stat .n { font-size: 2rem; font-weight: 800; color: var(--indigo); }
.stat .l { color: var(--ink-soft); font-size: .9rem; }

.progress-bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--indigo), var(--teal)); border-radius: 999px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .8rem; border: 2px solid var(--line); color: transparent; }
.checklist li.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.checklist li.done .txt { color: var(--ink-soft); }
.checklist .txt { flex: 1; }

/* ---------------- Tableau candidatures ---------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.data th { color: var(--ink-soft); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
table.data tr:hover td { background: var(--bg); }

.badge {
    display: inline-block; padding: 4px 11px; border-radius: 999px;
    font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.st-todo      { background: #f1f5f9; color: #475569; }
.st-sent      { background: var(--indigo-soft); color: var(--indigo-dark); }
.st-relance   { background: #fef9c3; color: #854d0e; }
.st-entretien { background: var(--teal-soft); color: #0f766e; }
.st-offre     { background: #dcfce7; color: #166534; }
.st-accepte   { background: var(--green); color: #fff; }
.st-refus     { background: #fee2e2; color: #991b1b; }
.st-muet      { background: #f1f5f9; color: #94a3b8; }

/* ---------------- Pipeline (kanban léger) ---------------- */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 880px) { .pipeline { grid-template-columns: 1fr 1fr; } }
.pipe-col { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.pipe-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 10px; display: flex; justify-content: space-between; }
.pipe-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.pipe-card a { font-weight: 600; color: var(--ink); }
.pipe-card .meta { font-size: .8rem; color: var(--muted); }

/* ---------------- CV ---------------- */
.cv-section-list { list-style: none; padding: 0; margin: 0; }
.cv-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; display: flex; justify-content: space-between; gap: 12px; }
.cv-item .info strong { display: block; }
.cv-item .info span { color: var(--ink-soft); font-size: .9rem; }
.cv-item .actions { display: flex; gap: 8px; align-items: flex-start; }
.tag { display: inline-block; background: var(--indigo-soft); color: var(--indigo-dark); padding: 4px 10px; border-radius: 8px; font-size: .82rem; margin: 2px 4px 2px 0; }

.level-dots { display: inline-flex; gap: 3px; }
.level-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; }
.level-dots i.on { background: var(--indigo); }

/* Aperçu CV imprimable */
.cv-paper { background: #fff; max-width: 800px; margin: 0 auto; box-shadow: var(--shadow); border-radius: 8px; overflow: hidden; }
.cv-head { background: linear-gradient(135deg, var(--indigo), var(--teal)); color: #fff; padding: 36px 40px; }
.cv-head h1 { color: #fff; margin: 0; }
.cv-head .role { font-size: 1.1rem; opacity: .92; }
.cv-head .contact { margin-top: 12px; font-size: .9rem; opacity: .9; display: flex; flex-wrap: wrap; gap: 14px; }
.cv-body { padding: 30px 40px; }
.cv-body h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--indigo); border-bottom: 2px solid var(--indigo-soft); padding-bottom: 6px; margin-top: 26px; }
.cv-body h2:first-child { margin-top: 0; }
.cv-entry { margin-bottom: 14px; }
.cv-entry .top { display: flex; justify-content: space-between; font-weight: 600; }
.cv-entry .sub { color: var(--ink-soft); font-size: .9rem; }
.cv-entry p { margin: 4px 0 0; font-size: .92rem; }

/* Accordéon questionnaire */
.q-block { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.q-block summary { cursor: pointer; padding: 14px 18px; font-weight: 600; background: var(--white); list-style: none; }
.q-block summary::-webkit-details-marker { display: none; }
.q-block[open] summary { border-bottom: 1px solid var(--line); background: var(--indigo-soft); color: var(--indigo-dark); }
.q-block .q-body { padding: 16px 18px; }
.q-block .q-body p.tip { background: var(--bg); border-left: 3px solid var(--teal); padding: 8px 12px; font-size: .88rem; color: var(--ink-soft); border-radius: 0 8px 8px 0; }

/* Échelle 1→5 (exercices du bilan) */
.echelle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ech-cap { font-size: .82rem; color: var(--muted); }
.ech-opt { position: relative; cursor: pointer; }
.ech-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ech-opt span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); font-weight: 700; color: var(--ink-soft); transition: .15s; }
.ech-opt input:checked + span { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.ech-opt:hover span { border-color: var(--indigo); }

/* Test d'orientation (RIASEC) */
.perso-legende { display: flex; justify-content: flex-end; gap: 14px; color: var(--muted); font-size: .78rem; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.q-perso { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.q-perso:last-child { border-bottom: 0; }
.qp-text { flex: 1; font-size: .95rem; }
.qp-num { color: var(--muted); font-weight: 700; margin-right: 4px; }
.q-perso .echelle { flex: none; }
.q-perso .ech-opt span { width: 34px; height: 34px; font-size: .9rem; }
@media (max-width: 620px) {
    .q-perso { flex-direction: column; align-items: flex-start; gap: 8px; }
    .perso-legende { justify-content: flex-start; }
}

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline:before { content: ''; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 18px 32px; }
.timeline li:before { content: ''; position: absolute; left: 3px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--indigo); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.timeline .t-date { font-size: .82rem; color: var(--muted); }
.timeline .t-title { font-weight: 600; }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-soft); }
.empty .big { font-size: 2.4rem; margin-bottom: 8px; }

.helpbox { background: var(--indigo-soft); border: 1px solid #c7d2fe; border-radius: var(--radius); padding: 16px 18px; color: var(--indigo-dark); }
.helpbox h3 { color: var(--indigo-dark); }

/* ---------------- Pied de page ---------------- */
.footer { border-top: 1px solid var(--line); background: #fff; padding: 26px 0; margin-top: 40px; }
.footer-news { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.footer-news-form { display: flex; gap: 8px; }
.footer-news-form input { min-width: 220px; }
@media (max-width: 620px) { .footer-news-form { width: 100%; } .footer-news-form input { flex: 1; min-width: 0; } }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--ink-soft); font-size: .9rem; }
.footer-links { display: flex; gap: 18px; align-items: center; }

/* ---------------- Graphiques du tableau de bord ---------------- */
/* Entonnoir de conversion */
.funnel { display: grid; gap: 10px; }
.funnel-row { display: flex; align-items: center; gap: 12px; }
.funnel-row .fl-label { width: 130px; flex: none; font-size: .9rem; color: var(--ink-soft); }
.funnel-track { flex: 1; height: 30px; background: var(--bg); border-radius: 8px; overflow: hidden; }
.funnel-track > span { display: block; height: 100%; background: linear-gradient(90deg, var(--indigo), var(--teal)); border-radius: 8px; transition: width .6s ease; }
.funnel-row .fl-val { width: 54px; flex: none; text-align: right; font-weight: 700; }

/* Taux clés */
.rate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 620px) { .rate-grid { grid-template-columns: 1fr; } }
.rate { text-align: center; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.rate .pct { font-size: 1.8rem; font-weight: 800; color: var(--teal); }
.rate .lbl { font-size: .82rem; color: var(--ink-soft); }

/* Histogramme (activité par semaine) */
.barchart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; }
.barchart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.barchart .bar { width: 62%; min-height: 3px; background: linear-gradient(180deg, var(--indigo), var(--teal)); border-radius: 6px 6px 0 0; transition: height .6s ease; }
.barchart .col.zero .bar { background: var(--line); }
.barchart .cap { font-size: .72rem; color: var(--muted); }
.barchart .val { font-size: .75rem; font-weight: 700; color: var(--ink-soft); }

/* Barres horizontales (répartition par canal) */
.hbars { display: grid; gap: 10px; }
.hbar { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.hbar .hb-label { width: 150px; flex: none; color: var(--ink-soft); }
.hb-track { flex: 1; height: 18px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.hb-track > span { display: block; height: 100%; background: var(--indigo); border-radius: 6px; }
.hbar .hb-val { width: 32px; flex: none; text-align: right; font-weight: 600; }

/* Mini-objectifs sur le tableau de bord */
.obj-row { margin-bottom: 14px; }
.obj-row:last-child { margin-bottom: 0; }
.obj-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .92rem; }

/* ---------------- Impression ---------------- */
@media print {
    .topbar, .footer, .no-print { display: none !important; }
    body { background: #fff; }
    .cv-paper { box-shadow: none; max-width: 100%; }
    .main { padding: 0; }
}
