:root {
  --nordiq-deep: #0d2340;
  --nordiq-mid: #1d4d7a;
  --nordiq-blue: #1e7cc8;
  --nordiq-gold: #efb63d;
  --nordiq-red: #d43030;
  --nordiq-ink: #11233a;
  --nordiq-ivory: #f5f6f2;
  --nordiq-line: #dfe7ef;
  --nordiq-text: #1b2a3a;
  --nordiq-surface: #f4f7fb;
  --nordiq-white: #ffffff;
  --shadow-soft: 0 18px 44px rgba(13, 35, 64, 0.08);
  --shadow-card: 0 12px 28px rgba(17, 35, 58, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #f4f7fb;
  color: var(--nordiq-text);
  font-family: "Segoe UI", Arial, sans-serif;
}

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1180px;
}

.topbar {
  background: #0d2340;
  border-bottom: 2px solid rgba(239, 182, 61, 0.9);
  box-shadow: 0 8px 20px rgba(13, 35, 64, 0.12);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
  padding: 0.45rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
  padding: 0.12rem 0.18rem;
  border-radius: 10px;
  line-height: 1;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 0 0 1px rgba(13,35,64,0.08);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-title {
  font-size: clamp(1rem, 1.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--nordiq-white);
}

.brand-copy small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.6rem;
  letter-spacing: 0.12rem;
  margin-top: 0.28rem;
  text-transform: uppercase;
}

.nav-inline a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-inline a:hover,
.site-footer a:hover {
  color: var(--nordiq-gold);
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-name {
  color: #e9eefb;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-offline {
  background: rgba(239, 182, 61, 0.18);
  border: 1px solid rgba(239, 182, 61, 0.42);
  color: #f5d78c;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.btn-brand-accent {
  background: var(--nordiq-gold);
  border: 1px solid rgba(239, 182, 61, 0.9);
  color: var(--nordiq-deep);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(239, 182, 61, 0.18);
}

.btn-brand-accent:hover {
  background: #f2c75b;
  color: var(--nordiq-deep);
}

.btn-brand-light {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255,255,255,0.7);
  color: var(--nordiq-deep);
  font-weight: 700;
}

.btn-brand-outline {
  background: transparent;
  border: 1px solid var(--nordiq-deep);
  color: var(--nordiq-deep);
  font-weight: 700;
}

