/* ===========================
   VARIABLES & RESET
   =========================== */
:root {
  --rouge: #c0392b;
  --marine: #2c3e50;
  --fond: #f7f7f7;
  --blanc: #ffffff;
  --texte: #222222;
  --gris: #888888;
  --bordure: #e0e0e0;
  --sidebar-w: 260px;
  --font: system-ui, 'Segoe UI', Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--fond);
  color: var(--texte);
  min-height: 100vh;
}

a {
  color: var(--rouge);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===========================
   HEADER
   =========================== */
.site-header {
  background: var(--blanc);
  border-bottom: 3px solid var(--rouge);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.site-header .logo img {
  height: 44px;
  display: block;
}

.site-header .tagline {
  font-size: 0.85rem;
  color: var(--gris);
  margin-left: auto;
}

/* ===========================
   BOUTON DÉCONNEXION (header)
   =========================== */
/* ===========================
   MODAL DE CONFIRMATION
   =========================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--blanc);
  border-radius: 12px;
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  animation: modal-in 0.18s ease;
}

@keyframes modal-in {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-icone {
  font-size: 2rem;
  margin-bottom: 14px;
}

.modal-titre {
  font-size: 1.15rem;
  color: var(--marine);
  margin-bottom: 10px;
}

.modal-texte {
  font-size: 0.88rem;
  color: var(--gris);
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-actions .btn {
  width: 100%;
  text-align: center;
}

.modal-actions--row {
  flex-direction: row;
  justify-content: center;
}

.modal-actions--row .btn {
  flex: 1;
}

@media (max-width: 480px) {
  .modal-actions--row {
    flex-direction: column-reverse;
  }
}

.modal-card--envoi .modal-icone--envoi,
.modal-icone--changer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(192, 57, 43, 0.10);
  color: var(--rouge);
  margin: 0 auto 14px;
  font-size: 0;
}

.modal-icone--changer {
  background: rgba(44, 62, 80, 0.10);
  color: var(--marine);
}

.modal-cible {
  display: inline-block;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 10px 16px;
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--marine);
  line-height: 1.35;
  word-break: break-word;
}

.btn-confirmer {
  background: var(--rouge);
  color: var(--blanc);
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid var(--rouge);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s, opacity 0.2s;
}

.btn-confirmer:hover {
  background: #a8332a;
  border-color: #a8332a;
}

.btn-quitter {
  background: var(--rouge);
  color: var(--blanc);
  padding: 11px 28px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s;
}

.btn-quitter:hover {
  opacity: 0.88;
  color: var(--blanc);
  text-decoration: none;
}

.btn-retour {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--gris);
  border: 1.5px solid var(--bordure);
  border-radius: 6px;
  padding: 6px 14px;
  background: transparent;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.btn-retour:hover {
  border-color: var(--marine);
  color: var(--marine);
}

.btn-deconnexion {
  margin-left: auto;
  background: transparent;
  border: 1.5px solid var(--bordure);
  color: var(--gris);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.2s, color 0.2s;
}

.btn-deconnexion:hover {
  border-color: var(--rouge);
  color: var(--rouge);
}

/* ===========================
   PAGE CHOIX DU FORMULAIRE
   =========================== */
.choix-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 52px 24px;
}

.choix-header {
  text-align: center;
  margin-bottom: 44px;
}

.choix-header h1 {
  font-size: 1.6rem;
  color: var(--marine);
  margin-bottom: 10px;
}

.choix-header p {
  color: var(--gris);
  font-size: 0.95rem;
}

/* ===========================
   CHOIX — ÉTAT VIDE
   =========================== */

.choix-empty-state {

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  min-height: 60vh;

  padding: 40px;
}

.choix-empty-icon {

  width: 82px;
  height: 82px;

  border-radius: 50%;

  background: #f1f5f9;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 22px;
}

.choix-empty-icon svg {

  width: 42px;
  height: 42px;

  color: #64748b;
}

.choix-empty-state h1 {

  font-size: 2rem;

  color: #1e293b;

  margin-bottom: 14px;
}

.choix-empty-state p {

  max-width: 540px;

  color: #64748b;

  font-size: 1.05rem;

  line-height: 1.7;
}

.choix-empty-text {

  max-width: 620px;

  color: #64748b;

  font-size: 1.05rem;

  line-height: 1.7;

  margin-bottom: 28px;
}

.choix-empty-infos {

  display: flex;
  flex-direction: column;

  gap: 14px;

  width: 100%;
  max-width: 700px;
}

.choix-info-item {

  display: flex;
  align-items: flex-start;

  gap: 14px;

  padding: 16px 18px;

  background: white;

  border: 1px solid #e2e8f0;

  border-radius: 14px;

  text-align: left;
}

.choix-info-icon {

  width: 30px;
  height: 30px;

  border-radius: 50%;

  background: #f1f5f9;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  font-size: .95rem;
}

.formulaires-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.formulaire-carte {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--blanc);
  border: 1.5px solid var(--bordure);
  border-radius: 12px;
  padding: 28px 22px 20px;
  text-decoration: none;
  color: var(--texte);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
  cursor: pointer;
}

.formulaire-carte--complet {
  border-color: #2ecc71;
  background: #f3fbf6;
}

.formulaire-carte--complet:hover {
  border-color: #27ae60;
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.18);
}

.carte-badge-complet {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2ecc71;
  color: var(--blanc);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(46, 204, 113, 0.3);
}

.formulaire-carte:hover {
  border-color: var(--rouge);
  box-shadow: 0 6px 20px rgba(192, 57, 43, 0.12);
  transform: translateY(-3px);
  text-decoration: none;
  color: var(--texte);
}

.carte-icone {
  font-size: 2rem;
  width: 52px;
  height: 52px;
  background: var(--fond);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--rouge);
}

.carte-icone svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.carte-duree svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 4px;
}

.carte-titre {
  font-size: 0.97rem;
  color: var(--marine);
  margin-bottom: 8px;
  line-height: 1.35;
  font-weight: 700;
}

.carte-desc {
  font-size: 0.82rem;
  color: var(--gris);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 16px;
}

.carte-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.carte-duree {
  font-size: 0.75rem;
  color: var(--gris);
  background: var(--fond);
  border-radius: 20px;
  padding: 3px 10px;
  border: 1px solid var(--bordure);
}

.carte-fleche {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rouge);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
}

.formulaire-carte:hover .carte-fleche {
  opacity: 1;
  transform: translateX(3px);
}

.formulaire-loading,
.formulaire-vide,
.formulaire-erreur {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  color: var(--gris);
  font-size: 0.95rem;
}

.formulaire-erreur {
  color: var(--rouge);
}

@media (max-width: 640px) {
  .formulaires-grid {
    grid-template-columns: 1fr 1fr;
  }

  .choix-page {
    padding: 32px 16px;
  }
}

