/* Espace interne d'ODC IA (tableau de bord, connexion, pages d'erreur) :
   l'habillage du questionnaire vendeur (framboise, Montserrat, Roboto), avec
   des angles arrondis. Polices et couleurs : charte_odc.css. */

:root {
  --rayon: 14px;
  --rayon-petit: 8px;
  --ombre: 0 1px 2px rgba(36, 37, 43, 0.04), 0 4px 16px rgba(36, 37, 43, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fond);
  color: var(--anthracite);
  font-family: "Roboto", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--framboise);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--framboise-fonce);
}

h1,
h2,
h3 {
  font-family: var(--titres);
}

/* ---------- En-tête ---------- */

.barre-haute {
  height: 6px;
  background: var(--framboise);
}
.entete {
  background: var(--blanc);
  border-bottom: 1px solid var(--bordure);
}
.entete-dedans {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
}
.marque {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--anthracite);
  text-decoration: none;
}
.marque img {
  display: block;
  width: 95px;
  height: auto;
}
.marque-nom {
  padding-left: 18px;
  border-left: 1px solid var(--bordure);
  font-family: var(--titres);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.marque:hover {
  color: var(--anthracite);
}
.compte {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--texte-secondaire);
}
.compte form {
  margin: 0;
}

/* ---------- Page ---------- */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.titre-page {
  margin-bottom: 24px;
}
.titre-page h1,
.carte-entree h1,
.page-etat h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.mention {
  margin: 6px 0 0;
  color: var(--texte-discret);
  font-family: "Roboto", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.titre-avec-recherche {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.recherche {
  position: relative;
  flex: 0 1 380px;
}
.recherche svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--texte-discret);
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}
.recherche input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  background: var(--blanc);
  border: 1px solid var(--bordure-champ);
  border-radius: 999px;
  color: var(--anthracite);
  font-family: inherit;
  font-size: 15px;
}
.recherche input:focus {
  outline: 2px solid var(--framboise);
  outline-offset: 0;
  border-color: var(--framboise);
}
.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.aucun-resultat {
  margin: 0;
  padding: 32px 24px;
  color: var(--texte-secondaire);
  text-align: center;
}
.retour {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.carte {
  margin-bottom: 20px;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}
.carte.vide {
  padding: 40px;
  color: var(--texte-secondaire);
  text-align: center;
}

.message {
  margin: 0 0 20px;
  padding: 12px 16px;
  background: var(--framboise-clair);
  border: 1px solid var(--framboise-bordure);
  border-radius: var(--rayon-petit);
  color: var(--texte);
  font-size: 14px;
}
.message p {
  margin: 0;
}
.message-error {
  background: var(--blanc);
  border: 2px solid var(--framboise-fonce);
  color: var(--framboise-fonce);
  font-weight: 700;
}

/* ---------- Boutons ---------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid var(--framboise);
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.bouton-principal {
  background: var(--framboise);
  color: var(--blanc);
}
.bouton-principal:hover {
  background: var(--framboise-fonce);
  border-color: var(--framboise-fonce);
  color: var(--blanc);
}
.bouton-discret {
  background: transparent;
  border-color: var(--bordure-champ);
  color: var(--anthracite);
}
.bouton-discret:hover {
  border-color: var(--framboise);
  color: var(--framboise);
}
.bouton-large {
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
}
.bouton:focus-visible,
.ligne-dossier:focus-visible {
  outline: 2px solid var(--framboise);
  outline-offset: 2px;
}

/* ---------- Pastilles d'état du questionnaire ---------- */

.pastille {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--fond);
  color: var(--texte-secondaire);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.pastille-recu {
  background: var(--framboise);
  color: var(--blanc);
}
.pastille-envoye {
  background: var(--framboise-clair);
  color: var(--framboise-fonce);
}

/* ---------- Liste des dossiers ---------- */

.liste-dossiers {
  overflow: hidden;
}
.liste-dossiers ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ligne-entetes,
.ligne-dossier {
  display: grid;
  grid-template-columns:
    120px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 0.9fr)
    200px;
  gap: 16px;
  align-items: center;
  padding: 14px 24px;
}
.ligne-entetes {
  background: var(--fond);
  border-bottom: 1px solid var(--bordure);
  color: var(--texte-discret);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tri {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.tri:hover,
.tri[data-ordre] {
  color: var(--anthracite);
}
/* Deux chevrons : le haut s'allume en croissant, le bas en décroissant. */
.chevrons {
  flex: none;
  width: 8px;
  height: 12px;
}
.chevrons path {
  fill: none;
  stroke: var(--bordure-champ);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tri:hover .chevrons path {
  stroke: var(--texte-discret);
}
.tri[data-ordre="asc"] .chevrons .haut,
.tri[data-ordre="desc"] .chevrons .bas {
  stroke: var(--framboise);
}
.tri:focus-visible {
  outline: 2px solid var(--framboise);
  outline-offset: 3px;
  border-radius: 4px;
}
.liste-dossiers li + li {
  border-top: 1px solid var(--bordure);
}
.ligne-dossier {
  color: var(--texte);
  text-decoration: none;
}
.ligne-dossier:hover {
  background: var(--framboise-clair);
  color: var(--texte);
}
.ligne-dossier .reference {
  color: var(--anthracite);
  font-family: var(--titres);
  font-weight: 700;
}
.ligne-dossier:hover .reference {
  color: var(--framboise);
}
.ligne-dossier .parties,
.ligne-dossier .commune,
.ligne-dossier .collaborateur,
.ligne-dossier .notaire {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ligne-dossier .etat {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ligne-dossier .date {
  color: var(--texte-discret);
  font-size: 13px;
}

/* ---------- Fiche d'un dossier ---------- */

.etat-questionnaire {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
}
.titre-carte {
  margin: 0 0 10px;
  color: var(--framboise);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.etat-questionnaire .etat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--texte);
}

.section-reponses {
  padding: 32px 36px;
}
.titre-section {
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--framboise);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.sous-titre {
  margin: 26px 0 12px;
  color: var(--framboise);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.titre-section + .sous-titre {
  margin-top: 0;
}
.reponses {
  margin: 0;
}
.reponses div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--bordure-pointillee);
}
.reponses div:last-child {
  border-bottom: 0;
}
.reponses dt {
  color: var(--texte-secondaire);
}
.reponses dd {
  margin: 0;
  color: var(--anthracite);
  font-weight: 700;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ---------- Connexion et pages de compte ---------- */

.carte-entree {
  max-width: 440px;
  margin: 24px auto 0;
  padding: 36px 36px 30px;
}
.carte-entree h1 {
  font-size: 24px;
}
.carte-entree h2 {
  font-size: 17px;
}
.carte-entree > p,
.carte-entree .mention {
  margin: 8px 0 24px;
}
.carte-entree form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.champ label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}
.champ input,
.champ textarea,
.champ select {
  width: 100%;
  padding: 11px 14px;
  background: var(--blanc);
  border: 1px solid var(--bordure-champ);
  border-radius: var(--rayon-petit);
  color: var(--anthracite);
  font-family: inherit;
  font-size: 15px;
}
.champ input:focus,
.champ textarea:focus,
.champ select:focus {
  outline: 2px solid var(--framboise);
  outline-offset: 0;
  border-color: var(--framboise);
}
.champ .aide {
  margin-top: 6px;
  color: var(--texte-discret);
  font-size: 13px;
}
.erreur {
  margin: 6px 0 0;
  color: var(--framboise-fonce);
  font-size: 13.5px;
  font-weight: 700;
}
.case {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.case input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--framboise);
}
.lien-secondaire {
  margin: 20px 0 0;
  font-size: 14px;
  text-align: center;
}
.panneau + .panneau {
  margin-top: 24px;
}
.panneau .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.tableau {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tableau th,
.tableau td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--bordure);
  text-align: left;
}

/* ---------- Pages d'erreur ---------- */

.page-etat {
  max-width: 560px;
  margin: 24px auto 0;
  padding: 48px 40px;
  text-align: center;
}
.page-etat h1 {
  font-size: 24px;
}
.page-etat p {
  margin: 12px 0 26px;
  color: var(--texte);
}

/* ---------- Petits écrans ---------- */

@media (max-width: 760px) {
  .entete-dedans {
    padding: 12px 16px;
  }
  .marque img {
    width: 70px;
  }
  .marque-nom {
    padding-left: 12px;
    font-size: 17px;
  }
  .compte-nom {
    display: none;
  }
  .page {
    padding: 28px 16px 60px;
  }
  .titre-page h1 {
    font-size: 24px;
  }
  .recherche {
    flex-basis: 100%;
  }
  .ligne-entetes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 12px 16px;
  }
  .ligne-dossier {
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 14px 16px;
  }
  .ligne-dossier .etat {
    grid-column: 2;
    grid-row: 1;
  }
  .ligne-dossier .parties,
  .ligne-dossier .commune,
  .ligne-dossier .collaborateur,
  .ligne-dossier .notaire {
    grid-column: 1 / -1;
    font-size: 14px;
  }
  .ligne-dossier .date {
    display: none;
  }
  .etat-questionnaire {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
  }
  .section-reponses {
    padding: 22px 18px;
  }
  .reponses div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .carte-entree,
  .page-etat {
    padding: 28px 20px;
  }
}