.page-main {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.hero-panel {
  background: #0d2340;
  border-radius: 28px;
  padding: 3rem 2rem;
  color: #fff;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,0.08);
}

.hero-copy {
  max-width: 920px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: rgba(239, 182, 61, 0.12);
  border: 1px solid rgba(239, 182, 61, 0.38);
  color: #f6d88b;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel h1 {
  margin-top: 1rem;
  font-weight: 900;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.08;
}

.hero-panel p {
  max-width: 760px;
  margin: 1rem auto 0;
  color: rgba(255,255,255,0.82);
  font-size: 1.06rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.feature-card {
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--nordiq-line);
  border-radius: 20px;
  padding: 1.4rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(17, 35, 58, 0.09);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.7rem;
}

.feature-card h5 {
  font-weight: 800;
  color: var(--nordiq-deep);
}

.feature-card p {
  margin-bottom: 0;
  color: var(--nordiq-text);
}

.site-footer {
  margin-top: auto;
  background: #0a1d33;
  border-top: 4px solid var(--nordiq-gold);
  color: rgba(255,255,255,0.85);
  padding: 2rem 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 2rem;
}

.site-footer h6 {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.site-footer p,
.site-footer li,
.site-footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li + li {
  margin-top: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  margin-top: 1.5rem;
  padding-top: 1rem;
  text-align: center;
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
}

.legal-shell,
.contact-shell {
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--nordiq-line);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.legal-shell h1,
.contact-shell h1 {
  color: var(--nordiq-deep);
  font-weight: 900;
  margin-bottom: 1rem;
}

.legal-shell h2,
.contact-shell h2 {
  color: var(--nordiq-mid);
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: 1.5rem;
}

.legal-shell p,
.legal-shell li,
.contact-shell p,
.contact-shell li {
  color: var(--nordiq-text);
  line-height: 1.7;
}

.contact-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-card {
  background: #f5f8fb;
  border: 1px solid var(--nordiq-line);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 8px 18px rgba(13, 35, 64, 0.04);
}

.contact-card strong {
  color: var(--nordiq-deep);
  display: block;
  margin-bottom: 0.45rem;
}

.zero-tol { border-left: 6px solid #000 !important; font-weight: 600; }
.photo-thumb { max-height: 64px; border: 1px solid #000; margin: 2px; }
.proposal { border: 1px solid #222; border-radius: .4rem; padding: .5rem; margin-bottom: .5rem; background: #fff; }
.accordion-button:not(.collapsed) { background: #111; color: #fff; }

@media (max-width: 768px) {
  .nav-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-tools {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-inline,
  .nav-actions {
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .brand {
    justify-content: center;
  }
  .brand-copy small {
    letter-spacing: 0.12rem;
  }
  .hero-panel {
    padding: 2.2rem 1.15rem;
  }
}

}


/* ===== Harmonisation ergonomique (charte NORDIQ) ===== */
body.site-body { background: var(--nordiq-surface); color: var(--nordiq-text); line-height: 1.55; }
.page-main { padding-top: 2rem; padding-bottom: 3rem; }
h1, h2, h3, .h1, .h2, .h3 { color: var(--nordiq-deep); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; margin-bottom: 1.25rem; }
a { color: var(--nordiq-blue); }
a:hover { color: var(--nordiq-mid); }

/* Boutons */
.btn { border-radius: .6rem; font-weight: 600; padding: .5rem 1rem; transition: background .15s, box-shadow .15s; }
.btn-sm { padding: .35rem .75rem; }
.btn-dark, .btn-primary { background: var(--nordiq-deep); border-color: var(--nordiq-deep); }
.btn-dark:hover, .btn-primary:hover { background: var(--nordiq-mid); border-color: var(--nordiq-mid); }
.btn-outline-dark { color: var(--nordiq-deep); border-color: var(--nordiq-deep); }
.btn-outline-dark:hover { background: var(--nordiq-deep); color: var(--nordiq-white); }
.btn:focus-visible, .form-control:focus, .form-select:focus {
  outline: 3px solid rgba(239,182,61,.55); outline-offset: 1px; box-shadow: none; }

/* Formulaires */
label, .form-label { font-weight: 600; color: var(--nordiq-ink); font-size: .9rem; margin-bottom: .25rem; }
.form-control, .form-select { border: 1px solid var(--nordiq-line); border-radius: .6rem; background: var(--nordiq-white); }
textarea.form-control { min-height: 7rem; resize: vertical; }
.form-text, .text-muted { color: #5b6b7d !important; }

/* Cartes et tableaux */
.card, .panel { background: var(--nordiq-white); border: 1px solid var(--nordiq-line);
  border-radius: .9rem; box-shadow: var(--shadow-card); }
.table { background: var(--nordiq-white); border-radius: .75rem; overflow: hidden; }
.table thead th { background: var(--nordiq-deep); color: var(--nordiq-white); font-weight: 600; border: 0; }
.table-hover tbody tr:hover { background: rgba(30,124,200,.06); }

/* Badges d'état */
.badge { font-weight: 600; border-radius: 999px; padding: .4em .8em; }
.badge.bg-secondary { background: var(--nordiq-mid) !important; }
.badge-offline { background: var(--nordiq-gold); color: var(--nordiq-deep); border-radius: 999px; padding: .3rem .8rem; font-weight: 700; }

/* Page rapport : barre d'actions et assistant IA */
#savestate { font-size: .8rem; }
#btn-validate { background: var(--nordiq-gold); border-color: var(--nordiq-gold); color: var(--nordiq-deep); }
#btn-validate:hover { background: #e0a42a; border-color: #e0a42a; }

/* Mobile : cibles tactiles confortables */
@media (max-width: 768px) {
  .btn, .form-control, .form-select { min-height: 44px; }
  h1 { font-size: 1.5rem; }
  .nav-inline { flex-wrap: wrap; gap: .5rem; }
}

/* ===== Expérience utilisateur : couche 2 ===== */
html { scroll-behavior: smooth; }
.container { max-width: 1140px; padding-left: 1.25rem; padding-right: 1.25rem; margin-left: auto; margin-right: auto; }

/* Accessibilité : focus visible et mouvement réduit */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(239,182,61,.7); outline-offset: 2px; border-radius: .4rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Barre de navigation : fixe, lisible, lien actif */
.topbar { position: sticky; top: 0; z-index: 1030; box-shadow: 0 4px 18px rgba(13,35,64,.18); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .6rem; padding-bottom: .6rem; }
.nav-tools { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.nav-inline { display: flex; align-items: center; gap: .25rem; }
.nav-inline a { color: #fff; text-decoration: none; font-weight: 600; padding: .45rem .8rem; border-radius: .6rem; transition: background .15s; }
.nav-inline a:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-inline a.is-active { background: rgba(239,182,61,.22); box-shadow: inset 0 -3px 0 var(--nordiq-gold); }
.nav-actions { display: flex; align-items: center; gap: .6rem; }
.user-name { color: #fff; font-weight: 600; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand { text-decoration: none; }

/* Mise en page des pages */
.page-main { min-height: 60vh; }
.page-main > h1:first-child, .page-main > .d-flex:first-child { margin-top: 0; }
.page-main > .d-flex { gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.page-main > .d-flex h1 { margin: 0; }

/* Pages d'authentification : formulaire centré dans une carte */
.page-main form:not(.d-inline) { max-width: 34rem; }
.page-main form .form-control, .page-main form .form-select { padding: .65rem .85rem; }
.page-main form .btn[type="submit"], .page-main form button:not([type]) { min-height: 44px; }

/* Assistant IA et zones de saisie */
.page-main textarea { width: 100%; min-height: 9rem; padding: .75rem .9rem; line-height: 1.5; }
.page-main input[type="file"] { max-width: 100%; }

/* Barre d'actions du rapport : reste visible au défilement */
.page-main > .d-flex:first-child { position: sticky; top: 4.2rem; z-index: 5; background: var(--nordiq-surface); padding: .6rem 0; }
#savestate { min-width: 7.5rem; }

/* Tableaux défilables sur mobile */
.table-responsive, .page-main table { max-width: 100%; }
@media (max-width: 768px) { .page-main table { display: block; overflow-x: auto; } }

/* Messages et états vides */
.alert { border: 0; border-left: 5px solid var(--nordiq-gold); border-radius: .6rem; box-shadow: var(--shadow-card); }
.toast { border-radius: .8rem; box-shadow: var(--shadow-card); }
.empty-state, .page-main > p.text-muted { text-align: center; padding: 2.5rem 1rem; background: var(--nordiq-white); border: 1px dashed var(--nordiq-line); border-radius: .9rem; }

/* Pied de page */
.site-footer { margin-top: 3rem; padding-top: 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 2rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .45rem; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-bottom { text-align: center; padding: 1.25rem; margin-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; opacity: .85; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; } }

/* ===== Couche 3 : pages rapport, connexion, accueil ===== */
.report-bar { gap: .75rem; }
.assistant-card { position: sticky; top: 5.5rem; }
.assistant-card .card-header { background: var(--nordiq-deep); color: #fff; border-radius: .9rem .9rem 0 0; }
.assistant-chat { max-height: 38vh; overflow: auto; }
.assistant-chat:empty { display: none; }

.auth-wrap { display: flex; justify-content: center; padding: 1.5rem 0; }
.auth-card { width: 100%; max-width: 26rem; border-top: 5px solid var(--nordiq-gold); }
.page-main .auth-card form { max-width: none; }

.btn-gold { background: var(--nordiq-gold); border-color: var(--nordiq-gold); color: var(--nordiq-deep); padding: .7rem 1.5rem; }
.btn-gold:hover { background: #e0a42a; border-color: #e0a42a; color: var(--nordiq-deep); }
.hero-cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-cta .btn-outline-light { padding: .7rem 1.5rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 2rem 0; }
.step { background: var(--nordiq-white); border: 1px solid var(--nordiq-line); border-radius: .9rem; padding: 1.25rem; box-shadow: var(--shadow-card); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--nordiq-gold); color: var(--nordiq-deep); font-weight: 800; margin-bottom: .6rem; }
.step h5 { margin-bottom: .25rem; color: var(--nordiq-deep); }
.step p { margin: 0; color: #5b6b7d; font-size: .92rem; }
@media (max-width: 768px) { .steps { grid-template-columns: 1fr; } .assistant-card { position: static; } }

/* ===== Section d'accueil : texte blanc et centré ===== */
.hero-panel { display: flex; justify-content: center; align-items: center; text-align: center; }
.hero-panel .hero-copy { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin: 0 auto; max-width: 52rem; width: 100%; }
.hero-panel h1, .hero-panel .hero-copy h1 { color: #ffffff !important; text-align: center; margin-left: auto; margin-right: auto; }
.hero-panel p { color: rgba(255,255,255,.88); text-align: center; margin-left: auto; margin-right: auto; }
.hero-panel .eyebrow { margin-left: auto; margin-right: auto; }

/* ===== Connexion : carte autonome ===== */
.auth-wrap { display: flex; justify-content: center; padding: 2rem 0 1rem; }
.auth-card { width: 100%; max-width: 26rem; background: #fff; border: 1px solid var(--nordiq-line);
  border-top: 5px solid var(--nordiq-gold); border-radius: 1rem; box-shadow: var(--shadow-soft);
  padding: 2rem 1.75rem; box-sizing: border-box; }
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-head h1 { font-size: 1.7rem; margin: 0 0 .25rem; }
.auth-head p { margin: 0; color: #5b6b7d; font-size: .95rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; max-width: none !important; }
.auth-field { display: flex; flex-direction: column; gap: .35rem; }
.auth-field label { font-weight: 600; font-size: .9rem; color: var(--nordiq-ink); margin: 0; }
.auth-field input { width: 100%; box-sizing: border-box; min-height: 46px; padding: .6rem .9rem; font-size: 1rem;
  border: 1.5px solid var(--nordiq-line); border-radius: .65rem; background: #f8fafd; color: var(--nordiq-text); }
.auth-field input:focus { outline: none; border-color: var(--nordiq-blue); background: #fff; box-shadow: 0 0 0 4px rgba(30,124,200,.15); }
.auth-pass { position: relative; }
.auth-pass input { padding-right: 5.5rem; }
.auth-toggle { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent;
  color: var(--nordiq-mid); font-weight: 600; font-size: .85rem; padding: .4rem .6rem; border-radius: .5rem; cursor: pointer; min-height: 0; }
.auth-toggle:hover { background: rgba(30,124,200,.1); }
.auth-submit { width: 100%; min-height: 48px; border: 0; border-radius: .7rem; cursor: pointer;
  background: var(--nordiq-deep); color: #fff; font-size: 1rem; font-weight: 700; transition: background .15s; }
.auth-submit:hover { background: var(--nordiq-mid); }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-links { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; font-size: .92rem; }
.auth-links a { text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }
.auth-restore { text-align: center; margin: 1rem 0 0; font-size: .85rem; }
@media (max-width: 480px) { .auth-card { padding: 1.5rem 1.1rem; border-radius: .8rem; } .auth-links { flex-direction: column; align-items: center; } }

/* ===== Fond des pages et page « Mes rapports » ===== */
:root { --nordiq-page: #e8eef6; --nordiq-card: #ffffff; }
body.site-body { background: var(--nordiq-page); }
.page-main > .d-flex:first-child { background: var(--nordiq-page); }

/* Champs et filtres, indépendants de Bootstrap */
.page-main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.page-main select {
  min-height: 42px; padding: .45rem .8rem; font-size: .95rem; font-family: inherit;
  border: 1.5px solid #cfdaea; border-radius: .65rem; background: #fff; color: var(--nordiq-text);
  box-sizing: border-box; margin: 0 .5rem .6rem 0; max-width: 100%; }
.page-main input[type="search"], .page-main input[type="text"] { min-width: min(100%, 18rem); }
.page-main input:focus, .page-main select:focus {
  outline: none; border-color: var(--nordiq-blue); box-shadow: 0 0 0 4px rgba(30,124,200,.15); }

/* Tableau en carte lisible */
.page-main table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--nordiq-card);
  border: 1px solid #d5dfec; border-radius: .9rem; overflow: hidden; box-shadow: var(--shadow-card); margin-top: .75rem; }
.page-main table th { background: var(--nordiq-deep); color: #fff; text-align: left; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .04em; padding: .8rem 1rem; border: 0; white-space: nowrap; }
.page-main table td { padding: .8rem 1rem; border-top: 1px solid var(--nordiq-line); vertical-align: middle; }
.page-main table tbody tr:nth-child(even) { background: #f6f9fd; }
.page-main table tbody tr:hover { background: rgba(30,124,200,.08); }

/* Badges de statut lisibles (texte blanc) */
.badge, .page-main table .badge { display: inline-block; color: #fff !important; background: var(--nordiq-mid);
  border-radius: 999px; padding: .35em .85em; font-size: .75rem; font-weight: 700; letter-spacing: .03em; }

/* Actions du tableau */
.page-main table a { font-weight: 600; text-decoration: none; color: var(--nordiq-blue); margin-right: .5rem; }
.page-main table a:hover { text-decoration: underline; }
.page-main table button { min-height: 36px; padding: .3rem .85rem; border-radius: .55rem; cursor: pointer;
  border: 1.5px solid var(--nordiq-deep); background: #fff; color: var(--nordiq-deep); font-weight: 600; font-family: inherit; }
.page-main table button:hover { background: var(--nordiq-deep); color: #fff; }

/* Tableau défilable sur mobile */
@media (max-width: 768px) { .page-main table { display: block; overflow-x: auto; } }

/* ===== Page « Mes rapports » ===== */
.rp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.rp-head h1 { margin: 0 0 .2rem; }
.rp-head p { margin: 0; color: #5b6b7d; }

.rp-btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-height: 38px; padding: .4rem .9rem;
  border: 1.5px solid var(--nordiq-deep); border-radius: .6rem; background: #fff; color: var(--nordiq-deep) !important;
  font-weight: 600; font-size: .9rem; font-family: inherit; text-decoration: none !important; cursor: pointer; transition: background .15s, color .15s; margin: 0; }
.rp-btn:hover { background: var(--nordiq-deep); color: #fff !important; }
.rp-btn-primary { background: var(--nordiq-gold); border-color: var(--nordiq-gold); }
.rp-btn-primary:hover { background: #e0a42a; border-color: #e0a42a; color: var(--nordiq-deep) !important; }
.rp-btn-danger { border-color: var(--nordiq-red); color: var(--nordiq-red) !important; }
.rp-btn-danger:hover { background: var(--nordiq-red); color: #fff !important; }

.rp-filters { display: flex; flex-wrap: wrap; gap: .9rem; align-items: flex-end; background: #fff; border: 1px solid #d5dfec;
  border-radius: .9rem; padding: 1rem 1.1rem; box-shadow: var(--shadow-card); margin-bottom: 1rem; }
.rp-field { display: flex; flex-direction: column; gap: .3rem; flex: 1 1 11rem; margin: 0; }
.rp-field > span { font-size: .8rem; font-weight: 700; color: var(--nordiq-ink); text-transform: uppercase; letter-spacing: .04em; }
.rp-field:first-child { flex: 2 1 16rem; }
.page-main .rp-input { width: 100%; margin: 0; }
.rp-filter-end { display: flex; align-items: center; gap: .8rem; margin-left: auto; }
.rp-count { color: #5b6b7d; font-size: .9rem; white-space: nowrap; }

.rp-table-wrap { overflow-x: auto; }
.page-main table.rp-table { margin: 0; }
.rp-table .rp-proj { font-weight: 700; color: var(--nordiq-deep); }
.rp-table td { white-space: nowrap; }
.rp-table .rp-actions { display: flex; gap: .45rem; justify-content: flex-end; flex-wrap: wrap; white-space: normal; }
.rp-table .rp-actions .rp-btn { min-height: 34px; padding: .3rem .75rem; font-size: .85rem; }
.rp-muted { color: #7a8898; font-size: .85rem; }

.rp-badge { display: inline-block; padding: .3em .85em; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.rp-brouillon { background: #fff1cc; color: #7a5600; border: 1px solid #efd58a; }
.rp-soumis { background: #1f7a4d; color: #fff; border: 1px solid #1f7a4d; }

.rp-chip { display: inline-flex; border: 1.5px solid var(--nordiq-deep); border-radius: .5rem; overflow: hidden; margin-right: .35rem; }
.rp-chip a, .rp-chip button { padding: .25rem .6rem; font-size: .8rem; font-weight: 700; color: var(--nordiq-deep); background: #fff;
  border: 0; text-decoration: none; cursor: pointer; font-family: inherit; min-height: 0; margin: 0; }
.rp-chip button { border-left: 1.5px solid var(--nordiq-deep); }
.rp-chip a:hover, .rp-chip button:hover { background: var(--nordiq-deep); color: #fff; }

.page-main .rp-table td.rp-empty { text-align: center; padding: 3rem 1rem; color: #5b6b7d; white-space: normal; line-height: 2; }
.rp-empty strong { color: var(--nordiq-deep); font-size: 1.1rem; }

@media (max-width: 768px) {
  .page-main table.rp-table, .rp-table thead, .rp-table tbody, .rp-table tr, .rp-table td { display: block; width: 100%; }
  .page-main table.rp-table { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .rp-table thead { display: none; }
  .rp-table tr { background: #fff; border: 1px solid #d5dfec; border-radius: .9rem; box-shadow: var(--shadow-card); margin-bottom: .9rem; padding: .4rem 0; }
  .rp-table tbody tr:nth-child(even) { background: #fff; }
  .rp-table td { border: 0; display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 1rem; white-space: normal; }
  .rp-table td::before { content: attr(data-label); font-weight: 700; color: #5b6b7d; font-size: .8rem; text-transform: uppercase; }
  .rp-table td.rp-actions { justify-content: flex-start; border-top: 1px solid var(--nordiq-line); margin-top: .3rem; padding-top: .7rem; }
  .rp-table td.rp-actions::before { display: none; }
  .rp-table td.rp-empty { display: block; }
  .rp-table td.rp-empty::before { display: none; }
  .rp-filter-end { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* ===== Assistant IA : panneau autonome ===== */
.d-none { display: none !important; }
.d-flex { display: flex; } .flex-wrap { flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; } .align-items-center { align-items: center; }
.gap-2 { gap: .5rem; } .mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: 1rem; } .mb-0 { margin-bottom: 0; }
.small { font-size: .875rem; }

.rp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 24rem; gap: 1.25rem; align-items: start; }
.rp-main { min-width: 0; }

.ai-panel { position: sticky; top: 5.5rem; display: flex; flex-direction: column; max-height: calc(100vh - 7rem);
  background: #fff; border: 1px solid #d5dfec; border-radius: 1rem; box-shadow: var(--shadow-soft); overflow: hidden; }
.ai-head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; color: #fff;
  background: linear-gradient(135deg, var(--nordiq-deep), var(--nordiq-mid)); border-bottom: 3px solid var(--nordiq-gold); }
.ai-avatar { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; flex: none;
  border-radius: 50%; background: rgba(255,255,255,.15); font-size: 1.2rem; }
.ai-titles { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ai-titles strong { font-size: 1.05rem; color: #fff; }
.ai-titles small { color: rgba(255,255,255,.78); font-size: .78rem; }
.ai-close { display: none; margin-left: auto; border: 0; background: rgba(255,255,255,.15); color: #fff; width: 2.2rem; height: 2.2rem;
  border-radius: 50%; font-size: 1rem; cursor: pointer; min-height: 0; padding: 0; }

.ai-chat { flex: 1 1 auto; min-height: 8rem; overflow-y: auto; padding: 1rem; background: #f6f9fd; font-size: .92rem; line-height: 1.5; }
.ai-chat:empty::before { content: "Bonjour ! Décrivez votre journée de chantier : effectif, travaux, incidents, risques. Je propose les sections à remplir et vous validez."; display: block; color: #5b6b7d; }
.ai-proposals { padding: 0 1rem; }
.ai-proposals:not(:empty) { padding: .75rem 1rem; border-top: 1px solid var(--nordiq-line); max-height: 30vh; overflow-y: auto; }

.ai-composer { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; border-top: 1px solid var(--nordiq-line); background: #fff; }
.ai-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--nordiq-ink); margin: 0; }
.ai-composer textarea { width: 100%; box-sizing: border-box; min-height: 6.5rem; max-height: 14rem; padding: .7rem .85rem; resize: vertical;
  font: inherit; font-size: .95rem; border: 1.5px solid #cfdaea; border-radius: .7rem; background: #f8fafd; color: var(--nordiq-text); }
.ai-composer textarea:focus { outline: none; border-color: var(--nordiq-blue); background: #fff; box-shadow: 0 0 0 4px rgba(30,124,200,.15); }
.ai-file { font-size: .82rem; color: var(--nordiq-mid); background: rgba(30,124,200,.08); border-radius: .5rem; padding: .35rem .6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-file[hidden] { display: none; }
.ai-tools { display: flex; gap: .5rem; flex-wrap: wrap; }
.ai-tool { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; flex: 1 1 0; min-height: 40px; padding: .35rem .8rem; margin: 0;
  border: 1.5px solid var(--nordiq-deep); border-radius: .65rem; background: #fff; color: var(--nordiq-deep); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.ai-tool:hover { background: var(--nordiq-deep); color: #fff; }
.ai-tool.is-recording { background: var(--nordiq-red); border-color: var(--nordiq-red); color: #fff; }
.ai-send { width: 100%; min-height: 46px; border: 0; border-radius: .7rem; cursor: pointer;
  background: var(--nordiq-gold); color: var(--nordiq-deep); font: inherit; font-size: 1rem; font-weight: 800; transition: background .15s; }
.ai-send:hover { background: #e0a42a; }
.ai-send:disabled { opacity: .6; cursor: wait; }

.ai-fab { display: none; position: fixed; right: 1rem; bottom: 1rem; z-index: 1040; min-height: 48px; padding: .6rem 1.2rem;
  border: 0; border-radius: 999px; background: var(--nordiq-deep); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 28px rgba(13,35,64,.35); border-bottom: 3px solid var(--nordiq-gold); }

@media (max-width: 991px) {
  .rp-layout { grid-template-columns: 1fr; }
  .ai-fab { display: inline-flex; align-items: center; gap: .4rem; }
  .ai-close { display: inline-flex; align-items: center; justify-content: center; }
  .ai-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1050; max-height: 88vh;
    border-radius: 1.1rem 1.1rem 0 0; transform: translateY(105%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  .ai-panel.is-open { transform: translateY(0); visibility: visible; }
  body.ai-open .ai-fab { display: none; }
}

/* ===== Formulaire du rapport : sections ergonomiques ===== */
#blocks { display: flex; flex-direction: column; gap: 1rem; }
#blocks .accordion-item { background: #fff; border: 1px solid #d5dfec; border-radius: 1rem; box-shadow: var(--shadow-card); overflow: hidden; }
#blocks .accordion-header { margin: 0; }
#blocks .accordion-button { display: flex; align-items: center; width: 100%; padding: 1rem 1.25rem; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--nordiq-deep), var(--nordiq-mid)); color: #fff; font: inherit; font-size: 1.05rem; font-weight: 700; text-align: left;
  border-bottom: 3px solid var(--nordiq-gold); }
#blocks .accordion-body { padding: 1.25rem; }

/* Grille autonome (équivalent Bootstrap) */
#blocks .row { display: flex; flex-wrap: wrap; gap: .9rem 1rem; margin: 0 0 .75rem; }
#blocks .row > * { box-sizing: border-box; min-width: 0; flex: 1 1 12rem; }
#blocks .col-12 { flex: 1 1 100%; } #blocks .col-6 { flex: 1 1 calc(50% - .5rem); }
#blocks .col-4 { flex: 1 1 calc(33% - .7rem); } #blocks .col-3 { flex: 1 1 calc(25% - .75rem); }
#blocks .col-md-6 { flex: 1 1 calc(50% - .5rem); min-width: 14rem; }

/* En-tête du rapport : fiche d'identité */
#blocks .row.g-2.small { background: #f6f9fd; border: 1px solid var(--nordiq-line); border-radius: .8rem; padding: 1rem; font-size: .95rem; }
#blocks .row.g-2.small b { display: block; color: #5b6b7d; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
#blocks .text-muted.small { background: rgba(239,182,61,.14); border-left: 4px solid var(--nordiq-gold); border-radius: .5rem; padding: .6rem .8rem; color: var(--nordiq-ink) !important; }

/* Champs */
#blocks label { display: block; font-size: .82rem; font-weight: 700; color: var(--nordiq-ink); margin: 0 0 .3rem; }
#blocks input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), #blocks select, #blocks textarea {
  width: 100%; box-sizing: border-box; min-height: 42px; padding: .45rem .75rem; font: inherit; font-size: .95rem;
  border: 1.5px solid #cfdaea; border-radius: .65rem; background: #f8fafd; color: var(--nordiq-text); margin: 0; }
#blocks textarea { min-height: 5.5rem; resize: vertical; }
#blocks input:focus, #blocks select:focus, #blocks textarea:focus { outline: none; border-color: var(--nordiq-blue); background: #fff; box-shadow: 0 0 0 4px rgba(30,124,200,.15); }
#blocks input[type="file"] { width: 100%; font-size: .85rem; padding: .4rem; border: 1.5px dashed #b9c8dc; border-radius: .65rem; background: #fff; box-sizing: border-box; }
#blocks h6, #blocks h5, #blocks .fw-bold { color: var(--nordiq-deep); font-weight: 700; margin: 1rem 0 .5rem; }

/* Cases à cocher en pastilles (réunions, permis, machinerie, incidents) */
#blocks .form-check, #blocks label:has(> input[type="checkbox"]) { display: inline-flex; align-items: center; gap: .5rem; margin: 0 .5rem .5rem 0;
  padding: .45rem .85rem; border: 1.5px solid #cfdaea; border-radius: 999px; background: #fff; cursor: pointer; font-size: .9rem; font-weight: 600; transition: background .15s, border-color .15s; }
#blocks .form-check:hover, #blocks label:has(> input[type="checkbox"]):hover { border-color: var(--nordiq-blue); }
#blocks .form-check:has(input:checked), #blocks label:has(> input[type="checkbox"]:checked) { background: var(--nordiq-deep); border-color: var(--nordiq-deep); color: #fff; }
#blocks input[type="checkbox"] { width: 1.05rem; height: 1.05rem; min-height: 0; accent-color: var(--nordiq-gold); margin: 0; }
#blocks .form-check-label { margin: 0; color: inherit; }

/* Boutons */
#blocks .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: .4rem 1rem; border-radius: .65rem;
  border: 1.5px solid var(--nordiq-deep); background: #fff; color: var(--nordiq-deep); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; text-decoration: none; }
#blocks .btn:hover { background: var(--nordiq-deep); color: #fff; }
#blocks .btn-outline-danger { border-color: var(--nordiq-red); color: var(--nordiq-red); }
#blocks .btn-outline-danger:hover { background: var(--nordiq-red); color: #fff; }
#blocks .d-flex { gap: .6rem; flex-wrap: wrap; align-items: center; }

/* Tableau des risques : une carte par risque */
#blocks .card, #blocks .border { background: #fbfcfe; border: 1px solid #d5dfec; border-left: 5px solid var(--nordiq-gold); border-radius: .8rem; padding: 1rem; margin-bottom: 1rem; }
#blocks .badge { background: var(--nordiq-red) !important; color: #fff !important; }

/* Total et tableaux internes */
#blocks table { width: 100%; border-collapse: collapse; }
#blocks table td, #blocks table th { padding: .6rem .5rem; border-bottom: 1px solid var(--nordiq-line); text-align: left; }
#blocks .text-end { text-align: right; }

@media (max-width: 640px) {
  #blocks .accordion-body { padding: .9rem; }
  #blocks .row > *, #blocks .col-4, #blocks .col-3, #blocks .col-6, #blocks .col-md-6 { flex: 1 1 100%; }
}

/* ===== Page profil v2 ===== */
.pf-head { max-width: 44rem; margin: 0 auto 1.25rem; }
.pf-head h1 { margin: 0 0 .2rem; }
.pf-head p { margin: 0; color: #5b6b7d; }
.pf { max-width: 44rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }

.pf .card { display: flex; flex-direction: column; gap: .2rem; background: #fff; border: 1px solid #d5dfec;
  border-top: 4px solid var(--nordiq-deep); border-radius: 1rem; box-shadow: var(--shadow-card); padding: 1.4rem 1.5rem; margin: 0; box-sizing: border-box; }
.pf .card h5 { font-size: 1.1rem; font-weight: 700; color: var(--nordiq-deep); margin: 0 0 .9rem; padding-bottom: .6rem; border-bottom: 2px solid var(--nordiq-gold); }

.pf .mb-2 { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.pf .form-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--nordiq-ink); margin: 0; }
.pf input { width: 100%; box-sizing: border-box; min-height: 44px; padding: .5rem .85rem; font: inherit; font-size: 1rem;
  border: 1.5px solid #cfdaea; border-radius: .65rem; background: #f8fafd; color: var(--nordiq-text); margin: 0; }
.pf input:focus { outline: none; border-color: var(--nordiq-blue); background: #fff; box-shadow: 0 0 0 4px rgba(30,124,200,.15); }

.pf .small { font-size: .88rem; }
.pf .text-muted { color: #5b6b7d !important; }
.pf p.small { margin: 0 0 .8rem; }
.pf div.small.text-muted { background: #f6f9fd; border: 1px solid var(--nordiq-line); border-left: 4px solid var(--nordiq-gold);
  border-radius: .5rem; padding: .6rem .8rem; margin-bottom: 1rem; }

.pf .btn { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem 1.4rem;
  border-radius: .65rem; border: 1.5px solid var(--nordiq-deep); background: #fff; color: var(--nordiq-deep); font: inherit; font-weight: 700; cursor: pointer; }
.pf .btn:hover { background: var(--nordiq-deep); color: #fff; }
.pf .btn-dark { background: var(--nordiq-deep); color: #fff; }
.pf .btn-dark:hover { background: var(--nordiq-mid); border-color: var(--nordiq-mid); }

.pf .badge { align-self: flex-start; background: #1f7a4d !important; color: #fff !important; border-radius: 999px; padding: .4em 1em; font-weight: 700; }

/* TOTP */
.pf code { display: block; margin: .4rem 0 .6rem; padding: .8rem 1rem; background: #f6f9fd; border: 1px dashed #b9c8dc; border-radius: .65rem;
  font-size: 1.05rem; letter-spacing: .1em; word-break: break-all; color: var(--nordiq-deep); user-select: all; }
.pf a.small { display: inline-block; margin: 0 0 .5rem; font-weight: 600; }
.pf .input-group { display: flex; gap: .6rem; margin-top: .6rem; align-items: stretch; }
.pf .input-group input { flex: 1; width: auto; }
.pf .input-group .btn { align-self: stretch; }

/* Zone dangereuse */
.pf .card.border-danger { border-color: #efb4b4; border-top-color: var(--nordiq-red); background: #fff8f8; }
.pf .card.border-danger h5 { color: var(--nordiq-red); border-bottom-color: #efb4b4; }
.pf .btn-outline-danger { border-color: var(--nordiq-red); color: var(--nordiq-red); background: #fff; }
.pf .btn-outline-danger:hover { background: var(--nordiq-red); color: #fff; }

@media (max-width: 640px) { .pf .card { padding: 1.1rem; } .pf .input-group { flex-direction: column; } .pf .btn { width: 100%; } }

/* ===== Projets et inscription ===== */
.pj-form { max-width: none !important; background: #fff; border: 1px solid #d5dfec; border-top: 4px solid var(--nordiq-gold);
  border-radius: 1rem; box-shadow: var(--shadow-card); padding: 1.4rem 1.5rem; margin-bottom: 1.5rem; }
.pj-form h2, .pj-sub { font-size: 1.1rem; font-weight: 700; color: var(--nordiq-deep); margin: 0 0 1rem; }
.pj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.pj-field { display: flex; flex-direction: column; gap: .3rem; margin: 0; }
.pj-wide { grid-column: 1 / -1; }
.pj-field > span { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--nordiq-ink); }
.page-main .pj-field input { width: 100%; margin: 0; min-height: 46px; }
.pj-form-end { display: flex; justify-content: flex-end; margin-top: 1.1rem; }
.pj-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: .4rem 1rem; margin: 0;
  border: 1.5px solid var(--nordiq-deep); border-radius: .65rem; background: #fff; color: var(--nordiq-deep); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.pj-btn:hover { background: var(--nordiq-deep); color: #fff; }
.pj-primary { background: var(--nordiq-gold); border-color: var(--nordiq-gold); color: var(--nordiq-deep); }
.pj-primary:hover { background: #e0a42a; border-color: #e0a42a; color: var(--nordiq-deep); }
.pj-danger { border-color: var(--nordiq-red); color: var(--nordiq-red); }
.pj-danger:hover { background: var(--nordiq-red); color: #fff; }
.pj-btn:disabled { opacity: .5; cursor: not-allowed; }
.pj-list { display: flex; flex-direction: column; gap: .9rem; }
.pj-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: #fff;
  border: 1px solid #d5dfec; border-left: 5px solid var(--nordiq-deep); border-radius: .9rem; box-shadow: var(--shadow-card); padding: 1rem 1.25rem; }
.pj-card.is-archived { border-left-color: #9aa8b8; background: #f6f8fb; }
.pj-info { min-width: 0; flex: 1 1 16rem; }
.pj-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: 1.1rem; color: var(--nordiq-deep); }
.pj-badge { background: #7a8898; color: #fff; border-radius: 999px; padding: .2em .8em; font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.pj-meta { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: .3rem; color: #5b6b7d; font-size: .9rem; }
.pj-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.pj-empty { display: flex; flex-direction: column; gap: .3rem; align-items: center; text-align: center; padding: 2.5rem 1rem;
  background: #fff; border: 1px dashed #b9c8dc; border-radius: .9rem; color: #5b6b7d; }
.pj-empty strong { color: var(--nordiq-deep); font-size: 1.1rem; }
.auth-wide { max-width: 34rem; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.auth-hint { color: #5b6b7d; font-size: .8rem; }
@media (max-width: 640px) {
  .pj-grid, .auth-row { grid-template-columns: 1fr; }
  .pj-card { flex-direction: column; align-items: stretch; }
  .pj-actions .pj-btn { flex: 1 1 auto; }
  .pj-form-end .pj-btn { width: 100%; }
}

/* ===== Animations professionnelles ===== */
:root { --ease-out: cubic-bezier(.22,.8,.32,1); --t-fast: .18s; --t-med: .45s; }

@keyframes nq-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes nq-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nq-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes nq-slide-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes nq-shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes nq-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,182,61,.5); } 50% { box-shadow: 0 0 0 10px rgba(239,182,61,0); } }
@keyframes nq-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.page-main { animation: nq-fade var(--t-med) var(--ease-out) backwards; }
.topbar { animation: nq-fade .35s var(--ease-out) backwards; }

.rp-head, .pf-head, .auth-card, .pj-form, .rp-filters, .hero-panel { animation: nq-fade-up .55s var(--ease-out) backwards; }
.feature-card, .step, .pj-card, .pf .card, #blocks .accordion-item, .pj-empty, .rp-empty { animation: nq-fade-up .5s var(--ease-out) backwards; }
.rp-table tbody tr { animation: nq-fade-up .4s var(--ease-out) backwards; }
.ai-panel { animation: nq-slide-in .55s var(--ease-out) .15s backwards; }

.feature-card:nth-child(1), .step:nth-child(1), .pj-card:nth-child(1), .pf .card:nth-child(1), #blocks .accordion-item:nth-child(1), .rp-table tbody tr:nth-child(1) { animation-delay: .05s; }
.feature-card:nth-child(2), .step:nth-child(2), .pj-card:nth-child(2), .pf .card:nth-child(2), #blocks .accordion-item:nth-child(2), .rp-table tbody tr:nth-child(2) { animation-delay: .12s; }
.feature-card:nth-child(3), .step:nth-child(3), .pj-card:nth-child(3), .pf .card:nth-child(3), #blocks .accordion-item:nth-child(3), .rp-table tbody tr:nth-child(3) { animation-delay: .19s; }
.feature-card:nth-child(4), .pj-card:nth-child(4), .pf .card:nth-child(4), #blocks .accordion-item:nth-child(4), .rp-table tbody tr:nth-child(4) { animation-delay: .26s; }
.feature-card:nth-child(n+5), .pj-card:nth-child(n+5), #blocks .accordion-item:nth-child(n+5), .rp-table tbody tr:nth-child(n+5) { animation-delay: .33s; }

.feature-card, .step, .pj-card, .pf .card, .auth-card { transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), border-color var(--t-fast); }
@media (hover: hover) {
  .feature-card:hover, .step:hover, .pj-card:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(13,35,64,.14); }
  .feature-card:hover .feature-icon { transform: scale(1.12) rotate(-4deg); }
  .rp-table tbody tr { transition: background var(--t-fast); }
}
.feature-icon { transition: transform .25s var(--ease-out); display: inline-block; }
.hero-panel .eyebrow { animation: nq-pop .6s var(--ease-out) .1s backwards; }
.hero-panel h1 { animation: nq-fade-up .7s var(--ease-out) .2s backwards; }
.hero-panel p { animation: nq-fade-up .7s var(--ease-out) .35s backwards; }

.btn, .rp-btn, .pj-btn, .auth-submit, .ai-send, .ai-tool, .auth-toggle, .ai-fab { transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform .12s var(--ease-out); }
.btn:active, .rp-btn:active, .pj-btn:active, .auth-submit:active, .ai-send:active, .ai-tool:active { transform: scale(.97); }
@media (hover: hover) {
  .rp-btn-primary:hover, .pj-primary:hover, .ai-send:hover, .auth-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(13,35,64,.18); }
}
#btn-validate:not(:disabled) { animation: nq-pulse 2.4s ease-in-out 1.5s 3; }
.ai-fab { animation: nq-pop .5s var(--ease-out) .4s backwards, nq-float 3.2s ease-in-out 1.2s infinite; }
.ai-send:disabled, .auth-submit:disabled { background-image: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); background-size: 200% 100%; animation: nq-shimmer 1.2s linear infinite; }

.page-main input, .page-main select, .page-main textarea, .auth-field input { transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast); }

#blocks .accordion-collapse { transition: height .3s var(--ease-out); }
#blocks .accordion-button { transition: filter var(--t-fast); }
#blocks .accordion-button:hover { filter: brightness(1.08); }

.toast, .toast.show { animation: nq-slide-in .35s var(--ease-out) backwards; }
.alert:not(.d-none) { animation: nq-fade-up .3s var(--ease-out) backwards; }
.ai-chat > *, .ai-proposals > * { animation: nq-fade-up .3s var(--ease-out) backwards; }
.badge, .rp-badge { animation: nq-pop .35s var(--ease-out) backwards; }
.badge-offline { animation: nq-pulse 2s ease-in-out infinite; }

.nav-inline a { position: relative; }
.nav-inline a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 2px; height: 3px; background: var(--nordiq-gold); border-radius: 2px; transition: left .25s var(--ease-out), right .25s var(--ease-out); }
.nav-inline a:hover::after, .nav-inline a.is-active::after { left: 14%; right: 14%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