@media (max-width: 420px) {
  .formulaires-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   PAGE MOT DE PASSE (index)
   =========================== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 67px);
  padding: 40px 16px;
}

.auth-card {
  background: var(--blanc);
  border-radius: 10px;
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.auth-card h1 {
  font-size: 1.3rem;
  color: var(--marine);
  margin-bottom: 8px;
}

.auth-card p {
  font-size: 0.9rem;
  color: var(--gris);
  margin-bottom: 28px;
}

.auth-card .form-group {
  margin-bottom: 20px;
  text-align: left;
}

.auth-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.auth-card input[type="password"],
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--bordure);
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--font);
  background: var(--blanc);
  transition: border-color 0.2s;
}

.auth-card input[type="password"]:focus,
.auth-card input[type="text"]:focus,
.auth-card input[type="email"]:focus,
.auth-card select:focus {
  outline: none;
  border-color: var(--rouge);
}

.error-msg {
  color: var(--rouge);
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}

.error-msg.visible {
  display: block;
}

/* ===========================
   BOUTONS
   =========================== */
.btn {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.1s;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--rouge);
  color: var(--blanc);
  width: 100%;
}

.btn-primary:hover {
  opacity: 0.9;
  color: var(--blanc);
}

.btn-secondary {
  background: transparent;
  color: var(--marine);
  border: 1.5px solid var(--marine);
}

.btn-secondary:hover {
  background: var(--marine);
  color: var(--blanc);
}

.btn-outline {
  background: transparent;
  color: var(--rouge);
  border: 1.5px solid var(--rouge);
}

.btn-outline:hover {
  background: var(--rouge);
  color: var(--blanc);
}

#btn-suivant:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===========================
   FORMULAIRE — LAYOUT SIDEBAR
   =========================== */
.form-layout {
  display: flex;
  min-height: calc(100vh - 67px);
}

/* Sidebar */
.form-sidebar {
  width: var(--sidebar-w);
  background: var(--marine);
  color: var(--blanc);
  padding: 24px 0;
  flex-shrink: 0;
  overflow-y: auto;
  position: sticky;
  top: 67px;
  height: calc(100vh - 67px);
}

.form-sidebar h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 20px 16px;
  opacity: 0.6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}

.sidebar-section {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 0.82rem;
  cursor: default;
  border-left: 3px solid transparent;
  transition: background 0.15s;
  line-height: 1.3;
}

.sidebar-section .section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-section.done {
  opacity: 0.65;
}

.sidebar-section.done .section-dot {
  background: var(--rouge);
}

.sidebar-section.active {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--rouge);
  font-weight: 600;
}

.sidebar-section.active .section-dot {
  background: var(--blanc);
}

.sidebar-section.incomplete {
  color: #ffb4b4;
}

.sidebar-section.incomplete .section-dot {
  background: var(--rouge);
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.35);
}

/* Navigation des autres tests dans la sidebar */
.sidebar-test {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 0.85rem;
  color: var(--blanc);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s;
  line-height: 1.3;
}

.sidebar-test:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--blanc);
  text-decoration: none;
}

.sidebar-test__icone {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.sidebar-test__icone i,
.sidebar-test__icone svg {
  width: 18px;
  height: 18px;
}

.sidebar-test--actif {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--rouge);
  font-weight: 600;
}

.sidebar-test--actif .sidebar-test__icone {
  color: var(--blanc);
}

.sidebar-test__titre {
  flex: 1;
}

.sidebar-test__crochet {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2ecc71;
  color: var(--blanc);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 6px;
}

.sidebar-test--complet .sidebar-test__icone {
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-tests-loading {
  padding: 16px 20px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

.sidebar-section.incomplete::after {
  content: '!';
  margin-left: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--rouge);
  color: var(--blanc);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Contenu principal */
.form-main {
  flex: 1;
  padding: 40px 48px;
  max-width: 820px;
}

.form-page {
  display: none;
}

.form-page.active {
  display: block;
}

/* ===========================
   SIDEBAR GROUPES
   =========================== */

.sidebar-groupe {
  display: flex;
  flex-direction: column;
}

.sidebar-groupe-toggle {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.sidebar-groupe-toggle:hover,
.sidebar-groupe-toggle:focus,
.sidebar-groupe-toggle:active {
  background: rgba(255, 255, 255, .06);
  color: var(--blanc);
}

.sidebar-groupe-arrow {
  margin-left: auto;
  font-size: 12px;
  opacity: .7;
}

/* Sous-menu */

.sidebar-sousmenu {
  display: none;
  flex-direction: column;
  background:
    rgba(0, 0, 0, .12);
}

.sidebar-sousmenu.open {
  display: flex;
}

.sidebar-sousmenu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding:
    10px 20px 10px 38px;
  color:
    rgba(255, 255, 255, .82);
  text-decoration: none;
  font-size: .82rem;
  transition: .15s;
}

.sidebar-sousmenu-item:hover {
  background:
    rgba(255, 255, 255, .06);
  color: white;
}

.sidebar-sousmenu-item.active {
  background:
    rgba(255, 255, 255, .08);
  border-left:
    3px solid var(--rouge);
  color: white;
  font-weight: 600;
}

.sidebar-sousmenu-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-sousmenu-icone {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .85;
  flex-shrink: 0;
}

.sidebar-sousmenu-icone svg {
  width: 15px;
  height: 15px;
}

/* ===========================
   SOUS TESTS INVENTAIRE
   =========================== */

.sidebar-sous-tests {
  display: flex;
  flex-direction: column;
  margin-left: 18px;
  margin-top: 4px;
  margin-bottom: 10px;
}

.sidebar-sous-test {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  font-size: .8rem;
  border-left: 2px solid rgba(255, 255, 255, .12);
  transition: all .15s ease;
}

.sidebar-sous-test:hover {
  background: rgba(255, 255, 255, .05);
  color: white;
}

.sidebar-sous-test--complet {
  color: white;
}

.sidebar-sous-test__titre {
  flex: 1;
}

.sidebar-sous-test--actif {
  background: rgba(255, 255, 255, .08);
  border-left: 3px solid var(--rouge);
  color: white;
  font-weight: 600;
}

.sidebar-sous-test--actif:hover {
  background: rgba(255, 255, 255, .12);
}

.sidebar-test,
.sidebar-test:hover,
.sidebar-test:focus,
.sidebar-test:active,
.sidebar-sous-test,
.sidebar-sous-test:hover,
.sidebar-sous-test:focus,
.sidebar-sous-test:active {
  text-decoration: none;
}

/* ===========================
   CHOIX FORMULAIRES
   =========================== */

.form-page-preview {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* titre */

.form-page-preview h1 {
  font-size: 48px;
  line-height: 1.1;
  margin-bottom: 18px;
  color: #243b5a;
  font-weight: 800;
}

/* description */

.preview-description {
  font-size: 22px;
  line-height: 1.7;
  color: #475569;
  margin-bottom: 30px;
  max-width: 900px;
}

.preview-info {
  margin-top: 22px;
  font-size: 1rem;
  line-height: 1.6;
  color: #5b6472;
}

/* durée */

.preview-duree {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  margin-bottom: 28px;
}

/* bouton */

.preview-actions {
  margin-top: 10px;
}

.preview-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 12px;
  background: #b64635;
  color: white;
  text-decoration: none;
  font-weight: 700;
  transition: all .2s ease;
}

.preview-actions .btn-primary:hover {
  transform: translateY(-1px);
  background: #9f3d2f;
}

/* icones */
.preview-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.preview-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(180, 80, 60, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rouge);
  flex-shrink: 0;
}

.preview-icon svg {
  width: 34px;
  height: 34px;
}

/* Progress bar */
.progress-bar {
  height: 4px;
  background: var(--bordure);
  border-radius: 2px;
  margin-bottom: 32px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--rouge);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Contenu HTML informatif */
.html-content {
  margin-bottom: 24px;
  line-height: 1.7;
}

.html-content h2 {
  color: var(--marine);
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.html-content h3 {
  color: var(--marine);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.html-content p {
  margin-bottom: 10px;
}

.html-content ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.html-content hr {
  border: none;
  border-top: 1px solid var(--bordure);
  margin: 16px 0;
}

.html-content strong {
  color: var(--marine);
}

/* Champs */
.field-group {
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--marine);
  margin-bottom: 10px;
}

.field-hint {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--texte-doux, #666);
  margin: -6px 0 10px 0;
}

/* Textarea & Text */
.field-group textarea,
.field-group input[type="text"],
.field-group input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--bordure);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: var(--font);
  resize: vertical;
  transition: border-color 0.2s;
  background: var(--blanc);
}

