/* Reset rapide */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: auto;
  padding: 20px;
}

.fullwidth {
  width: 100%;
  margin: 0;
  padding: 20px;
}


/* Header */
.site-header {
  background: #222;
  color: #fff;
  padding: 15px 0;
  margin-bottom: 20px;
}

.site-header .container {
  text-align: center;
}

.site-header h1 {
  margin: 0;
  font-size: 22px;
}

.site-header nav {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.site-header nav a {
  color: #fff;
  margin-right: 0;
  text-decoration: none;
  font-weight: bold;
}

.site-header nav .admin-nav {
  color: #c0392b;
}

.site-header nav .admin-nav a {
  color: #c0392b;
  margin-right: 15px;
}

.site-header nav .admin-nav-sep {
  color: #c0392b;
  margin: 0 8px 0 6px;
  /* espace avant/après le pipe */
  font-weight: bold;
}

.site-header nav a:hover {
  text-decoration: underline;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  margin-left: 10px;
}

.lang-flag {
  border: 1px solid #fff;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 12px;
  text-decoration: none;
  line-height: 1;
}

.lang-flag.is-active {
  background: #fff;
  color: #222;
}

/* Footer */
.site-footer {
  background: #222;
  color: #bbb;
  text-align: center;
  padding: 10px;
  margin-top: 40px;
}

/* Formulaires */
form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

form h2 {
  color: #ff4549;
  /* couleur accent */
  margin: 12
  px 0 12px;
  /* un peu plus d’air */
  font-size: 18px;
  border-top: 2px solid #eee;
  /* trait plus doux et léger */
  margin-top: 8px;
  /* espace entre trait et texte */
  font-weight: 600;
}

label {
  display: block;
  margin: 10px 0;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-top: 3px;
}

button {
  background: #27ae60;
  color: #fff;
  padding: 10px 18px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background: #eeeeee;
}

/* Onglets sur le formulaire */
.tabs {
  margin-top: 16px;
  border-top: 2px solid #eee; /* trait plus doux et léger */
  padding-top: 8px;       /* espace entre trait et texte */
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.tab-btn {
  border: 1px solid #dddddd;
  background: #dddddd;
  color: #222222;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 999px;
  line-height: 1;
  font-weight: bold;
}

.tab-btn.is-active {
  background: #FFA600;
  color: #222222;
  border-color: #222222;
}

a.edit-user {
  text-decoration: none;
  font-size: 16px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.interaction-masked {
  display: none;
}

.interaction-masked.is-visible {
  display: block;
}

.form-error {
  display: none;
}

.form-error.is-active {
  display: block;
}

/* Formulaire en 2 colonnes pour les champs courts */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  /* 15px vertical, 20px horizontal */
}

.form-grid label {
  margin-bottom: 6px;
}

/* Champ libre en-dessous */
textarea[name="libre"] {
  resize: vertical;
  /* autorise juste en hauteur */
  min-height: 100px;
  /* un peu plus grand par défaut */
  max-height: 300px;
  width: 100%;
}

/* Boutons radio génériques */
.radio-group {
  display: flex;
  gap: 6px;
  /*margin-top: 6px;*/
  flex-wrap: wrap;
  /* au cas où */
}

.radio-btn {
  width: 80px;
  /* largeur fixe */
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  line-height: 28px;
  height: 32px;
  background: #eee;
  border: 1px solid #ccc;
  transition: all 0.2s;
}

.radio-btn input[type="radio"] {
  display: none;
}

/* Code couleur 0→5 */
.radio-btn.val-0 input[type="radio"]:checked+span {
  background: #000;
  color: #fff;
}

.radio-btn.val-1 input[type="radio"]:checked+span {
  background: #f4a299;
  color: #000;
}

.radio-btn.val-2 input[type="radio"]:checked+span {
  background: #f8d28b;
  color: #000;
}

.radio-btn.val-3 input[type="radio"]:checked+span {
  background: #f7f7a1;
  color: #000;
}

.radio-btn.val-4 input[type="radio"]:checked+span {
  background: #b7e690;
  color: #000;
}

.radio-btn.val-5 input[type="radio"]:checked+span {
  background: #80d080;
  color: #000;
}

/* Accessoires Oui / Non */
.radio-btn.val-yes input[type="radio"]:checked+span {
  background: #80d080;
  /* vert */
  color: #000;
}

.radio-btn.val-no input[type="radio"]:checked+span {
  background: #f4a299;
  /* rouge pastel */
  color: #000;
}

/* Limite vestimentaire */
.radio-btn.val-lingerie input[type="radio"]:checked+span,
.radio-btn.val-topless input[type="radio"]:checked+span,
.radio-btn.val-nu input[type="radio"]:checked+span {
  background: #80d080;
  /* même vert que Oui */
  color: #000;
}



/* État sélectionné → couleur plus marquée */
.radio-btn input[type="radio"]:checked+span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.15);
}

