/* ============================================================
   IRN — design système aligné sur CSF2
   Palette / typographie / espacement / cartes / boutons
   ============================================================ */

:root {
  /* Couleurs */
  --blue-50:        #eaf1fb;
  --blue-100:       #dbeafe;
  --blue-400:       #2189f8;
  --blue-500:       #0073e6;
  --blue-600:       #1360ae;
  --navy:           #00005c;
  --navy-light:     #00004b;

  --green-50:       #e6f0e4;
  --green-500:      #4aa82d;
  --green-700:      #2e7d32;
  --red-50:         #fef2f2;
  --red-400:        #ff6467;
  --red-800:        #9f0712;
  --orange-50:      #fefaf6;
  --orange-400:     #fb892d;
  --orange-800:     #853200;
  --yellow-50:      #fefce8;
  --yellow-400:     #facc15;
  --yellow-800:     #854d0e;
  --teal-50:        #f0fdfa;
  --teal-400:       #00d5be;
  --teal-800:       #005f5a;

  --text-default:   #2f313c;
  --text-title:     #00004b;
  --text-secondary: #63697b;
  --text-subtle:    #494e5f;
  --text-muted:     #9da9bd;
  --text-dark:      #181d27;
  --green-dark:     #2e7d32;

  --border-default: #e7eaef;
  --border-subtle:  #e5e7eb;
  --border-light:   #f2f2f3;
  --layer-white:    #ffffff;
  --layer-subtle:   #f3f5f7;
  --surface-subtle: #f5f5f5;
  --slate-400:      #90a1b9;

  --shadow-xs: 0px 1px 2px 0px rgba(20, 34, 38, 0.05);
  --shadow-md: 0px 2px 4px -2px rgba(20, 34, 38, 0.06), 0px 4px 8px -2px rgba(20, 34, 38, 0.1);
  --shadow-lg: 0px 8px 24px -4px rgba(20, 34, 38, 0.12);

  /* Espacement */
  --header-height:  72px;
  --side-padding:   120px;
  --sidebar-width:  316px;
  --gap:            40px;
  --radius:         8px;
  --radius-sm:      6px;

  --font: 'Raleway', Verdana, Arial, Helvetica, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: var(--font);
  color: var(--text-default);
  background: #f8f9fb;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'lnum' 1, 'pnum' 1;
  font-size: 14px;
  line-height: 1.5;
}

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

:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ============================================================
   HEADER  (navy — pour rendre visible le logo blanc Atos)
   ============================================================ */
.header {
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1440px;
  height: var(--header-height);
  margin: 0 auto;
  padding: 16px var(--side-padding);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.atos-logo {
  display: block;
  width: 94px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}

.header-separator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.header-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header-title-main {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: var(--layer-white);
  letter-spacing: -0.1px;
}

.header-title-sub {
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  border: 1px solid transparent;
  background: var(--layer-white);
  color: var(--text-title);
  transition: opacity 0.15s, transform 0.05s;
  text-decoration: none;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-secondary {
  background: var(--layer-white);
  color: var(--text-title);
  border-color: var(--border-default);
}

.btn-primary {
  background: var(--blue-500);
  color: var(--layer-white);
  border-color: rgba(0, 0, 0, 0.08);
}

.btn-warn {
  background: var(--layer-white);
  color: var(--red-800);
  border-color: var(--red-400);
}

.btn-icon-only {
  width: 32px;
  padding: 0;
}

/* Boutons sur header foncé : variante translucide */
.header-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--layer-white);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}
.header-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}
.header-actions .btn-primary {
  border-color: transparent;
}

/* Bouton langue (dans le header) : chevron rotate quand ouvert */
#irn-lang-btn svg {
  transition: transform 0.18s ease;
}
#irn-lang-btn.open svg {
  transform: rotate(180deg);
}

/* Language dropdown (popover sous le bouton FR/EN) */
.language-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 130px;
  background: var(--layer-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.language-dropdown.open { display: flex; }

.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--text-default);
  text-align: left;
  transition: background-color 0.12s, color 0.12s;
}
.language-option:hover { background: var(--blue-50); }
.language-option.active {
  background: var(--blue-500);
  color: var(--layer-white);
}
.language-text { flex: 1; }

/* ============================================================
   MAIN CONTAINER
   ============================================================ */
.main-container {
  position: relative;
  min-height: calc(100vh - var(--header-height));
}

.intro-section {
  padding: 40px var(--side-padding) 0;
  max-width: 1440px;
  margin: 0 auto;
}

.intro-container { max-width: 800px; }