.field-group textarea {
  min-height: 100px;
}

.field-group textarea:focus,
.field-group input[type="text"]:focus,
.field-group input[type="email"]:focus {
  outline: none;
  border-color: var(--rouge);
}

/* Select */
.field-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--bordure);
  border-radius: 6px;
  font-size: 0.95rem;
  background: var(--blanc);
  cursor: pointer;
  transition: border-color 0.2s;
  font-family: var(--font);
}

.field-group select:focus {
  outline: none;
  border-color: var(--rouge);
}

/* Checkboxes — chips cliquables */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 14px;
  border: 1.5px solid var(--bordure);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  background: var(--blanc);
}

.chip:hover {
  border-color: var(--rouge);
  color: var(--rouge);
}

.chip.selected {
  background: var(--rouge);
  border-color: var(--rouge);
  color: var(--blanc);
}

/* Rating — boutons 1-5 */
.rating-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rating-btn {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--bordure);
  border-radius: 6px;
  background: var(--blanc);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}

.rating-btn:hover {
  border-color: var(--rouge);
  color: var(--rouge);
}

.rating-btn.selected {
  background: var(--rouge);
  border-color: var(--rouge);
  color: var(--blanc);
}

.rating-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gris);
  margin-top: 6px;
  max-width: 260px;
}

/* ===========================
   PAGE DE RÉVISION
   =========================== */
.revue-intro {
  margin-bottom: 28px;
}

.revue-section {
  background: var(--blanc);
  border-radius: 8px;
  border-left: 4px solid var(--rouge);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.revue-section-titre {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--rouge);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.revue-modifier-btn {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blanc);
  background: var(--rouge);
  border: none;
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: opacity 0.15s;
}

.revue-modifier-btn:hover {
  opacity: 0.82;
}

.revue-item {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--bordure);
  font-size: 0.88rem;
  line-height: 1.5;
}

.revue-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.revue-label {
  flex: 0 0 45%;
  color: var(--marine);
  font-weight: 600;
}

.revue-val {
  flex: 1;
  color: var(--texte);
}

.revue-vide {
  text-align: center;
  padding: 40px;
  color: var(--gris);
  font-size: 0.9rem;
}

/* Scores calculés (revue + résultats) */
.revue-scores {
  margin-bottom: 28px;
}

.scores-bloc {
  background: var(--blanc);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.scores-titre {
  color: var(--marine);
  font-size: 1rem;
  margin-bottom: 4px;
}

.scores-sous-titre {
  font-size: 0.83rem;
  color: var(--gris);
  margin-bottom: 14px;
}

.scores-liste {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--fond);
  font-size: 0.86rem;
}

.score-row.score-top {
  background: #f0fdf4;
}

.score-label {
  flex: 0 0 200px;
  font-weight: 500;
  color: var(--texte);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.score-lettre {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--marine);
  color: var(--blanc);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}

.score-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9px;
  background: var(--marine);
  color: var(--blanc);
  white-space: nowrap;
}

.score-bar-wrap {
  flex: 1;
  height: 14px;
  background: #e5e7eb;
  border-radius: 7px;
  overflow: hidden;
}

.score-bar {
  height: 100%;
  border-radius: 7px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.score-val {
  flex: 0 0 52px;
  text-align: right;
  font-weight: 700;
  color: var(--texte);
  font-size: 0.9rem;
}

/* ---- Profil 16 personnalités ---- */
.p16-bloc {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.p16-type {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--marine);
  border-radius: 8px;
  overflow: hidden;
  max-width: 520px;
  margin: 0 auto;
}

.p16-type-label {
  flex: 1;
  background: var(--marine);
  color: var(--blanc);
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.p16-type-code {
  flex: 0 0 110px;
  background: var(--blanc);
  color: var(--marine);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.p16-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p16-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.p16-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--bordure);
  border-radius: 6px;
  background: var(--blanc);
  font-size: 0.92rem;
}

.p16-cell.p16-dom {
  border-color: var(--marine);
  background: var(--marine);
  color: var(--blanc);
  font-weight: 600;
}

.p16-name {
  flex: 1;
}

.p16-letter {
  font-weight: 800;
  font-size: 1rem;
}

.p16-pct {
  flex: 0 0 56px;
  text-align: right;
  font-weight: 700;
}

@media (max-width: 600px) {
  .p16-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .p16-dim {
    font-size: 0.85rem;
  }

  .p16-type-label {
    font-size: 0.8rem;
    padding: 10px 12px;
  }

  .p16-type-code {
    flex: 0 0 90px;
    font-size: 1.3rem;
  }
}

/* ---- Timer (test minuté) ---- */
.form-timer {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 90;
  background: var(--marine);
  color: var(--blanc);
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  transition: background 0.3s ease;
}

.form-timer-label {
  font-size: 0.78rem;
  opacity: 0.85;
}

.form-timer-val {
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.form-timer.form-timer-warning {
  background: #f59e0b;
  animation: timer-pulse 1s ease-in-out infinite;
}

.form-timer.form-timer-fini {
  background: var(--rouge);
}

@keyframes timer-pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

@media (max-width: 600px) {
  .form-timer {
    top: 70px;
    right: 12px;
    padding: 8px 12px;
  }

  .form-timer-label {
    display: none;
  }
}

/* ---- Profil DISC ---- */
.disc-bloc {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.disc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.disc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 2px solid var(--bordure);
  border-radius: 10px;
  background: var(--blanc);
}

.disc-letter {
  flex: 0 0 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanc);
  font-size: 1.4rem;
  font-weight: 800;
}

.disc-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.disc-name {
  font-weight: 700;
  color: var(--marine);
  font-size: 0.95rem;
}

.disc-score {
  font-size: 0.78rem;
  color: var(--gris);
}

.disc-bar-wrap {
  height: 10px;
  background: #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 4px;
}

.disc-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s ease;
  min-width: 2px;
}