/* Légende au-dessus */
.legend-info {
  font-size: 12px;
  color: #666;
  /*margin-bottom: 4px;*/
}

/* Fieldset allégé */
fieldset {
  border: none;
  margin: 5px 0 0 0;
  padding: 0;
}

fieldset legend {
  font-weight: bold;
  margin-bottom: 2px;
}




/* Style de base pour rendre les labels "clicables" */
fieldset label {
  display: inline-block;
  margin: 2px;
  border-radius: 4px;
  cursor: pointer;
}

/* Catégories (0 à 5) */
fieldset:has(input[type="radio"].val-0:checked) {
  background: #000;
  color: #fff;
}

fieldset:has(input[type="radio"].val-1:checked) {
  background: #fb888a;
}

fieldset:has(input[type="radio"].val-2:checked) {
  background: #fbae88;
}

fieldset:has(input[type="radio"].val-3:checked) {
  background: #fff17d;
}

fieldset:has(input[type="radio"].val-4:checked) {
  background: #cdff7d;
}

fieldset:has(input[type="radio"].val-5:checked) {
  background: #83ff7d;
}

/* Accessoires (Oui/Non) */
fieldset:has(input[type="radio"].val-yes:checked) {
  background: #83ff7d;
}

fieldset:has(input[type="radio"].val-no:checked) {
  background: #fb888a;
}

input[readonly] {
  background-color: #eee;
  color: #555;
  pointer-events: none;
  /* optionnel : bloque clics */
}

.required {
  color: red;
  font-weight: bold;
  margin-left: 3px;
}

/* Conteneur pour forcer un centrage + scroll horizontal si besoin */
.table-wrapper {
  overflow-x: auto;
  text-align: center;
}

/* Tableau compact et centré */
table {
  border-collapse: collapse;
  margin: auto;
  /* centre le tableau */
  font-size: 12px;
  table-layout: auto;
  /* largeur auto */
  white-space: nowrap;
  /* pas de retour ligne */
  max-width: 100%;
}

th,
td {
  border: 1px solid #ccc;
  padding: 4px 6px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  /* force une seule ligne */
}

/* Exception : dernière colonne (libre) peut être multilignes */
td:last-child,
th:last-child {
  max-width: 200px;
  white-space: normal;
  /* autorise les retours à la ligne */
  word-break: break-word;
  /* coupe les mots trop longs si besoin */
}

/* Effet survol uniquement sur les lignes du body */
.table-wrapper table tbody tr:hover {
  background-color: #ffe4b1;
}


tr.invisible {
  background: #eee;
  color: #777;
  text-decoration: line-through;
}

a.toggle,
a.pdf {
  text-decoration: none;
  font-size: 18px;
  margin: 0 3px;
}

a.impersonate {
  text-decoration: none;
  font-size: 18px;
}

th.vertical {
  writing-mode: vertical-rl;
  transform: rotate(190deg);
  white-space: nowrap;
  padding: 4px;
}

thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}


.error {
  color: #a00000;
  font-weight: bold;
  margin: 12px auto;
  padding: 10px 14px;
  text-align: center;
  background: #fffcad;
  border: 1px solid #e6dc7a;
  border-radius: 4px;
  max-width: 720px;
}

.success {
  color: #0b6a2b;
  font-weight: bold;
  margin: 12px auto;
  padding: 10px 14px;
  text-align: center;
  background: #e7f8ec;
  border: 1px solid #bfe7c7;
  border-radius: 4px;
  max-width: 720px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.page-header h1 {
  margin: 0;
  font-size: 20px;
}

.table-search {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.table-search input {
  padding: 8px 10px;
  border: 1px solid #bbb;
  border-radius: 6px;
  min-width: 140px !important;
  /* plus petit mini */
  max-width: 220px !important;
  /* borne pour ne pas s’étirer */
  font-size: 13px;
}

.form-actions {
  border-top: 1px solid #ddd;
  margin-top: 20px;
  padding-top: 20px;
  text-align: center;
}

.form-actions button {
  background: #FFA600;
  color: #000000;
  font-size: 15px;
  font-weight: bold;
  padding: 12px 30px;
  border: 1px solid #000000;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.form-actions button:hover {
  background: #ffbb3b;
}

.auth-wrap {
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 12px;
}

.auth-form label {
  margin: 12px 0;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.link-list li {
  margin: 8px 0;
}

.link-list a {
  display: inline-block;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  color: #222;
}

.link-list a:hover {
  background: #f6f6f6;
}

.intro {
  text-align: center;
  margin-bottom: 30px;
}

.intro-collapsible {
  margin-bottom: 20px;
}

.intro-collapsible > summary {
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 10px;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.intro-collapsible > summary::-webkit-details-marker {
  display: none;
}

.intro-summary-state {
  font-weight: normal;
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid #999;
  border-radius: 12px;
  background: #FFA600;
  color: #222;
  white-space: nowrap;
}

.intro-collapsible > summary .intro-summary-state::after {
  content: attr(data-label-open);
}

.intro-collapsible[open] > summary .intro-summary-state::after {
  content: attr(data-label-close);
}

.intro-logo {
  margin-bottom: 20px;
}

.intro-section {
  margin-bottom: 20px;
  text-align: left;
  margin-left: auto;
  margin-right: auto;
}

.intro-section h2 {
  font-size: 18px;
  color: #ff4549;
  margin-bottom: 8px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 3px;
}

.intro-section p {
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #444;
}

.intro-image {
  text-align: center;
}

.intro-image img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  border-radius: 6px;
  /* optionnel, coins arrondis */
}

/* Overlay de la pop-up commentaire */
.comment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  /* assure que ça passe au-dessus du tableau */
}

/* Contenu de la pop-up */
.comment-modal {
  background: #fff;
  padding: 15px 20px;
  max-width: 500px;
  max-height: 70vh;
  overflow-y: auto;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  position: relative;
  text-align: left;
}

.comment-modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

/* Bannière d'impersonation */
.impersonation-banner {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    text-align: center;
    border-bottom: 1px solid #ffeeba;
    margin-bottom: 20px;
}
.impersonation-banner a {
    color: #856404;
    font-weight: bold;
}

.comment-modal-title {
  font-weight: bold;
  margin-bottom: 8px;
}

.comment-modal-text {
  white-space: pre-wrap;
  /* garde les retours à la ligne */
  font-size: 14px;
}

/* Bouton emoji dans le tableau */
.comment-btn {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.password-rules {
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.password-rules div {
    padding-left: 20px;
    position: relative;
}
.password-rules .rule-invalid {
    color: #c0392b;
}
.password-rules .rule-valid {
    color: #27ae60;
}
.password-rules div::before {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}
.password-rules .rule-invalid::before {
    content: '❌';
}
.password-rules .rule-valid::before {
    content: '✅';
}