.intro-title {
  font-family: var(--font);
  font-size: 32px;
  font-weight: 675;
  line-height: 40px;
  color: var(--navy-light);
  margin: 0 0 16px;
  letter-spacing: -0.4px;
}

.intro-description {
  font-size: 16px;
  font-weight: 550;
  line-height: 24px;
  color: var(--text-default);
  max-width: 720px;
}

.content-wrapper {
  display: flex;
  gap: var(--gap);
  padding: 32px var(--side-padding);
  max-width: 1440px;
  margin: 0 auto;
  align-items: flex-start;
}

/* ============================================================
   SIDEBAR (sticky)
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: calc(var(--header-height) + 32px);
  align-self: flex-start;
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 20px;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar > * {
  flex-shrink: 0;
}

.card {
  background: var(--layer-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: var(--text-title);
}

.card-description {
  font-size: 13px;
  font-weight: 400;
  line-height: 19px;
  color: var(--text-subtle);
  margin-top: 12px;
}

/* Privacy Notice Card */
.privacy-card {
  background: var(--layer-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
}

.privacy-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.privacy-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.privacy-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  color: var(--text-title);
  margin: 0;
}

.privacy-body {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--text-subtle);
  margin: 0;
  padding-left: 26px; /* 16px icon + 10px gap */
}

/* CTA Card */
.cta-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    url('assets/call_center.jpg') 90% center / cover no-repeat,
    var(--navy);
  box-shadow: var(--shadow-md);
}
.cta-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 92, 0.4) 0%, #00005c 78%);
  z-index: 1;
}
.cta-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
  padding: 4px 12px 4px 4px;
  width: fit-content;
  color: white;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
}
.cta-dot-outer {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(16, 97, 0, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cta-dot-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7aea57;
  box-shadow: 0 0 6px rgba(122, 234, 87, 0.7);
}
.cta-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cta-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: white;
  margin: 0;
  letter-spacing: -0.2px;
  max-width: 270px;
}
.cta-steps {
  display: flex;
  flex-direction: column;
}
.cta-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.cta-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.cta-step-line {
  display: flex;
  align-items: center;
  padding-left: 11px;
  height: 18px;
}
.cta-vline {
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  width: 100%;
  padding: 10px 16px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  color: var(--text-title);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
  letter-spacing: -0.1px;
}
.btn-cta:hover { opacity: 0.92; }
.btn-cta:active { transform: translateY(1px); }
.btn-cta svg {
  width: 18px;
  height: 18px;
  transition: transform 0.15s ease;
}
.btn-cta:hover svg {
  transform: translateX(2px);
}

/* Score card avec gauge */
.score-card .score-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
}

.gauge-container {
  position: relative;
  width: 132px;
  height: 132px;
  flex-shrink: 0;
}
.gauge-container canvas {
  width: 100% !important;
  height: 100% !important;
}
.gauge-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.gauge-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-dark);
  letter-spacing: -1px;
}
.gauge-max {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.score-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.score-level-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  color: var(--text-dark);
  word-break: break-word;
}
.score-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.score-completion {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 500;
}

/* Radar card */
.radar-card { display: flex; flex-direction: column; gap: 16px; }
.radar-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.radar-container canvas { max-width: 100%; max-height: 100%; }

/* Save indicator card */
.save-card {
  background: var(--layer-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.save-card-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-500);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--green-50);
}

/* ============================================================
   MAIN CONTENT — sections + cartes
   ============================================================ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.section-card {
  background: var(--layer-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-title);
  line-height: 24px;
  letter-spacing: -0.2px;
}

.section-help {
  font-size: 13px;
  color: var(--text-subtle);
  margin-top: -8px;
  margin-bottom: 16px;
  line-height: 20px;
}

/* Formulaire système */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field-full { grid-column: 1 / -1; }
.form-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.2px;
}
.form-field input,
.form-field select,
.form-field textarea,
input, textarea, select {
  font-family: var(--font);
  font-size: 14px;
  padding: 8px 12px;
  height: 36px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--layer-white);
  color: var(--text-default);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
textarea {
  height: auto;
  min-height: 60px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.15);
}