@media (max-width: 600px) {
  .disc-grid {
    grid-template-columns: 1fr;
  }

  .score-label {
    flex: 0 0 130px;
    font-size: 0.78rem;
  }

  .revue-item {
    flex-direction: column;
    gap: 4px;
  }

  .revue-label {
    flex: none;
  }
}

/* Champs requis non remplis */
.champ-requis-erreur .field-label::after {
  content: ' — Ce champ est requis';
  color: var(--rouge);
  font-size: 0.78rem;
  font-weight: 400;
}

.champ-requis-erreur input,
.champ-requis-erreur textarea,
.champ-requis-erreur select {
  border-color: var(--rouge) !important;
}

.champ-requis-erreur .chips-container,
.champ-requis-erreur .rating-container,
.champ-requis-erreur .radio-group {
  outline: 2px solid var(--rouge);
  border-radius: 6px;
  padding: 4px;
}

.champ-requis-erreur {
  animation: secouer 0.4s ease;
}

@keyframes secouer {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

/* ===========================
   TOAST (avertissement)
   =========================== */
.form-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--rouge);
  color: var(--blanc);
  padding: 14px 22px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 300;
}

.form-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.form-toast-icone {
  font-size: 1.15rem;
}

/* ===========================
   NAVIGATION DU FORMULAIRE
   =========================== */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--bordure);
}

.form-nav .btn {
  width: auto;
}

.page-counter {
  color: var(--gris);
  font-size: 0.85rem;
}

/* ===========================
   SÉLECTION DU CONSEILLER
   =========================== */

/* Champs client sur page conseiller */
.client-fields {
  background: var(--blanc);
  border-radius: 8px;
  padding: 24px;
  border: 1.5px solid var(--bordure);
  margin-top: 24px;
}

.client-fields h3 {
  color: var(--marine);
  margin-bottom: 16px;
  font-size: 1rem;
}

.client-fields .field-group:last-child {
  margin-bottom: 0;
}

/* ===========================
   PAGE RÉSULTATS
   =========================== */
.resultats-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px;
}

.resultats-header {
  text-align: center;
  margin-bottom: 40px;
}

.resultats-header .checkmark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--rouge);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
}

.resultats-header h1 {
  color: var(--marine);
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.resultats-header p {
  color: var(--gris);
  font-size: 0.95rem;
  line-height: 1.6;
}

.resultats-section {
  background: var(--blanc);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  border-left: 4px solid var(--rouge);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.resultats-section h3 {
  color: var(--marine);
  margin-bottom: 14px;
}

.reponse-item {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.reponse-label {
  font-weight: 600;
  color: var(--texte);
  margin-bottom: 2px;
}

.reponse-val {
  color: var(--gris);
  line-height: 1.5;
}

.resultats-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.resultats-actions .btn {
  width: auto;
}

/* ===========================
   HAMBURGER MOBILE
   =========================== */
.hamburger {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--marine);
  color: var(--blanc);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  width: 100%;
  border: none;
  font-family: var(--font);
  text-align: left;
  position: sticky;
  top: 67px;
  z-index: 80;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.hamburger:active {
  background: #1f2d3d;
}

.hamburger-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.overlay.open {
  display: block;
  opacity: 1;
}

/* Bouton de fermeture (×) — visible uniquement quand la sidebar est en overlay mobile */
.sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: absolute;
  top: 10px;
  right: 10px;
  height: 40px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--blanc);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  font-family: var(--font);
  z-index: 2;
}

.sidebar-close::before {
  content: '✕';
  font-size: 1.1rem;
  line-height: 1;
}

.sidebar-close:hover,
.sidebar-close:focus {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

/* Verrou de défilement du body quand sidebar mobile ouverte */
body.no-scroll {
  overflow: hidden;
}

/* ===========================
   RESPONSIVE — SIDEBAR + LAYOUT
   =========================== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .form-sidebar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: min(86vw, 320px);
    height: 100vh;
    z-index: 100;
    padding-top: 64px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.18);
    will-change: transform;
  }

  .form-sidebar.open {
    transform: translateX(0);
  }

  .form-main {
    padding: 20px 14px;
    max-width: none;
  }

  .form-layout {
    display: block;
    min-height: 0;
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none;
  }

  .overlay {
    display: none !important;
  }

  .sidebar-close {
    display: none !important;
  }
}

@media print {

  .form-sidebar,
  .form-nav,
  .resultats-actions,
  .site-header,
  .hamburger {
    display: none !important;
  }

  .resultats-page {
    padding: 0;
  }

  .resultats-section {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ===========================
   BOUTONS RADIO
   =========================== */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.radio-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  min-width: 110px;
  background: var(--blanc);
  border: 1.5px solid var(--bordure);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--texte);
  transition: all 0.15s ease;
  user-select: none;
  flex: 1 1 auto;
}

.radio-option:hover {
  border-color: var(--rouge);
  background: #fff5f4;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-option::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--bordure);
  background: var(--blanc);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.radio-option:hover::before {
  border-color: var(--rouge);
}

.radio-option:has(input:checked) {
  border-color: var(--rouge);
  background: #fff5f4;
  color: var(--rouge);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(192, 57, 43, 0.15);
}

.radio-option:has(input:checked)::before {
  border-color: var(--rouge);
  background: var(--rouge);
  box-shadow: inset 0 0 0 4px var(--blanc);
}

.radio-option:focus-within {
  outline: 2px solid rgba(192, 57, 43, 0.35);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .radio-group {
    flex-direction: column;
  }

  .radio-option {
    width: 100%;
  }
}

[data-form-id="16-personnalites"] .radio-group {
  flex-direction: column;
}

[data-form-id="16-personnalites"] .radio-option {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  padding-left: 16px;
}

/* ===========================
   CHECKBOX-LIST (RIASEC)
   =========================== */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkbox-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--blanc);
  border: 1.5px solid var(--bordure);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1.4;
}

.checkbox-list-item:hover {
  border-color: var(--rouge);
  background: #fff8f7;
}

