/* style.css — l'appli des décharges : les couleurs du formulaire 184 (fond noir, champs gris, liseré or #b7a680). */
:root { --or: #b7a680; --fond: #000; --carte: #030303; --texte: #e0e0e0; --champ: #707070; --erreur: #ff6b6b; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--texte); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
body { padding: env(safe-area-inset-top, 0) 12px env(safe-area-inset-bottom, 0); }
main { max-width: 860px; margin: 0 auto; padding: 16px 0 48px; }
a { color: var(--or); }
h1, h2, h3 { color: var(--or); }
.carte { background: var(--carte); border: 1px solid #222; border-radius: 20px; padding: 18px; }
form.appli { display: flex; flex-wrap: wrap; gap: 0 12px; }
.champ { flex: 1 1 100%; margin: 6px 0; min-width: 0; }
.cf-one-half { flex-basis: calc(50% - 6px); }
.cf-one-third { flex-basis: calc(33.333% - 8px); }
.cf-two-thirds { flex-basis: calc(66.666% - 4px); }
.cf-one-sixth { flex-basis: calc(16.666% - 10px); }
.cf-two-sixths { flex-basis: calc(33.333% - 8px); }
.cf-three-sixths { flex-basis: calc(50% - 6px); }
@media (max-width: 640px) { .champ { flex-basis: 100% !important; } }
label.libelle { display: block; font-size: 14px; margin-bottom: 4px; color: var(--texte); }
.obligatoire::after { content: " *"; color: var(--or); }
input[type=text], input[type=tel], input[type=email], select {
  width: 100%; font-size: 16px; color: #fff; background: var(--champ); border: 1px solid var(--or); border-radius: 7px; padding: 11px 15px;
}
input[readonly] { opacity: .85; }
.separateur { flex-basis: 100%; border: 0; border-top: 1px solid #333; margin: 10px 0; }
.titre h2 { text-align: center; font-size: 26px; margin: 8px 0; }
.choix label, .case label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.choix input, .case input { width: 22px; height: 22px; flex: none; accent-color: var(--or); margin-top: 1px; }
.case .texte-case ul { margin: 4px 0 0; padding-left: 20px; }
.signature-zone { position: relative; background: #1a1a1a; border: 1px solid var(--or); border-radius: 7px; touch-action: none; }
.signature-zone canvas { display: block; width: 100%; height: 220px; }
.signature-effacer { margin-top: 6px; background: none; color: var(--or); border: 1px solid var(--or); border-radius: 7px; padding: 6px 14px; font-size: 14px; }
.erreur-champ { color: var(--erreur); font-size: 13px; margin-top: 4px; }
.champ.en-erreur input, .champ.en-erreur select, .champ.en-erreur .signature-zone { border-color: var(--erreur); }
button.envoyer, .bouton { background: var(--or); color: #fff; border: 0; border-radius: 7px; padding: 17px 20px; font-size: 16px; cursor: pointer; }
button.envoyer[disabled] { opacity: .6; }
.pied { flex-basis: 100%; margin-top: 18px; }
.etat { text-align: center; padding: 30px 12px; }
.etat.echec h2 { color: var(--erreur); }
.cache { display: none !important; }
/* Les fenêtres d'identification */
.fenetre { max-width: 560px; margin: 0 auto; }
.fenetre .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.fenetre .bouton.second { background: #333; }
.fenetre .message { margin: 10px 0; }
/* La page d'écoute de la tablette */
.ecoute { text-align: center; padding-top: 18vh; }
.ecoute .point { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #555; margin-right: 8px; }
.ecoute .point.vivant { background: #3c3; }
[hidden] { display: none !important; }
.ecoute-logo { font-size: 64px; margin-bottom: 20px; }
.ecoute-tablette { font-size: 16px; color: #aaa; margin-bottom: 12px; }
.ecoute-etat { font-size: 20px; color: #999; }
.ecoute-etat[data-etat="attente"] { color: #f90; }
.ecoute-etat[data-etat="pret"] { color: #3c3; }
.ecoute-etat[data-etat="ouverture"] { color: #4a9eff; }
.ecoute-etat[data-etat="refus"], .ecoute-etat[data-etat="erreur"] { color: var(--erreur); }
.ecoute-derniere { font-size: 13px; color: #888; margin-top: 24px; }
.accueil { text-align: center; padding-top: 12vh; }
/* La fenêtre d'identification du tatouage majeur (majeur.html, majeur-rdv.html) : l'ancien style vivait dans la feuille du
   gabarit du site (popup_majeur.css) ; ici sur une carte claire, aucun :hover, texte non sélectionnable hors des champs. */
#popup-majeur-root, #popup-majeur-root * { box-sizing: border-box; }
#popup-majeur-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px; line-height: 1.4; color: #1d1d1d; background: #fff; border-radius: 20px;
  width: 100%; max-width: 540px; margin: 0 auto; padding: 24px 20px 80px 20px; position: relative;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
#popup-majeur-root input, #popup-majeur-root select, #popup-majeur-root textarea { -webkit-user-select: text; user-select: text; }
.pop-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; border-bottom: 1px solid #e5e5e5; padding-bottom: 14px; }
.pop-logo {
  font-family: 'Stencil Std', 'Bebas Neue', 'Impact', 'Arial Narrow', 'Arial Black', sans-serif; font-weight: 700;
  letter-spacing: 0.18em; font-size: 22px; color: #1d1d1d; text-align: center; text-transform: uppercase; width: 100%; display: block;
}
.pop-screen { display: none; }
.pop-screen[data-active="true"] { display: block; }
#popup-majeur-root .pop-title { font-size: 24px; font-weight: 700; margin: 8px 0 6px 0; line-height: 1.25; color: #1d1d1d; }
.pop-subtitle { font-size: 16px; color: #555; margin: 0 0 24px 0; }
#popup-majeur-root .pop-soft-greeting { font-size: 26px; font-weight: 700; color: #1d1d1d; margin: 12px 0 8px 0; line-height: 1.25; }
.pop-soft-question { font-size: 17px; font-weight: 500; color: #1d1d1d; margin: 0 0 28px 0; line-height: 1.3; }
.pop-choix-block { margin-bottom: 18px; }
.pop-choix-row p { margin: 0 0 6px 0; }
.pop-choix-question { font-weight: 500; margin: 12px 0; }
.pop-field { margin-bottom: 18px; }
.pop-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: #2c2c2c; }
.pop-field input, .pop-field select {
  width: 100%; font-size: 17px; padding: 14px 14px; border: 1.5px solid #d4d4d4; border-radius: 10px;
  background: #ffffff; color: #1d1d1d; outline: none; -webkit-appearance: none; appearance: none;
}
.pop-field input:focus, .pop-field select:focus { border-color: #1d1d1d; }
.pop-field input::placeholder { color: #b0b0b0; }
.pop-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.pop-row-cp-ville { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-bottom: 18px; }
.pop-row-cp-ville .pop-field { margin-bottom: 0; }
.pop-row-3 { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; }
.pop-row-2 .pop-field, .pop-row-3 .pop-field { margin-bottom: 0; }
.pop-error { font-size: 13px; color: #c62828; margin-top: 6px; }
.pop-btn {
  display: block; width: 100%; font-size: 17px; font-weight: 600; padding: 16px 14px; border: 0; border-radius: 5px;
  cursor: pointer; letter-spacing: 0.01em; margin-top: 8px; -webkit-appearance: none;
}
.pop-btn[disabled] { opacity: .6; }
.pop-btn-primary, .pop-btn-secondary, .pop-btn-danger { background: #b7a680; color: #000000; border: 2px solid #000000; border-radius: 5px; }
.pop-btn-primary:active, .pop-btn-secondary:active, .pop-btn-danger:active { background: #a39473; }
.pop-btn-decline { background: #cb6262; color: #000000; border: 2px solid #000000; border-radius: 5px; }
.pop-btn-decline:active { background: #b54f4f; }
.pop-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pop-actions-row .pop-btn { margin-top: 0; }
.pop-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.pop-card { border: 1.5px solid #d4d4d4; border-radius: 12px; padding: 16px; background: #ffffff; cursor: pointer; }
.pop-card:active { background: #f5f5f5; border-color: #1d1d1d; }
.pop-card-name { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.pop-card-info { font-size: 14px; color: #555; }
.pop-card-code { font-size: 12px; color: #888; margin-top: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pop-recap { margin: 0 0 24px 0; padding: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; }
.pop-recap dt { font-weight: 600; color: #555; font-size: 14px; }
.pop-recap dd { margin: 0; font-size: 15px; color: #1d1d1d; word-break: break-word; }
.pop-readonly-list {
  margin: 0 0 24px 0; padding: 14px 16px; display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px;
  background: #f7f5f0; border: 1px solid #e0dccd; border-radius: 6px;
}
.pop-readonly-list dt { font-weight: 600; color: #555; font-size: 14px; align-self: start; }
.pop-readonly-list dd { margin: 0; font-size: 15px; color: #1d1d1d; word-break: break-word; }
.pop-readonly-list dd.pop-readonly-empty { color: #b0b0b0; font-style: italic; }
#popup-majeur-root input.pop-locked {
  background-color: #f0ede4; color: #4a4a4a; cursor: not-allowed; border-color: #d6d0bf; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234a4a4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px 14px;
}
#popup-majeur-root select.pop-locked { background-color: #f0ede4; color: #4a4a4a; cursor: not-allowed; border-color: #d6d0bf; }
.pop-locked-hint { font-size: 14px; color: #4b0303; margin: 0 0 18px 0; font-style: italic; }
.pop-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); display: flex; align-items: center; justify-content: center; z-index: 9100; padding: 16px; }
.pop-modal-card { background: #ffffff; border-radius: 16px; padding: 24px; max-width: 420px; width: 100%; }
.pop-modal-card p { font-size: 16px; line-height: 1.45; margin: 0 0 20px 0; text-align: center; }
#popup-majeur-root .pop-tel-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: nowrap; }
#popup-majeur-root .pop-tel-cc {
  flex: 0 0 auto; min-width: 72px; max-width: 92px; padding: 14px 8px; border: 1px solid #d0d0d0; border-radius: 10px;
  background: #f7f7f7; font-size: 15px; text-align: center; font-weight: 600; font-family: inherit; color: #1d1d1d; cursor: pointer;
}
#popup-majeur-root .pop-tel-cc:focus { outline: 2px solid #1d1d1d; outline-offset: -2px; }
#popup-majeur-root .pop-tel-cc-other { flex: 0 0 auto; width: 80px; padding: 14px 10px; border: 1px solid #d0d0d0; border-radius: 10px; background: #ffffff; font-size: 15px; }
#popup-majeur-root .pop-tel-row input[type="tel"] { flex: 1 1 0; min-width: 0; }
.pop-back-link {
  display: inline-flex; align-items: center; gap: 4px; background: #f5f5f5; border: 1.5px solid #1d1d1d; border-radius: 999px;
  color: #1d1d1d; font-size: 14px; font-weight: 600; padding: 6px 14px; cursor: pointer; margin: 0 0 16px 0; font-family: inherit;
}
.pop-back-link:active { background: #e8e8e8; }
.pop-optional { font-size: 13px; color: #888; font-weight: 400; font-style: italic; }
.pop-pays-zone { margin: 0 0 18px 0; padding: 12px 14px; background: #f7f5f0; border: 1px solid #e0dccd; border-radius: 8px; }
.pop-pays-auto-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.pop-pays-auto-label { font-size: 14px; color: #555; font-weight: 500; }
.pop-pays-auto-value { font-size: 16px; color: #1d1d1d; font-weight: 700; }
.pop-pays-override-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #555; cursor: pointer; margin-top: 4px; }
.pop-pays-override-line input[type="checkbox"] { width: 18px; height: 18px; margin: 0; cursor: pointer; }
#popup-majeur-root .pop-pays-select { margin-top: 10px; width: 100%; padding: 12px 14px; border: 1px solid #d0d0d0; border-radius: 10px; background: #ffffff; color: #1d1d1d; font-size: 15px; }
/* Le voile d'attente : logo qui respire, anneau doré qui tourne (il était écrit en ligne dans popup_majeur_v3.js) */
#pmj-hard-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px);
  z-index: 2147483647; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#pmj-hard-overlay .pmj-loader-box { position: relative; width: 140px; height: 140px; margin-bottom: 25px; display: flex; align-items: center; justify-content: center; }
#pmj-hard-overlay .pmj-loader-box::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: #b7a680;
  border-right-color: rgba(183,166,128,0.3); animation: pmj-spin-ring 1.2s linear infinite; z-index: 10; pointer-events: none;
}
#pmj-hard-overlay .pmj-loader-glow {
  position: absolute; width: 100%; height: 100%; top: 50%; left: 50%; transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(circle,rgba(255,61,0,0.15) 0%,transparent 70%); z-index: 5; animation: pmj-glow-pulse 0.5s ease-in-out infinite;
}
#pmj-hard-overlay .pmj-loader-img {
  position: relative; max-width: 90px; max-height: 90px; width: auto; height: auto; z-index: 20; object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0,0,0,0.8)); animation: pmj-logo-breathe 2.5s ease-in-out infinite;
}
#pmj-hard-overlay .pmj-loader-text {
  color: #b7a680; font-family: "Google Sans","Roboto",sans-serif; font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 600; text-shadow: 0 2px 4px rgba(0,0,0,0.8); margin-top: 10px;
}
@keyframes pmj-spin-ring { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pmj-logo-breathe { 0%,100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.05); filter: brightness(1.2); } }
@keyframes pmj-glow-pulse { 0%,100% { transform: translate(-50%,-50%) scale(0.8); opacity: 0.3; } 50% { transform: translate(-50%,-50%) scale(1.2); opacity: 0.6; } }