/* Méta-critères */
.meta-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.meta-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  background: var(--layer-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.meta-row:hover { border-color: var(--blue-100); }

.meta-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.meta-id {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 9999px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.meta-titre {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-default);
  line-height: 20px;
}
.meta-info {
  cursor: help;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* Toggle OUI / NON (segment) */
.meta-radio-group {
  display: inline-flex;
  background: var(--layer-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 2px;
  flex-shrink: 0;
}
.meta-radio-group input[type="radio"] { display: none; }
.pill-label {
  cursor: pointer;
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text-subtle);
  transition: all 0.15s;
  user-select: none;
}
.pill-label:hover { color: var(--text-default); }
.meta-radio-group input[type="radio"]:checked + .pill-yes {
  background: var(--green-500);
  color: var(--layer-white);
}
.meta-radio-group input[type="radio"]:checked + .pill-no {
  background: var(--red-400);
  color: var(--layer-white);
}

.meta-select {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

/* ============================================================
   ACCORDÉONS PILIERS
   ============================================================ */
.pilier {
  background: var(--layer-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: border-color 0.15s;
}
.pilier:hover { border-color: var(--blue-100); }
.pilier[open] { border-color: var(--border-default); }

.pilier-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  gap: 12px;
}
.pilier-summary::-webkit-details-marker { display: none; }
.pilier-summary::before {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--blue-500);
  border-bottom: 2px solid var(--blue-500);
  transform: rotate(-45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-right: 4px;
}
.pilier[open] .pilier-summary::before {
  transform: rotate(45deg);
}

.pilier-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.pilier-code {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 9999px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.pilier-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-light);
  line-height: 22px;
}
.pilier-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-subtle);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.15s;
}

.pilier-body {
  border-top: 1px solid var(--border-light);
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fafbfc;
}

/* ============================================================
   CARTE CRITÈRE
   ============================================================ */
.critere-card {
  background: var(--layer-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  transition: border-color 0.2s;
}
.critere-card:hover { border-color: var(--border-default); }
.critere-card.is-answered { border-left: 3px solid var(--green-500); }

.critere-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.critere-id {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 9999px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.critere-title {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  color: var(--text-title);
  line-height: 21px;
  min-width: 200px;
}
.critere-priorite {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  border: 1px solid;
}
.priorite-essentiel  { background: var(--blue-50);  color: var(--blue-600);   border-color: var(--blue-100); }
.priorite-important  { background: var(--orange-50); color: var(--orange-800); border-color: var(--orange-400); }
.priorite-meta       { background: var(--surface-subtle); color: var(--navy-light); border-color: var(--border-default); }

.critere-objectif {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-subtle);
  line-height: 19px;
}

/* Pistes d'évaluation — encart gris */
.pistes {
  background: var(--layer-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 12px 0;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pistes-titre {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 2px;
}
.piste {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: start;
  padding-top: 8px;
  border-top: 1px dashed var(--border-default);
}
.piste:first-of-type { padding-top: 0; border-top: none; }
.piste-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.2px;
  border: 1px solid;
  white-space: nowrap;
}
.piste-1 .piste-tag { background: var(--blue-50);    color: var(--blue-600);   border-color: var(--blue-100); }
.piste-3 .piste-tag { background: var(--yellow-50);  color: var(--yellow-800); border-color: var(--yellow-400); }
.piste-5 .piste-tag { background: var(--teal-50);    color: var(--teal-800);   border-color: var(--teal-400); }
.piste-text {
  color: var(--text-default);
  line-height: 18px;
}

/* Notation 0/1/3/5 — segments style CSF2 */
.notation { margin: 14px 0 6px; }
.notation-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.notation-grp {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  overflow: hidden;
}
.notation-grp input[type="radio"] { display: none; }
.note-pill {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--layer-white);
  border-right: 1px solid var(--border-default);
  transition: all 0.12s;
  user-select: none;
}
.note-pill:last-child { border-right: none; }
.note-pill:hover { background: var(--blue-50); }

.note-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  letter-spacing: -0.5px;
}
.note-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1px;
}
.notation-grp input[type="radio"]:checked + .note-pill {
  background: var(--blue-500);
}
.notation-grp input[type="radio"]:checked + .note-pill .note-num,
.notation-grp input[type="radio"]:checked + .note-pill .note-lbl {
  color: var(--layer-white);
}

/* Champs commentaire / preuves */
.critere-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.field-wrap { display: flex; flex-direction: column; gap: 4px; }
.field-wrap label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field-wrap textarea {
  font-size: 13px;
  min-height: 56px;
}

/* Réfs réglementaires */
.critere-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-default);
}
.refs-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-right: 4px;
}
.ref-badge {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 9999px;
  background: var(--surface-subtle);
  color: var(--text-subtle);
  font-weight: 700;
  border: 1px solid var(--border-default);
}