.checkbox-list-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--rouge);
  margin: 0;
}

.checkbox-list-item__texte {
  flex: 1;
  font-size: 0.95rem;
  color: var(--texte);
}

.checkbox-list-item.selected {
  border-color: var(--rouge);
  background: #fff5f4;
}

.checkbox-list-item.selected .checkbox-list-item__texte {
  color: var(--rouge);
  font-weight: 500;
}


/* ===========================
   DRAG & DROP TOP 10
   =========================== */
#top-final-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* item */
.top-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  cursor: grab;
  transition: all 0.15s ease;
}

/* hover */
.top-item:hover {
  background: #f3f4f6;
}

/* drag en cours */
.top-item.dragging {
  opacity: 0.4;
  transform: scale(0.98);
}

/* rank */
.rank {
  font-weight: bold;
  min-width: 30px;
}

/* ===========================
   ANCRES
   =========================== */

.ancre-box {
  position: relative;
  border: 2px solid #cbd5e1;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 22px;
  background: #ffffff;
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease,
    background .2s ease;
}

.ancre-box h3 {
  margin: 0 0 16px 0;
  font-size: 22px;
  font-weight: 800;
  color: #1e3a5f;
  padding-right: 50px;
}

.ancre-box ul {
  margin: 0;
  padding-left: 22px;
}

.ancre-box li {
  margin-bottom: 12px;
  line-height: 1.65;
  color: #334155;
  font-size: 15px;
}

/* ===========================
   HOVER
   =========================== */

.ancre-box.clickable {
  cursor: pointer;
}

.ancre-box.clickable:hover {
  transform: translateY(-4px);
  border-color: #2563eb;
  background: #f8fbff;
  box-shadow:
    0 10px 30px rgba(37, 99, 235, .12),
    0 2px 8px rgba(0, 0, 0, .05);
}

/* ===========================
   SELECTED
   =========================== */

