@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("fonts/Poppins-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("fonts/Poppins-Medium.ttf") format("truetype"); }
@font-face { font-family: "Lato"; font-weight: 400; font-display: swap; src: url("fonts/Lato-Regular.ttf") format("truetype"); }
@font-face { font-family: "Lato"; font-weight: 700; font-display: swap; src: url("fonts/Lato-Bold.ttf") format("truetype"); }

:root {
  --navy: #0e2340;
  --navy-2: #1b3560;
  --gold: #c9a24a;
  --gold-soft: #f6eedb;
  --bg: #f3f4f8;
  --card: #ffffff;
  --text: #17202e;
  --muted: #687082;
  --line: #e4e7ee;
  --green: #1f8a5b;
  --green-soft: #e5f4ec;
  --red: #b83a2e;
  --red-soft: #fbeae7;
  --li-blue: #0a66c2;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(14, 35, 64, .06), 0 8px 24px rgba(14, 35, 64, .07);
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .titre { font-family: "Poppins", system-ui, sans-serif; font-weight: 600; letter-spacing: -.01em; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--li-blue); }
:focus-visible { outline: 3px solid rgba(201, 162, 74, .6); outline-offset: 2px; }
.cache { display: none !important; }

/* ---------- structure */
.app { max-width: 600px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px); }
.entete {
  position: relative; z-index: 5;
  background: var(--navy); color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 20px 18px;
}
.entete-haut { display: flex; align-items: center; gap: 10px; }
.marque { width: 34px; height: 34px; border-radius: 10px; background: var(--gold); color: var(--navy);
  display: grid; place-items: center; font-family: "Poppins"; font-weight: 600; font-size: 14px; }
.entete-nom { font-family: "Poppins"; font-weight: 500; font-size: 15px; opacity: .85; }
.entete h1 { margin: 14px 0 2px; font-size: 26px; line-height: 1.2; }
.entete p { margin: 0; color: rgba(255, 255, 255, .72); font-size: 15px; }
.contenu { padding: 18px 16px 0; display: grid; gap: 16px; }
.section-titre { margin: 10px 4px -4px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: "Poppins"; font-weight: 500; }

