* {
      box-sizing: border-box;
    }

    body {
      font-family: sans-serif;
      margin: 0 auto;
      padding: 20px;
      max-width: 960px;
      background: #f5f5f5;
    }

    h1 {
      margin-bottom: 0;
    }

    /* ── Onglets ── */
    .tabs {
      display: flex;
      gap: 4px;
      margin: 20px 0 0 0;
    }

    .tab-btn {
      padding: 10px 22px;
      border: 1px solid #ccc;
      border-bottom: none;
      background: #e8e8e8;
      cursor: pointer;
      border-radius: 6px 6px 0 0;
      font-size: 1em;
    }

    .tab-btn.active {
      background: #fff;
      font-weight: bold;
      border-color: #bbb;
    }

    .tab-content {
      display: none;
      background: #fff;
      border: 1px solid #bbb;
      border-radius: 0 6px 6px 6px;
      padding: 24px;
    }

    .tab-content.active {
      display: block;
    }

    /* ── Formulaires communs ── */
    label {
      font-weight: bold;
      display: block;
      margin-bottom: 4px;
    }

    textarea,
    input[type="text"],
    select {
      width: 100%;
      padding: 8px 10px;
      border: 1px solid #ccc;
      border-radius: 4px;
      font-size: 1em;
      background: #fff;
    }

    .field {
      margin-bottom: 16px;
    }

    .field-row {
      display: flex;
      gap: 16px;
    }

    .field-row .field {
      flex: 1;
    }

    button[type="submit"] {
      background: #1a6e3c;
      color: #fff;
      border: none;
      padding: 10px 28px;
      border-radius: 5px;
      font-size: 1em;
      cursor: pointer;
    }

    button[type="submit"]:disabled {
      background: #999;
      cursor: default;
    }

    .checkbox-group {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 24px;
      margin-top: 6px;
    }

    .chk-label {
      display: flex;
      align-items: center;
      gap: 7px;
      font-weight: normal;
      cursor: pointer;
      font-size: .95em;
    }

    .chk-label input[type="checkbox"] {
      width: 16px;
      height: 16px;
      cursor: pointer;
      accent-color: #1a6e3c;
    }

    /* ── Résultats CV ── */
    .result-item {
      border: 1px solid #ccc;
      padding: 16px;
      margin-bottom: 16px;
      border-radius: 8px;
      background: #fff;
    }

    .result-item h4 {
      margin: 0 0 12px 0;
      font-size: 1.1em;
    }

    .score {
      font-size: 1.6em;
      font-weight: bold;
    }

    .score-high {
      color: #1a6e3c;
    }

    .score-mid {
      color: #d08000;
    }

    .score-low {
      color: #c0392b;
    }

    .section-label {
      font-weight: bold;
      margin: 12px 0 4px 0;
    }

    .result-item ul {
      margin: 4px 0 0 0;
      padding-left: 20px;
    }

    .result-item li {
      margin-bottom: 3px;
    }

    .summary {
      background: #f9f9f9;
      padding: 8px 12px;
      border-left: 3px solid #aaa;
      border-radius: 3px;
    }

    /* ── Stepper de progression ── */
    .steps-card {
      background: #fff;
      border: 1px solid #bbb;
      border-radius: 10px;
      padding: 28px 32px;
      margin-top: 20px;
    }

    .steps-card h3 {
      margin: 0 0 24px 0;
      font-size: 1em;
      color: #555;
      text-transform: uppercase;
      letter-spacing: .05em;
    }

    .step-row {
      display: flex;
      align-items: stretch;
      margin-bottom: 4px;
    }

    .step-left {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 36px;
      flex-shrink: 0;
    }

    .step-circle {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 2px solid #d0d0d0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: .85em;
      font-weight: bold;
      color: #bbb;
      background: #f8f8f8;
      flex-shrink: 0;
      transition: all .35s ease;
    }

    .step-circle.active {
      border-color: #2a6ea6;
      background: #2a6ea6;
      color: #fff;
      animation: pulse-ring .9s ease-in-out infinite;
    }

    .step-circle.done {
      border-color: #1a6e3c;
      background: #1a6e3c;
      color: #fff;
      animation: none;
    }

    @keyframes pulse-ring {
      0% {
        box-shadow: 0 0 0 0 rgba(42, 110, 166, .35);
      }

      70% {
        box-shadow: 0 0 0 8px rgba(42, 110, 166, 0);
      }

      100% {
        box-shadow: 0 0 0 0 rgba(42, 110, 166, 0);
      }
    }

    .step-line {
      width: 2px;
      background: #e0e0e0;
      flex: 1;
      min-height: 12px;
      margin: 2px 0;
      transition: background .35s;
    }

    .step-line.done {
      background: #1a6e3c;
    }

    .step-body {
      padding: 4px 0 16px 16px;
      flex: 1;
    }

    .step-title {
      font-size: .95em;
      color: #bbb;
      font-weight: 500;
      transition: color .35s;
      line-height: 1.8;
    }

    .step-title.active {
      color: #1a3a6e;
      font-weight: bold;
    }

    .step-title.done {
      color: #1a6e3c;
    }

    .substep-list {
      margin: 6px 0 0 0;
      padding: 0;
      list-style: none;
    }

    .substep-item {
      font-size: .85em;
      color: #555;
      padding: 3px 0 3px 12px;
      border-left: 2px solid #c8dff0;
      margin-bottom: 2px;
      animation: fade-in .3s ease;
    }

    @keyframes fade-in {
      from {
        opacity: 0;
        transform: translateY(-4px);
      }

      to {
        opacity: 1;
        transform: none;
      }
    }

    /* ── Fiche Prospect ── */
    .prospect-card {
      border: 1px solid #bbb;
      border-radius: 10px;
      overflow: hidden;
      background: #fff;
      margin-top: 20px;
    }

    .prospect-header {
      background: linear-gradient(135deg, #1a3a6e, #2a6ea6);
      color: #fff;
      padding: 20px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .prospect-header h2 {
      margin: 0;
      font-size: 1.4em;
    }

    .prospect-header .secteur {
      opacity: .8;
      font-size: .95em;
      margin-top: 4px;
    }

    .score-badge {
      border-radius: 50%;
      width: 70px;
      height: 70px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-weight: bold;
      background: rgba(255, 255, 255, .15);
      border: 2px solid rgba(255, 255, 255, .4);
    }

    .score-badge .num {
      font-size: 1.7em;
      line-height: 1;
    }

    .score-badge .lbl {
      font-size: .6em;
      text-transform: uppercase;
      opacity: .8;
    }

    .score-justif {
      background: rgba(255, 255, 255, .12);
      border-left: 3px solid rgba(255, 255, 255, .4);
      margin: 12px 24px 0;
      padding: 8px 14px;
      font-size: .88em;
      line-height: 1.5;
      color: rgba(255, 255, 255, .9);
      border-radius: 0 4px 4px 0;
    }

    .prospect-body {
      padding: 0 24px 24px;
    }

    .prospect-description {
      background: #f0f4f8;
      padding: 12px 16px;
      border-radius: 6px;
      margin: 16px 0;
      line-height: 1.5;
    }

    .prospect-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
      margin-top: 16px;
    }

    .info-block {
      background: #f9f9f9;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      padding: 14px 16px;
    }

    .info-block h3 {
      margin: 0 0 8px 0;
      font-size: .85em;
      color: #666;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .info-block .val {
      font-size: 1.05em;
      font-weight: bold;
      color: #1a3a6e;
    }

    .info-block .sub {
      font-size: .88em;
      color: #555;
      margin-top: 3px;
    }

    .info-block .src {
      font-size: .78em;
      color: #999;
      margin-top: 6px;
      font-style: italic;
    }

    .full-block {
      grid-column: 1 / -1;
      background: #f9f9f9;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      padding: 14px 16px;
    }

    .full-block h3 {
      margin: 0 0 10px 0;
      font-size: .85em;
      color: #666;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .tag-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .tag {
      background: #dde8f5;
      color: #1a3a6e;
      padding: 3px 10px;
      border-radius: 20px;
      font-size: .85em;
      font-weight: 500;
    }

    .job-list {
      list-style: none;
      margin: 4px 0 0 0;
      padding: 0;
    }

    .job-list li {
      border-left: 3px solid #2a6ea6;
      padding: 6px 10px;
      margin-bottom: 8px;
      background: #f0f4f8;
      border-radius: 0 4px 4px 0;
    }

    .job-title {
      font-weight: bold;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .repub-badge {
      font-size: .72em;
      font-weight: 600;
      background: #fff3cd;
      color: #856404;
      border: 1px solid #ffc107;
      border-radius: 10px;
      padding: 1px 8px;
      white-space: nowrap;
    }

    .job-meta {
      font-size: .85em;
      color: #555;
      margin-top: 2px;
    }

    .job-url {
      font-size: .82em;
      margin-top: 2px;
    }

    .news-list {
      list-style: none;
      margin: 4px 0 0 0;
      padding: 0;
    }

    .news-list li {
      border-bottom: 1px solid #eee;
      padding: 8px 0;
    }

    .news-list li:last-child {
      border-bottom: none;
    }

    .news-title {
      font-weight: bold;
      font-size: .95em;
    }

    .news-date {
      font-size: .8em;
      color: #888;
    }

    .news-resume {
      font-size: .9em;
      color: #444;
      margin-top: 3px;
    }

    .contacts-list {
      list-style: none;
      margin: 4px 0 0 0;
      padding: 0;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .contact-chip {
      background: #fff;
      border: 1px solid #ccc;
      border-radius: 20px;
      padding: 5px 14px;
      font-size: .9em;
    }

    .contact-chip strong {
      color: #1a3a6e;
    }

    .points-list {
      margin: 4px 0 0 0;
      padding-left: 20px;
    }

    .points-list li {
      margin-bottom: 6px;
      line-height: 1.45;
    }

    .opportunites-list {
      margin: 4px 0 0 0;
      padding-left: 0;
      list-style: none;
    }

    .opportunites-list li {
      padding: 5px 0 5px 22px;
      position: relative;
      border-bottom: 1px solid #eee;
    }

    .opportunites-list li::before {
      content: "→";
      position: absolute;
      left: 0;
      color: #1a6e3c;
      font-weight: bold;
    }

    .prospect-footer {
      padding: 16px 24px;
      border-top: 1px solid #e0e0e0;
      text-align: right;
      background: #fafafa;
    }

    .btn-proposition {
      background: #2a6ea6;
      color: #fff;
      border: none;
      padding: 10px 22px;
      border-radius: 5px;
      cursor: pointer;
      font-size: .95em;
      font-weight: 500;
    }

    .btn-proposition:hover {
      background: #235d8e;
    }

    .btn-proposition:disabled {
      background: #999;
      cursor: default;
    }

    /* ── Document Proposition commerciale ── */
    .proposition-doc {
      border: 1px solid #bbb;
      border-radius: 10px;
      overflow: hidden;
      background: #fff;
      margin-top: 16px;
    }

    .proposition-header {
      background: #1a3a6e;
      color: #fff;
      padding: 16px 22px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .proposition-header h3 {
      margin: 0;
      font-size: 1.05em;
    }

    .proposition-section {
      padding: 16px 22px;
      border-bottom: 1px solid #eee;
    }

    .proposition-section:last-child {
      border-bottom: none;
    }

    .prop-section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }

    .prop-section-title {
      font-size: .82em;
      font-weight: bold;
      color: #666;
      text-transform: uppercase;
      letter-spacing: .05em;
    }

    .copy-btn {
      font-size: .78em;
      background: #fff;
      border: 1px solid #ccc;
      border-radius: 4px;
      padding: 3px 10px;
      cursor: pointer;
      color: #555;
      transition: all .15s;
    }

    .copy-btn:hover {
      background: #f0f0f0;
      border-color: #999;
    }

    .copy-btn.copied {
      color: #1a6e3c;
      border-color: #1a6e3c;
      background: #f0faf4;
    }

    .prop-content {
      background: #f9f9f9;
      border-radius: 5px;
      padding: 12px 14px;
      font-size: .91em;
      line-height: 1.65;
      white-space: pre-wrap;
      font-family: inherit;
    }

    .prop-objet {
      font-size: 1em;
      font-weight: bold;
      color: #1a3a6e;
      background: #f0f4f8;
      padding: 10px 14px;
      border-radius: 5px;
      border-left: 3px solid #2a6ea6;
    }

    .prop-list {
      margin: 0;
      padding-left: 20px;
    }

    .prop-list li {
      margin-bottom: 7px;
      line-height: 1.45;
      font-size: .92em;
    }

    .prop-ol {
      margin: 0;
      padding-left: 20px;
    }

    .prop-ol li {
      margin-bottom: 7px;
      line-height: 1.45;
      font-size: .92em;
    }

    .prop-loading {
      color: #666;
      font-style: italic;
      padding: 16px 0;
      text-align: center;
    }

    /* ── Onglet Recherche d'entreprises ── */
    .search-resume {
      font-size: .9em;
      color: #555;
      font-style: italic;
      margin-bottom: 16px;
      padding: 8px 12px;
      background: #f0f4f8;
      border-radius: 4px;
    }

    .research-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
      gap: 14px;
      margin-top: 4px;
    }

    .rcard {
      border: 1px solid #ddd;
      border-radius: 8px;
      overflow: hidden;
      background: #fff;
      display: flex;
      flex-direction: column;
      transition: box-shadow .2s;
    }

    .rcard:hover {
      box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
    }

    .rcard-header {
      padding: 14px 16px 10px;
      border-bottom: 1px solid #eee;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
    }

    .rcard-name {
      font-weight: bold;
      font-size: 1em;
      color: #1a3a6e;
    }

    .rcard-meta {
      font-size: .82em;
      color: #666;
      margin-top: 3px;
    }

    .rcard-score {
      font-size: .85em;
      font-weight: bold;
      white-space: nowrap;
      padding: 3px 10px;
      border-radius: 12px;
      align-self: flex-start;
    }

    .rcard-score.high {
      background: #d4edda;
      color: #155724;
    }

    .rcard-score.mid {
      background: #fff3cd;
      color: #856404;
    }

    .rcard-score.low {
      background: #fdecea;
      color: #721c24;
    }

    .rcard-body {
      padding: 12px 16px;
      flex: 1;
    }

    .rcard-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      margin-bottom: 10px;
    }

    .rpill {
      font-size: .75em;
      padding: 2px 9px;
      border-radius: 10px;
      font-weight: 500;
    }

    .rpill.up {
      background: #d4edda;
      color: #155724;
    }

    .rpill.neutral {
      background: #e8e8e8;
      color: #555;
    }

    .rpill.yes {
      background: #cce5ff;
      color: #004085;
    }

    .rcard-why {
      font-size: .85em;
      color: #444;
      line-height: 1.45;
    }

    .rcard-footer {
      padding: 10px 16px;
      border-top: 1px solid #eee;
    }

    .btn-analyser {
      width: 100%;
      padding: 8px;
      background: #1a6e3c;
      color: #fff;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: .9em;
      font-weight: 500;
    }

    .btn-analyser:hover {
      background: #155a30;
    }

    .error-box {
      background: #fdecea;
      border: 1px solid #f5c6cb;
      color: #721c24;
      padding: 12px 16px;
      border-radius: 6px;
      margin-top: 16px;
    }

    #prospect-result,
    #recherche-result {
      margin-top: 0;
    }

    /* ── Switches ── */
    .switch {
      position: relative;
      display: inline-block;
      width: 40px;
      height: 22px;
    }

    .switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #ccc;
      transition: .4s;
    }

    .slider:before {
      position: absolute;
      content: "";
      height: 16px;
      width: 16px;
      left: 3px;
      bottom: 3px;
      background-color: white;
      transition: .4s;
    }

    input:checked+.slider {
      background-color: #2a6ea6;
    }

    input:checked+.slider:before {
      transform: translateX(18px);
    }

    .slider.round {
      border-radius: 34px;
    }

    .slider.round:before {
      border-radius: 50%;
    }

    .sources-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 15px;
    }

    /* ── UI Modals ── */
    dialog.custom-ui-modal {
      border: none;
      border-radius: 10px;
      padding: 24px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.15);
      background: #fff;
      max-width: 400px;
      width: 90%;
    }
    dialog.custom-ui-modal::backdrop {
      background: rgba(0,0,0,0.5);
      backdrop-filter: blur(3px);
    }
    dialog.custom-ui-modal .dialog-title {
      margin-top: 0;
      margin-bottom: 12px;
      color: #1a3a6e;
      font-size: 1.2em;
    }
    dialog.custom-ui-modal .dialog-content {
      margin-bottom: 24px;
      color: #444;
      line-height: 1.5;
    }
    dialog.custom-ui-modal .dialog-actions {
      display: flex;
      justify-content: flex-end;
      gap: 12px;
    }
    dialog.custom-ui-modal .dialog-btn {
      padding: 8px 16px;
      border-radius: 5px;
      border: none;
      cursor: pointer;
      font-weight: 500;
    }
    dialog.custom-ui-modal .dialog-btn-cancel {
      background: #e0e0e0;
      color: #333;
    }
    dialog.custom-ui-modal .dialog-btn-confirm {
      background: #2a6ea6;
      color: #fff;
    }