.ancre-box.selected {
  border-color: #16a34a;
  background:
    linear-gradient(135deg,
      #f0fdf4 0%,
      #ffffff 100%);
  box-shadow:
    0 12px 30px rgba(22, 163, 74, .14),
    0 2px 10px rgba(0, 0, 0, .05);
}

.ancre-box.selected h3 {
  color: #166534;
}

/* ===========================
   RESULTATS
   =========================== */

.ancres-result-box {
  margin-top: 30px;
  padding: 28px;
  border-radius: 22px;
  background: white;
  border: 2px solid #dbeafe;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, .05);
}

.ancres-result-box h2,
.ancres-result-box h3 {
  margin-bottom: 18px;
  color: #1e3a5f;
  font-size: 28px;
}

.ancres-result-box ol {
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.ancres-result-box li {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.ancres-result-box li strong {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background:
    linear-gradient(135deg,
      #2563eb,
      #1d4ed8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.ancres-result-box .resume {
  margin-top: 24px;
  padding: 20px;
  border-radius: 16px;
  background:
    linear-gradient(135deg,
      #eff6ff,
      #ffffff);
  border-left: 6px solid #2563eb;
  color: #334155;
  line-height: 1.7;
  font-size: 15px;
}

/* ===========================
   BOUTONS (ancien système)
   =========================== */

.ancres-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ancre-btn {
  padding: 16px 20px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: white;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  transition: all .2s ease;
}

.ancre-btn:hover {
  border-color: #2563eb;
  background: #f8fbff;
}

.ancre-btn.selected {
  background:
    linear-gradient(135deg,
      #16a34a,
      #15803d);
  color: white;
  border-color: transparent;
}

.ancre-btn .rank {
  background: white;
  color: #16a34a;
  font-weight: 800;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

/* ===========================
   SATISFACTIONS
   =========================== */
.sat-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: all 0.2s;
}

.sat-item.selected {
  border-color: #16a34a;
  background: #f0fdf4;
}

.sat-item .label {
  flex: 1;
  margin-bottom: 0;
  line-height: 1.45;
  font-size: 0.95rem;
}

.sat-item .options {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.option-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  background: white;
}

.option-btn.active {
  background: var(--color);
  color: white;
  border-color: var(--color);
}

/* ===========================
   CONDITIONS TRAVAIL
   =========================== */
.conditions-table {
  display: grid;
  gap: 2px;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 200px repeat(7, 1fr);
}

.table-header div {
  background: #1e3a5f;
  color: white;
  padding: 10px;
  font-size: 12px;
}

.row-label {
  padding: 15px;
  font-weight: bold;
}

.table-cell input {
  width: 100%;
  padding: 8px;
  border: none;
  background: #f5f5f5;
}

/* ===========================
   COMPETENCES
   =========================== */

.top5-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid #ddd;
  background: #f8f8f8;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.chip:hover {
  border-color: #999;
}

.chip.selected {
  background: #2e7d32;
  color: white;
  border-color: #2e7d32;
}

.chip .rank {
  background: white;
  color: #2e7d32;
  font-weight: bold;
  border-radius: 50%;
  padding: 2px 6px;
  margin-right: 8px;
}

.hint {
  color: #666;
  margin-bottom: 10px;
}

.comp-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comp-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px;
  background: #fafafa;
  transition: 0.2s;
}

.comp-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.comp-header {
  margin-bottom: 10px;
}

.comp-title {
  font-weight: 600;
  font-size: 16px;
  color: #2c3e50;
}

.comp-textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
}

.competences-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.competence-card {
  flex: 1;
  min-width: 0;
  display: block;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s;
}

.competence-card:hover {
  border-color: #2563eb;
}

.competence-card input {
  display: none;
}

.competence-card .content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.competence-card .check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  transition: all 0.2s;
}

/* SELECTED */
.competence-card.selected {
  border-color: #16a34a;
  background: #ecfdf5;
}

.competence-card.selected .check {
  background: #16a34a;
  color: white;
}

.competence-card .content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.competence-card .check {
  flex-shrink: 0;
  margin-top: 2px;
}

.competence-card .label {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

/* ===========================
   SECTEURS
   =========================== */

.secteur-group {
  margin-top: 10px;
}

.secteur-group ul {
  margin: 5px 0 0 15px;
}

/* ===========================
   REALISATIONS
   =========================== */

.real-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 14px;
  margin-bottom: 25px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.real-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.btn-remove {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #999;
}

.btn-remove:hover {
  color: #e74c3c;
}

.real-grid {
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* bénéfices prend toute la largeur */
.real-grid .field:last-child {
  grid-column: span 2;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #2c3e50;
}

.field textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  transition: 0.2s;
}

.field textarea:focus {
  border-color: #c0392b;
  outline: none;
}

.real-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.real-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f7fa;
  border: 1px solid #e2e6ea;
  font-weight: 500;
}

.btn-delete {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: #fbeaea;
  color: #e74c3c;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-delete:hover {
  background: #e74c3c;
  color: white;
}

.btn-add-real {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: #c0392b;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.btn-add-real:hover {
  background: #a93226;
}

/* ===========================
   OFFRE
   =========================== */

.offre-section {
  border-left: 6px solid #c2185b;
  padding-left: 15px;
}

.offre-section h3 {
  margin-bottom: 10px;
}

.offre-item {
  margin-bottom: 10px;
}

.offre-item p {
  margin: 4px 0 0;
  line-height: 1.5;
}

/* ===========================
   VALEURS
   =========================== */
.percent-item {

  display: flex;
  align-items: center;
  gap: 14px;

  padding: 12px 14px;
  margin-bottom: 10px;

  border: 1px solid #dbe2ea;
  border-radius: 10px;

  background: white;
}

.percent-left {

  display: flex;
  align-items: center;
  gap: 4px;

  flex-shrink: 0;
}

.percent-left input {

  width: 100px;

  padding: 8px 10px;

  border: 1px solid #cbd5e1;
  border-radius: 8px;

  font-size: 15px;
  font-weight: 600;

  text-align: center;
}



.percent-symbol {

  font-weight: 700;
  color: #475569;
}

.percent-label {

  flex: 1;

  font-size: 15px;
  line-height: 1.4;
}

.percent-item.disabled {

  opacity: .45;

}

.percent-item.disabled input {

  background: #f1f5f9;
}

.percent-item.enabled {

  opacity: 1;
}

.percent-item.selected {

  border-color: #16a34a;

  background: #f0fdf4;

  box-shadow:
    0 0 0 3px rgba(22, 163, 74, .08);
}

.percent-item.selected .percent-left input {

  border-color: #16a34a;

  background: white;

  color: #166534;
}

.percent-item.selected .percent-label {

  color: #14532d;

  font-weight: 600;
}

.percent-item input {
  width: 60px;
  text-align: center;
}

.percent-check {

  display: flex;
  align-items: center;
  justify-content: center;
}

.percent-check input {

  width: 18px;
  height: 18px;

  cursor: pointer;
}

/* conteneur */
.rating-3-group .rating-container {
  gap: 12px;
  /* espace entre boutons */
}

/* bouton complet */
.rating-3-group .rating-btn {
  width: fit-content;
  height: fit-content;
  border-radius: 14px;
  font-size: 14px;
  /* emoji */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: all 0.15s ease;
}

/* hover */
.rating-3-group .rating-btn:hover {
  transform: scale(1.1);
}

/* sélection */
.rating-3-group .rating-btn.selected {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.top-values-header {
  margin-bottom: 25px;
}

.top-values-header h3 {
  margin-bottom: 8px;
  color: #1e293b;
}

.top-values-header p {
  color: #64748b;
  line-height: 1.5;
}

.top-values-counter {
  margin-top: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 700;
  border: 1px solid #fecaca;
}

.top-values-counter.ok {
  background: #ecfdf5;
  color: #065f46;
  border-color: #10b981;
}

.top-values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.value-card {
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  transition: .2s;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
}

.value-card:hover {
  transform: translateY(-2px);
  border-color: #f59e0b;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.value-card.active {
  border-color: #f59e0b;
  background: #fff7ed;
}

.value-card .icon {
  font-size: 22px;
}

.value-card .text {
  font-weight: 600;
  color: #1e293b;
}

.empty-values {
  padding: 20px;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.value-title {
  font-weight: 700;
  font-size: 16px;
  color: #1e293b;
}

.value-level {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
}

/* ===========================
   QUALITÉS
   =========================== */

.qualites-section {
  width: 100%;
  max-width: 800px;
  margin: auto;
}

.qualites-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.qualites-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qualite-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  transition: all .18s ease;
}

.qualite-item:hover {
  border-color: #16a34a;
  background: #f8fffa;
}

.qualite-item.selected {
  border-color: #16a34a;
  background: #f0fdf4;
}

.qualite-item .label {
  font-size: 15px;
  line-height: 1.5;
  color: #1e293b;
}

.check-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.qualites-section h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #1e3a5f;
  font-size: 32px;
  font-weight: 800;
}

/* ===========================
   TRAITS
   =========================== */

.traits-warning {

  margin-bottom: 28px;
  padding: 18px 22px;

  border-radius: 14px;

  background: #fff7ed;
  border: 1px solid #fdba74;

  color: #9a3412;
}

.traits-warning strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.traits-select-group {

  margin-bottom: 30px;

  padding: 22px;

  background: white;

  border: 1px solid #e2e8f0;
  border-radius: 18px;
}

.traits-select-header {

  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 18px;
}

.traits-select-header h3 {

  margin: 0;

  font-size: 1.15rem;
  color: #1e293b;
}

.traits-counter {

  padding: 6px 12px;

  border-radius: 999px;

  background: #f1f5f9;

  font-size: .85rem;
  font-weight: 700;

  color: #475569;
}

.traits-counter.complete {

  background: #dcfce7;
  color: #166534;
}

.traits-grid {

  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(260px, 1fr));

  gap: 12px;
}

.trait-choice {

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 14px 16px;

  border-radius: 12px;

  border: 2px solid #e2e8f0;

  cursor: pointer;

  transition: .18s ease;

  background: #fff;
}

.trait-choice:hover {

  border-color: #cbd5e1;

  transform: translateY(-1px);
}

.trait-choice.selected {

  border-color: #16a34a;

  background: #f0fdf4;
}

.trait-choice input {

  width: 18px;
  height: 18px;

  accent-color: #16a34a;

  flex-shrink: 0;
}

.trait-choice span {

  font-size: .95rem;
  line-height: 1.4;

  color: #1e293b;
}

.traits-error {

  margin-top: 18px;

  padding: 14px 16px;

  border-radius: 12px;

  background: #fef2f2;
  border: 1px solid #fca5a5;

  color: #b91c1c;

  font-size: .92rem;
  font-weight: 600;
}

.trait-choice:has(input:disabled):not(.selected) {

  opacity: .45;

  cursor: not-allowed;

  background: #f8fafc;
}

.trait-choice:has(input:disabled):hover {

  transform: none;

  border-color: #e2e8f0;
}



/* ===========================
   AMÉLIORATIONS MOBILE (général)
   =========================== */
@media (max-width: 768px) {

  /* ---------- Header ---------- */
  .site-header {
    padding: 8px 12px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .site-header .logo img {
    height: 34px;
  }

  .site-header .tagline {
    font-size: 0.78rem;
    margin-left: 0;
    flex: 1;
  }

  .btn-retour,
  .btn-deconnexion {
    font-size: 0.78rem;
    padding: 7px 11px;
    margin-left: auto;
  }

  /* ---------- Page choix ---------- */
  .choix-page {
    padding: 24px 14px;
  }

  .choix-header {
    margin-bottom: 24px;
  }

  .choix-header h1 {
    font-size: 1.35rem;
  }

  .choix-header p {
    font-size: 0.88rem;
  }

  .choix-empty-state {
    min-height: 0;
    padding: 24px 8px;
  }

  .choix-empty-state h1 {
    font-size: 1.45rem;
  }

  .choix-empty-state p,
  .choix-empty-text {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .choix-empty-icon {
    width: 64px;
    height: 64px;
  }

  .choix-empty-icon svg {
    width: 32px;
    height: 32px;
  }

  .choix-info-item {
    padding: 12px 14px;
    font-size: 0.9rem;
    line-height: 1.45;
  }

  /* Aperçu d'un formulaire (form-page-preview) */
  .form-page-preview {
    padding: 24px 14px;
  }

  .form-page-preview h1 {
    font-size: 1.65rem;
    line-height: 1.2;
    margin-bottom: 14px;
  }

  .preview-description {
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 22px;
  }

  .preview-info {
    font-size: 0.92rem;
  }

  .preview-hero {
    gap: 12px;
    margin-bottom: 14px;
  }

  .preview-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  .preview-icon svg {
    width: 24px;
    height: 24px;
  }

  .preview-duree {
    padding: 6px 12px;
    font-size: 0.85rem;
    margin-bottom: 20px;
  }

  .preview-actions .btn-primary {
    width: 100%;
    padding: 14px 22px;
  }

  /* ---------- Auth / modal ---------- */
  .auth-card {
    padding: 28px 22px;
  }

  .modal-card {
    padding: 26px 20px;
    border-radius: 12px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }

  .modal-titre {
    font-size: 1.05rem;
  }

  .modal-texte {
    font-size: 0.88rem;
  }

  .modal-cible {
    font-size: 0.9rem;
    padding: 9px 12px;
  }

  /* ---------- Form nav ---------- */
  .form-nav {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    padding-top: 18px;
  }

  .form-nav .btn {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .page-counter {
    flex: 1 0 100%;
    text-align: center;
    order: -1;
    font-size: 0.78rem;
  }

  /* ---------- Toast ---------- */
  .form-toast {
    left: 12px;
    right: 12px;
    transform: translateY(20px);
    max-width: none;
    width: auto;
    font-size: 0.88rem;
  }

  .form-toast.visible {
    transform: translateY(0);
  }

  /* ---------- Conseillers ---------- */
  .conseiller-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .conseiller-card {
    padding: 12px 8px;
  }

  .conseiller-card .initiales {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }

  /* ---------- Page résultats ---------- */
  .resultats-page {
    padding: 26px 14px;
  }

  .resultats-section {
    padding: 18px 16px;
  }

  /* ---------- Champs ---------- */
  .field-group {
    margin-bottom: 18px;
  }

  .field-label {
    font-size: 0.95rem;
  }

  /* Empêche le zoom iOS quand on focus un input */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px;
  }

  /* ---------- Révision ---------- */
  .revue-section {
    padding: 14px 16px;
  }

  .revue-section-titre {
    font-size: 0.74rem;
    gap: 8px;
  }

  /* ---------- Scores ---------- */
  .scores-bloc {
    padding: 16px 14px;
  }

  .score-row {
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 8px;
  }

  .score-label {
    flex: 1 1 100%;
    font-size: 0.85rem;
  }

  .score-bar-wrap {
    flex: 1 1 auto;
    height: 12px;
  }

  .score-val {
    flex: 0 0 auto;
    font-size: 0.88rem;
  }

  /* ---------- HTML content (texte injecté) ---------- */
  .html-content h2 {
    font-size: 1.15rem;
  }

  .html-content h3 {
    font-size: 1rem;
  }

  /* ---------- Drag & drop ---------- */
  .top-item {
    padding: 14px 14px;
    min-height: 52px;
    touch-action: none;
  }

  /* ---------- Ancres ---------- */
  .ancre-box {
    padding: 18px 16px;
    margin-bottom: 16px;
    border-radius: 14px;
  }

  .ancre-box h3 {
    font-size: 17px;
    padding-right: 36px;
    margin-bottom: 12px;
  }

  .ancre-box li {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.55;
  }

  .ancres-result-box {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .ancres-result-box h2,
  .ancres-result-box h3 {
    font-size: 1.3rem;
    margin-bottom: 14px;
  }

  .ancres-result-box li {
    padding: 12px 14px;
    font-size: 14px;
    gap: 10px;
  }

  .ancres-result-box li strong {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .ancres-result-box .resume {
    padding: 14px;
    font-size: 14px;
  }

  .ancre-btn {
    padding: 13px 16px;
    font-size: 14px;
  }

  /* ---------- Valeurs (top values) ---------- */
  .top-values-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .value-card {
    padding: 14px;
    gap: 10px;
    border-radius: 12px;
  }

  .value-card .icon {
    font-size: 18px;
  }

  .value-title {
    font-size: 0.95rem;
  }

  .value-level {
    font-size: 0.78rem;
  }

  .top-values-header h3 {
    font-size: 1.05rem;
  }

  .top-values-counter {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  /* Pourcentages */
  .percent-item {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }

  .percent-left {
    order: 2;
    flex: 0 0 auto;
  }

  .percent-check {
    order: 1;
    flex: 0 0 auto;
  }

  .percent-label {
    order: 3;
    flex: 1 1 100%;
    font-size: 0.95rem;
  }

  .percent-left input {
    width: 80px;
  }

  /* ---------- Qualités ---------- */
  .qualites-section h2 {
    font-size: 1.4rem;
    margin-bottom: 18px;
  }

  .qualite-item {
    padding: 12px 14px;
    gap: 12px;
  }

  .qualite-item .label {
    font-size: 0.95rem;
  }

  /* ---------- Traits ---------- */
  .traits-warning {
    padding: 14px 16px;
    margin-bottom: 22px;
    font-size: 0.9rem;
  }

  .traits-select-group {
    padding: 16px;
    border-radius: 14px;
  }

  .traits-select-header {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }

  .traits-select-header h3 {
    font-size: 1rem;
  }

  .traits-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .trait-choice {
    padding: 12px 14px;
  }

  /* ---------- Compétences ---------- */
  .competences-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .competence-card {
    padding: 12px;
  }

  .comp-card {
    padding: 14px 12px;
  }

  .top5-grid {
    gap: 8px;
  }

  .chip {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* ---------- Réalisations ---------- */
  .real-card {
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 18px;
  }

  .real-header {
    margin-bottom: 12px;
  }

  .real-header h3 {
    font-size: 1.05rem;
  }

  .real-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .real-grid .field:last-child {
    grid-column: auto;
  }

  .real-list {
    gap: 8px;
  }

  .real-item {
    padding: 11px 12px;
    font-size: 0.95rem;
  }

  .btn-add-real {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  /* ---------- Satisfactions ---------- */
  .sat-item {
    padding: 12px;
  }

  /* ---------- Conditions de travail ---------- */
  .conditions-table {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .conditions-table .table-header {
    display: none;
  }

  .conditions-table .table-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: 10px;
  }

  .conditions-table .table-row .row-label {
    padding: 0 0 8px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--bordure);
  }

  .conditions-table .table-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .conditions-table .table-cell::before {
    content: attr(data-label);
    font-size: 0.8rem;
    color: var(--gris);
    font-weight: 600;
  }

  .conditions-table .table-cell input {
    background: var(--fond);
    padding: 10px 12px;
    border-radius: 6px;
  }

  /* Résultats conditions (résumé) */
  .conditions-result-box {
    padding: 0;
  }

  .conditions-result-box .result-section {
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--bordure);
    background: var(--blanc);
  }

  /* ---------- Boutons rating (1-5) ---------- */
  .rating-container {
    gap: 6px;
  }

  .rating-btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}

/* ===========================
   AMÉLIORATIONS MOBILE — PETIT (≤ 480px)
   =========================== */
@media (max-width: 480px) {
  .site-header .tagline {
    display: none;
  }

  .choix-header h1 {
    font-size: 1.2rem;
  }

  .form-page-preview h1 {
    font-size: 1.4rem;
  }

  .preview-description {
    font-size: 0.95rem;
  }

  .form-nav .btn {
    font-size: 0.85rem;
    padding: 11px 12px;
  }

  .modal-card {
    padding: 22px 16px;
  }

  .conseiller-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .ancres-result-box h2,
  .ancres-result-box h3 {
    font-size: 1.15rem;
  }

  .qualites-section h2 {
    font-size: 1.2rem;
  }

  /* Cibles tactiles ≥ 44px */
  .sidebar-test,
  .sidebar-sousmenu-item,
  .sidebar-sous-test {
    min-height: 44px;
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

/* ===========================
   PANNEAU ADMIN
   =========================== */
.admin-bouton {
  position: fixed;
  bottom: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--bordure);
  background: var(--blanc);
  color: var(--gris);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.admin-bouton:hover,
.admin-bouton:focus {
  opacity: 1;
  color: var(--marine);
  transform: rotate(45deg);
  outline: none;
}

.admin-modale {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}

.admin-modale.open {
  display: flex;
}

.admin-modale-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.admin-modale-contenu {
  position: relative;
  background: var(--blanc);
  border-radius: 10px;
  width: 100%;
  max-width: 560px;
  padding: 28px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.admin-modale-fermer {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--gris);
  cursor: pointer;
  border-radius: 4px;
}

.admin-modale-fermer:hover {
  background: var(--fond);
  color: var(--texte);
}

.admin-vue h2 {
  color: var(--marine);
  margin-bottom: 6px;
  font-size: 22px;
}

.admin-sous-titre {
  color: var(--gris);
  margin-bottom: 18px;
  font-size: 14px;
}

#admin-form-login input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  font-size: 15px;
  margin-bottom: 10px;
}

#admin-form-login input[type="password"]:focus {
  outline: none;
  border-color: var(--marine);
}

.admin-btn-primaire {
  display: inline-block;
  background: var(--rouge);
  color: var(--blanc);
  border: none;
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.admin-btn-primaire:hover {
  background: #a93226;
}

.admin-erreur {
  color: var(--rouge);
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 6px;
}

.admin-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  /* Dégage le bouton de déconnexion du X de fermeture (absolu, à droite) */
  padding-right: 40px;
}

.admin-btn-logout {
  background: transparent;
  border: 1px solid var(--bordure);
  color: var(--gris);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.admin-btn-logout:hover {
  color: var(--rouge);
  border-color: var(--rouge);
}

.admin-section {
  border-top: 1px solid var(--bordure);
  padding-top: 16px;
  margin-top: 16px;
}

.admin-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.admin-section h3 {
  font-size: 16px;
  color: var(--marine);
  margin-bottom: 4px;
}

.admin-section-info {
  font-size: 13px;
  color: var(--gris);
  margin-bottom: 12px;
}

.admin-liste {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.admin-form-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--fond);
  border-radius: 6px;
  cursor: pointer;
}

.admin-form-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.admin-form-titre {
  font-size: 14px;
}

/* Glisser-déposer pour réordonner les listes admin */
.admin-drag-poignee {
  color: var(--gris);
  font-size: 16px;
  line-height: 1;
  cursor: grab;
  flex-shrink: 0;
  user-select: none;
}

.admin-form-item[draggable="true"],
.admin-conseiller-item[draggable="true"] {
  cursor: grab;
}

.admin-drag-en-cours {
  opacity: 0.4;
}

.admin-drag-survol {
  outline: 2px dashed var(--marine);
  outline-offset: -2px;
}

.admin-liste-conseillers {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  padding: 6px;
}

.admin-conseiller-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
}

.admin-conseiller-item:hover {
  background: var(--fond);
}

.admin-conseiller-infos {
  min-width: 0;
  flex: 1;
}

.admin-conseiller-nom {
  font-size: 14px;
  font-weight: 500;
  color: var(--texte);
}

.admin-conseiller-courriel {
  font-size: 12px;
  color: var(--gris);
}

.admin-btn-retirer {
  border: none;
  background: transparent;
  color: var(--gris);
  font-size: 22px;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

.admin-btn-retirer:hover {
  background: var(--rouge);
  color: var(--blanc);
}

.admin-ajout {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.admin-ajout input {
  padding: 8px 10px;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  font-size: 13px;
  min-width: 0;
}

.admin-ajout input:focus {
  outline: none;
  border-color: var(--marine);
}

.admin-ajout button {
  background: var(--marine);
  color: var(--blanc);
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.admin-ajout button:hover {
  background: #1f2d3d;
}

.admin-mdp-grille {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-mdp-grille input {
  padding: 8px 10px;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  font-size: 13px;
}

.admin-mdp-grille input:focus {
  outline: none;
  border-color: var(--marine);
}

.admin-mdp-grille button {
  align-self: flex-start;
  background: var(--marine);
  color: var(--blanc);
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.admin-mdp-grille button:hover {
  background: #1f2d3d;
}

.admin-actions {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--bordure);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-statut {
  font-size: 13px;
  color: var(--gris);
}

.admin-statut--ok {
  color: #27ae60;
  font-weight: 600;
}

.admin-statut--erreur {
  color: var(--rouge);
  font-weight: 600;
}

.admin-vide {
  font-size: 13px;
  color: var(--gris);
  padding: 8px 4px;
}

@media (max-width: 600px) {
  .admin-modale {
    padding: 12px;
  }

  .admin-modale-contenu {
    padding: 20px 16px;
  }

  .admin-ajout {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions .admin-btn-primaire {
    width: 100%;
  }
}