.carte { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.carte-vide { text-align: center; color: var(--muted); padding: 26px 22px; }
.carte-vide .icone-ronde { margin: 0 auto 10px; }
.carte-vide h3 { color: var(--text); margin: 0 0 6px; font-size: 17px; }
.carte-vide p { margin: 0 0 14px; }
.icone-ronde { width: 46px; height: 46px; border-radius: 50%; background: var(--gold-soft); color: var(--navy); display: grid; place-items: center; }

/* ---------- navigation */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-interieur { max-width: 600px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); height: var(--nav-h); }
.nav a { display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 12.5px; font-family: "Poppins"; font-weight: 500; position: relative; }
.nav a svg { width: 24px; height: 24px; }
.nav a.actif { color: var(--navy); }
.nav a.actif::before { content: ""; position: absolute; top: 0; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
.pastille { position: absolute; top: 9px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font: 600 11px/19px "Poppins"; text-align: center; }

/* ---------- boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 14px 18px; font-family: "Poppins"; font-weight: 500; font-size: 16px; text-decoration: none; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: scale(.98); }
.btn-ok { width: 100%; background: var(--navy); color: #fff; padding: 17px 18px; font-size: 17px; }
.btn-ok:hover { background: var(--navy-2); }
.btn-ok .coche { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; }
.btn-ok .coche svg { width: 15px; height: 15px; stroke-width: 3; }
.btn-ok .lib { display: grid; text-align: left; line-height: 1.25; }
.btn-ok .lib small { font: 400 13px/1.3 "Lato", system-ui, sans-serif; opacity: .8; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icone-ronde svg { width: 22px; height: 22px; }
.btn-second { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.btn-lien { background: none; color: var(--muted); padding: 8px; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.btn-li { background: #fff; color: var(--li-blue); border: 1.5px solid #cfe0f3; width: 100%; }
.rangee { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: grid; gap: 10px; margin-top: 16px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- bandeaux */
.bandeau { display: flex; gap: 12px; align-items: flex-start; border-radius: 14px; padding: 13px 14px; font-size: 15px; }
.bandeau svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.bandeau-info { background: var(--gold-soft); color: #5c4714; }
.bandeau-ok { background: var(--green-soft); color: #165c3d; }
.bandeau-erreur { background: var(--red-soft); color: #7d241b; }
.bandeau strong { font-weight: 700; }

/* ---------- carte de publication */
.pub-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.puce { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); color: var(--navy); border-radius: 999px; padding: 5px 11px; font: 500 13px/1.3 "Poppins"; }
.quand { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.quand svg { width: 16px; height: 16px; }

/* aperçu au plus près de LinkedIn */
.li-post { border: 1px solid #e0dfdc; border-radius: 12px; background: #fff; font-family: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: rgba(0, 0, 0, .9); overflow: hidden; }
.li-tete { display: flex; gap: 8px; padding: 12px 12px 0; }
.li-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.li-qui { min-width: 0; }
.li-nom { font-weight: 600; font-size: 14px; line-height: 1.35; }
.li-nom span { color: rgba(0, 0, 0, .6); font-weight: 400; }
.li-titre { color: rgba(0, 0, 0, .6); font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.li-meta { color: rgba(0, 0, 0, .6); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.li-meta svg { width: 14px; height: 14px; }
.li-texte { padding: 8px 12px 0; font-size: 14px; line-height: 1.43; white-space: pre-line; word-wrap: break-word; }
.li-texte.replie { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.li-hashtag { color: var(--li-blue); font-weight: 600; }
.li-plus { background: none; border: 0; color: rgba(0, 0, 0, .6); font-size: 14px; padding: 2px 12px 0; display: block; margin-left: auto; }
.li-plus:hover { color: var(--li-blue); text-decoration: underline; }
.li-barre { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #e8e8e8; margin: 10px 12px 0; padding: 4px 0; }
.li-barre span { display: grid; justify-items: center; gap: 2px; color: rgba(0, 0, 0, .6); font-size: 11px; font-weight: 600; padding: 6px 0; }
.li-barre svg { width: 20px; height: 20px; }

/* ---------- éditeur (feuille) */
.voile { position: fixed; inset: 0; background: rgba(14, 35, 64, .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.feuille { background: #fff; width: 100%; max-width: 600px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: monte .2s ease-out; }
@keyframes monte { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.feuille-tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.feuille-tete h2 { margin: 0; font-size: 20px; }
.fermer { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bg); font-size: 20px; line-height: 1; }
textarea.texte { width: 100%; min-height: 46vh; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; font-size: 15px; line-height: 1.5; resize: vertical; }
textarea.texte:focus, input:focus { border-color: var(--gold); outline: none; }
.compteur { text-align: right; color: var(--muted); font-size: 13px; margin: 6px 2px 12px; }
.compteur.trop { color: var(--red); font-weight: 700; }
label.champ { display: grid; gap: 6px; font-size: 14px; color: var(--muted); font-family: "Poppins"; font-weight: 500; }
.champ input { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 13px; font-size: 16px; background: #fff; width: 100%; }
.note-aide { color: var(--muted); font-size: 14px; margin: 12px 2px; }

/* ---------- notation */
.progression { display: flex; align-items: center; gap: 12px; margin: 0 4px; }
.barre { flex: 1; height: 8px; border-radius: 4px; background: #e2e5ee; overflow: hidden; }
.barre div { height: 100%; background: var(--gold); border-radius: 4px; transition: width .3s ease; }
.progression span { font: 500 14px "Poppins"; color: var(--navy); white-space: nowrap; }
.profil-numero { font: 500 13px "Poppins"; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.profil-nom { margin: 4px 0 4px; font-size: 24px; line-height: 1.2; }
.profil-poste { margin: 0; font-size: 16px; }
.profil-lieu { display: flex; align-items: center; gap: 5px; color: var(--muted); margin: 6px 0 16px; font-size: 15px; }
.profil-lieu svg { width: 16px; height: 16px; }
.question { background: var(--bg); border-radius: 14px; padding: 13px 14px; color: #3a4252; font-size: 15px; margin: 16px 0 14px; }
.notes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.notes button { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font: 600 17px "Poppins"; color: var(--navy); }
.notes button.choisie { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 0 0 3px rgba(201, 162, 74, .5); }
.echelle { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin: 8px 2px 0; }
.nav-profils { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.discret { color: var(--muted); font-size: 14px; text-align: center; margin: 2px 8px; }
.liste-profils { display: grid; gap: 2px; }
.ligne-profil { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%; }
.ligne-profil:last-child { border-bottom: 0; }
.ligne-profil .num { width: 26px; color: var(--muted); font: 500 13px "Poppins"; }
.ligne-profil .qui { flex: 1; min-width: 0; }
.ligne-profil .qui strong { display: block; font-weight: 700; }
.ligne-profil .qui small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-note { min-width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 15px "Poppins"; background: var(--navy); color: #fff; }
.badge-vide { background: var(--bg); color: var(--muted); font-size: 12px; min-width: 64px; border-radius: 17px; padding: 0 10px; }

/* ---------- résultats du calage */
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tuile { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px; }
.tuile b { display: block; font: 600 26px/1.1 "Poppins"; color: var(--navy); }
.tuile span { color: var(--muted); font-size: 14px; }
.comparaison { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 14px; color: var(--muted); }
.ecart { border-radius: 999px; padding: 2px 9px; font: 600 12px "Poppins"; }
.ecart-faible { background: var(--green-soft); color: var(--green); }
.ecart-fort { background: var(--red-soft); color: var(--red); }
details.detail { border-bottom: 1px solid var(--line); padding: 10px 2px; }
details.detail:last-child { border-bottom: 0; }
details.detail summary { list-style: none; cursor: pointer; }
details.detail summary::-webkit-details-marker { display: none; }
details.detail p { margin: 8px 0 0; color: #3a4252; font-size: 14.5px; }

/* ---------- connexion */
.ecran-connexion { min-height: 100vh; display: grid; place-items: center; padding: 24px 18px; background: linear-gradient(180deg, var(--navy) 0, var(--navy) 42%, var(--bg) 42%); }
.boite { width: 100%; max-width: 400px; background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 28px 22px; display: grid; gap: 14px; }
.boite .marque { width: 48px; height: 48px; border-radius: 14px; font-size: 18px; margin: 0 auto; }
.boite h1 { margin: 4px 0 0; text-align: center; font-size: 22px; }
.boite p { margin: 0; text-align: center; color: var(--muted); }
.erreur { color: var(--red); font-size: 14.5px; text-align: center; min-height: 1em; }

/* ---------- divers */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); z-index: 30; font-family: "Poppins"; font-weight: 500; font-size: 15px; animation: monte .2s ease-out; max-width: 90vw; }
.chargement { display: grid; gap: 14px; }
.squelette { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, #e9ecf3 0%, #f4f6fa 50%, #e9ecf3 100%); background-size: 200% 100%; animation: luit 1.2s infinite linear; }
@keyframes luit { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.liste-simple { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.liste-simple li { padding: 10px 2px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.liste-simple li:last-child { border-bottom: 0; }

@media (min-width: 700px) {
  .entete { border-radius: 0 0 24px 24px; }
  .contenu { padding: 22px 0 0; }
}