/* ============================================================
   MODALE
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 75, 0.55);
  backdrop-filter: blur(2px);
}
.modal-box {
  position: relative;
  background: var(--layer-white);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 480px;
  width: calc(100% - 32px);
  box-shadow: var(--shadow-lg);
  z-index: 1;
}
.modal-box h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--red-800);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-box p {
  margin: 0 0 24px;
  color: var(--text-default);
  font-size: 14px;
  line-height: 21px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--layer-white);
  border-top: 1px solid var(--border-default);
  margin-top: 60px;
  padding: 24px 0 32px;
}
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--side-padding);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  font-size: 12px;
  color: var(--text-subtle);
}
.footer-left { display: flex; flex-direction: column; gap: 6px; }
.footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
.footer-right a { color: var(--blue-600); font-weight: 600; }
.footer-bottom {
  grid-column: 1 / -1;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}
.privacy-line {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green-700);
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  :root { --side-padding: 40px; }
}
@media (max-width: 960px) {
  :root { --side-padding: 24px; }
  .content-wrapper { flex-direction: column; }
  .sidebar {
    width: 100%;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    max-height: none;
    overflow-y: visible;
    padding-bottom: 0;
  }
  .sidebar > .card { flex: 1; min-width: 280px; }
  .save-card { flex-basis: 100%; }
}
@media (max-width: 768px) {
  .header-inner { padding: 12px 16px; height: 60px; }
  :root { --header-height: 60px; }
  .atos-logo { width: 72px; height: 24px; }
  .header-title-main { font-size: 14px; }
  .header-title-sub { display: none; }
  .header-separator { height: 20px; }
  .header-actions .btn span { display: none; }
  .header-actions .btn-icon-only,
  .header-actions .btn { width: 32px; padding: 0; }

  .intro-section { padding: 24px 16px 0; }
  .intro-title { font-size: 24px; line-height: 30px; }
  .intro-description { font-size: 14px; line-height: 21px; }
  .content-wrapper { padding: 20px 16px; gap: 20px; }

  .form-grid,
  .critere-fields,
  .footer-inner { grid-template-columns: 1fr; }

  .piste { grid-template-columns: 1fr; gap: 4px; }
  .piste-tag { justify-self: start; }

  .meta-row { grid-template-columns: 1fr; }
  .pilier-summary { padding: 12px 14px; }
  .pilier-body { padding: 12px 14px; }
  .critere-card { padding: 14px; }
}

/* ============================================================
   Contact Drawer — Lead generation form
   ============================================================ */

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0000008f;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 90vw;
  height: 100vh;
  background: var(--layer-white);
  box-shadow: -8px 0 24px rgba(20, 34, 38, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 1001;
}

.drawer-overlay.active .drawer {
  transform: translateX(0);
}

.drawer-header {
  position: sticky;
  top: 0;
  background: var(--layer-white);
  padding: 24px 32px 16px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  z-index: 1;
}

.drawer-close {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--layer-subtle);
  border-radius: 8px;
  color: var(--text-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.drawer-close.btn {
  width: auto;
  height: 32px;
  padding: 6px 12px;
  border-radius: 6px;
}

.drawer-close:hover {
  background: var(--border-default);
  color: var(--text-default);
}

.drawer-close.btn:hover {
  opacity: 0.85;
  background: var(--border-default);
}

.drawer-content {
  padding: 24px 32px 40px;
}

.drawer-title {
  margin-bottom: 32px;
}

.drawer-title h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-title);
  margin: 0 0 12px 0;
}

.drawer-title p {
  font-size: 16px;
  color: var(--text-subtle);
  margin: 0;
  line-height: 1.5;
}

.drawer-note {
  background: var(--layer-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.drawer-note p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-default);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  height: auto; /* override global height: 36px */
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-default);
  background: var(--layer-white);
  transition: all 0.2s ease;
  font-family: 'Raleway', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(1, 115, 230, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Custom select appearance */
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%2300004b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.form-group select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-group select option[value=''] {
  color: var(--text-subtle);
}

/* ============================================================
   CUSTOM SEARCHABLE LOCATION SELECT
   ============================================================ */
.csf-location-select {
  position: relative;
}

.csf-location-search {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--text-default);
  background: var(--layer-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font);
  cursor: pointer;
  box-sizing: border-box;
}

.csf-location-search:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.1);
  cursor: text;
}

.csf-location-search::placeholder {
  color: var(--text-subtle);
}

.csf-location-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.csf-location-select.open .csf-location-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* Loupe quand le dropdown est ouvert */
.csf-location-select.is-searching .csf-location-arrow {
  opacity: 0;
}

.csf-location-select.is-searching::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
}

.csf-location-select.is-searching .csf-location-search {
  padding-left: 38px;
}

/* Bouton × effacer */
.csf-location-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-subtle);
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
  z-index: 1;
  touch-action: manipulation;
}

.csf-location-clear::after {
  content: '';
  position: absolute;
  inset: -8px;
}

.csf-location-clear svg {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
}

.csf-location-clear:hover {
  background: #f3f4f6;
  color: var(--text-default);
}

.csf-location-select.has-value .csf-location-clear,
.csf-location-select.is-typing .csf-location-clear {
  display: flex;
}

.csf-location-select.has-value .csf-location-arrow,
.csf-location-select.is-typing .csf-location-arrow {
  display: none;
}

.csf-location-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--layer-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 200;
}

@media (max-width: 600px) {
  .csf-location-dropdown {
    max-height: 40dvh;
  }
}

.csf-location-select.open .csf-location-dropdown {
  display: block;
}

.csf-location-item {
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-default);
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s ease;
  display: block;
  touch-action: manipulation;
  min-height: 44px;
}

.csf-location-item:hover,
.csf-location-item:focus {
  background: var(--blue-50);
  outline: none;
}

.csf-location-item--selected {
  background: var(--blue-50);
  color: var(--blue-500);
  font-weight: 600;
}

.csf-location-no-results {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-subtle);
  font-family: var(--font);
  text-align: center;
}

/* États de validation */
.csf-form-group.csf-error .csf-location-search {
  border-color: var(--red-400);
  box-shadow: 0 0 0 3px rgba(255, 100, 103, 0.1);
}

.csf-form-group.csf-success .csf-location-search {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(74, 168, 45, 0.1);
}

/* Cacher les icônes de validation sur le custom select (la zone est occupée) */
.csf-form-group:has(#contactLocationWrapper) .csf-validation-icon {
  display: none;
}

.char-counter {
  font-size: 13px;
  color: var(--text-subtle);
  font-weight: 500;
  flex-shrink: 0;
  align-self: flex-end;
}

.form-attachment {
  background: var(--layer-subtle);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-light);
}

.attachment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.attachment-option input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue-500);
}

.attachment-option label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-default);
  cursor: pointer;
}

.evaluation-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--layer-white);
  border-radius: 8px;
  border: 1px solid var(--border-default);
}

.eval-icon {
  position: relative;
  width: 40px;
  height: 40px;
}

.eval-icon svg {
  transform: rotate(-90deg);
}

.eval-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eval-text span {
  font-size: 14px;
  color: var(--text-subtle);
}

.eval-text strong {
  font-size: 16px;
  font-weight: 600;
  color: var(--blue-600);
}

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  background: var(--blue-500);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Raleway', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.btn-submit:hover {
  background: var(--blue-600);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  background: var(--slate-400);
  color: rgba(255, 255, 255, 0.7);
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.btn-submit:disabled:hover {
  background: var(--slate-400);
  transform: none;
}

.csf-form-group.csf-error input,
.csf-form-group.csf-error textarea,
.csf-form-group.csf-error select {
  border-color: var(--red-400);
  box-shadow: 0 0 0 3px rgba(255, 100, 103, 0.1);
}

.csf-form-group.csf-success input,
.csf-form-group.csf-success textarea,
.csf-form-group.csf-success select {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(74, 168, 45, 0.1);
}

.contact-message-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-top: 6px;
  min-height: 20px;
}

.csf-validation-message {
  display: flex;
  font-size: 14px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 500;
  animation: csf-fadeInUp 0.2s ease;
  flex: 1;
  min-width: 0;
}

.csf-validation-message.csf-error {
  color: var(--red-800);
  background: var(--red-50);
  border: 1px solid rgba(255, 100, 103, 0.2);
}

.csf-validation-message.csf-success {
  color: var(--green-dark);
  background: var(--green-50);
  border: 1px solid rgba(74, 168, 45, 0.2);
}

.csf-validation-icon {
  position: absolute;
  right: 12px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.csf-validation-icon.csf-error-icon {
  top: 41%;
}

.csf-validation-icon.csf-success-icon {
  top: 51%;
}

/* Pour le select : pas d'icône de validation (la flèche occupe la zone) */
.csf-form-group:has(select) .csf-validation-icon {
  display: none;
}

.csf-form-group {
  position: relative;
}

.csf-form-group.csf-error .csf-validation-icon.csf-error-icon,
.csf-form-group.csf-success .csf-validation-icon.csf-success-icon {
  opacity: 1;
}

@keyframes csf-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .drawer {
    width: 100%;
    max-width: 100vw;
  }

  .drawer-content {
    padding: 20px 24px 32px;
  }

  .drawer-title h2 {
    font-size: 24px;
  }
}

@media print {
  .header-actions, .header, #footer, .save-card { display: none; }
  .pilier { break-inside: avoid; }
  .content-wrapper { padding: 0; }
}
