/* ================================
   VARIABLES GLOBALES
   ================================ */
:root {
  /* Couleurs */
  --primary-color: #0066cc;
  --primary-hover: #0055aa;
  --success-color: #28a745;
  --error-color: #dc3545;
  --bg-color: #f4f4f4;
  --text-color: #2f2f2f;
  --border-color: #ccc;
  --card-bg: #fff;

  /* Tailles de police */
  --font-size-base: 12px;
  --font-size-small: 10px;
  --font-size-large: 16px;
  --font-size-authentic: 20px;
  --font-size-title: 24px;
}

/* ================================
   RESET + BASE
   ================================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Roboto, Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: var(--font-size-base);
  text-transform: uppercase;
}
hr {
  border-top: 1px dashed #cecece;
}
a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1 {
  font-size: var(--font-size-title);
  margin-top: 0;
  font-weight: 300;
  text-transform: uppercase;
}

h2 button, h2{
  font-size: var(--font-size-large);
  margin-top: 20px;
  text-transform: uppercase;
  font-weight: 300;
}
h2.authentic{
  font-size: var(--font-size-authentic);
  margin-top: 20px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--success-color);
}


h3 {
  font-size: var(--font-size-base);
  margin-top: 15px;
}
.logo {
  width: 200px;
}

/* ================================
   CONTAINER / CARD
   ================================ */
.container {
  max-width: 600px;
  margin: 10px auto 20px auto;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  Text-align:center;
}

.card {
  background: var(--card-bg);
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
}
.card label{
  Text-align:left;
  text-transform: uppercase;
}
.ticket {
  background: #f0f0f0; /* papier un peu plus sombre */
  border-top: none;
  border-bottom: none;
  border-radius: 0;
  padding: 20px;
  margin: 20px 0;
  font-family: "Courier New", monospace;
  color: #222;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2); /* ombre plus sombre */
  position: relative;
}

/* dents discrètes haut/bas */
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background-image: repeating-linear-gradient(
    to right,
    #f0f0f0 0px,
    #f0f0f0 8px,
    transparent 8px,
    transparent 16px
  );
}

.ticket::before {
  top: -5px;
}

.ticket::after {
  bottom: -5px;
}
.ticket {
  position: relative;
}

.ticket-refresh {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ticket-refresh:hover {
  background: #f0f0f0;
  border-color: #888;
}

.icon-refresh {
  width: 16px;
  height: 16px;
  color: #444;
  transition: transform 0.3s ease;
}

.ticket-refresh:hover .icon-refresh {
  transform: rotate(90deg);
  color: #000;
}
/* ================================
   MESSAGES
   ================================ */
.ok {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: var(--font-size-base);
}
.product_info {
  background: #F7F7F7;
  border: 1px solid var(--success-color);
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: var(--font-size-base);
}

.err {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: var(--font-size-base);
}

/* Texte petit */
.small {
  font-size: var(--font-size-small);
  color: #555;
}

/* ================================
   FORMS
   ================================ */
form {
  margin: 10px 0;
}

label {
  display: block;
  margin-bottom: 4px;
  font-weight: bold;
}

input[type=text],
input[type=password],
input[type=email],
select {
    border-radius: 0;
    display: block;
    width: 100%;
    padding: 5px 15px;
    height: 46px;
    font-size: 15px;
    font-weight: 100;
    background-color: #fafafa;
    border: 1px solid #e5e5e5;
    outline: none;
    margin: 10px 0;
    font-family: Roboto, Arial, sans-serif;
    Font-weight:bold;
}

button {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  border-radius: 0;
  color: var(--primary-color);
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  padding: 17px 32px;
  padding: 1.18em 2.29em;
  position: relative;
  line-height: 1.25;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  text-transform: uppercase;
}

button:hover {
  background: var(--primary-hover);
  color: #FFF;
}

.accordion-btn {
  display: block;
  width: 100%;
  background: #f0f0f0;   /* fond gris clair */
  color: #333;
  text-align: left;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.accordion-btn:hover {
  background: #e0e0e0;   /* léger survol */
  color: #333;
}

.accordion-btn::after {
  content: "➕";
  float: right;
  font-size: 18px;
  transition: transform 0.3s ease;
}

.accordion-btn.active::after {
  content: "➖";
}

.verify-again {
  margin: 20px 0;
  text-align: center;
}

.verify-again a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  background: #f5f5f7;        /* fond gris clair */
  border: 1px solid #ccc;     /* contour discret */
  color: #0071e3;             /* bleu Apple */
  font-weight: 300;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.3s ease, border 0.3s ease;
}

.verify-again a:hover {
  background: #e9e9eb;
  border-color: #0071e3;
}
/* ================================
   ADMIN NAVIGATION
   ================================ */
.tabs {
  display: flex;
  background: #222;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.tabs a {
  color: #fff;
  margin-right: 15px;
  text-decoration: none;
  font-size: var(--font-size-base);
}

.tabs a.active {
  font-weight: bold;
  text-decoration: underline;
}

/* ================================
   ADMIN WRAPPER
   ================================ */
.admin-wrap {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 8px;
}

/* ================================
   TABLES ADMIN
   ================================ */
.table-wrapper {
  overflow-x: auto;
}

.table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--font-size-base);
}

.table th,
.table td {
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  white-space: nowrap;
  vertical-align: middle;
}

.table th {
  background: #f0f0f0;
  font-weight: bold;
}

/* Colonnes compactes */
.table td.serial,
.table td.code,
.table td.batch,
.table td.scans,
.table td.status {
  text-align: center;
  width: 80px;
}

/* Colonne email tronquée */
.table td.email {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Colonne owner tronquée */
.table td.owner {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Actions compactes */
.table td.actions {
  white-space: nowrap;
}

.table td.actions form {
  display: inline-block;
  margin: 0 2px;
}

.table td.actions button {
  padding: 3px 6px;
  font-size: var(--font-size-small);
  line-height: 1.2;
  border: 1px solid var(--primary-color);
  border-radius: 3px;
  background: var(--primary-color);
  color: #fff;
}

.table td.actions button:hover {
  background: var(--primary-hover);
}

/* ================================
   SPECIMEN FINISH EDIT
   ================================ */
.table td form {
  display: flex;
  align-items: center;
  gap: 4px;
}

.table td form input[name="finish"] {
  padding: 2px 4px;
  font-size: var(--font-size-small);
  width: 80px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
}

.table td form button {
  padding: 2px 6px;
  font-size: var(--font-size-small);
  border: 1px solid var(--primary-color);
  border-radius: 3px;
  background: var(--primary-color);
  color: #fff;
  cursor: pointer;
}

.table td form button:hover {
  background: var(--primary-hover);
}

/* ================================
   PAGINATION
   ================================ */
.pagination {
  margin: 15px 0;
  text-align: center;
}

.pagination a,
.pagination span {
  margin: 0 3px;
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: var(--font-size-small);
}

.pagination a {
  background: #fff;
  color: var(--primary-color);
}

.pagination a:hover {
  background: var(--primary-color);
  color: #fff;
}

.pagination span.active {
  background: var(--primary-color);
  color: #fff;
  font-weight: bold;
}
.notice-links {
  margin-top: 15px;
  text-align: center;
}

.notice-links .btn {
  display: inline-block;
  padding: 10px 14px;
  background: #f5f5f7;         /* fond gris clair style Apple */
  border: 1px dashed #bbb;     /* contour pointillé effet ticket */
  color: #333;
  font-weight: 500;
  font-size: 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.notice-links .btn:hover {
  background: #0071e3;         /* bleu Apple au hover */
  border-color: #0071e3;
  color: #fff;
}

footer.baseline {

  padding: 1em;
  font-size: 0.85em;
  text-align: center;
  color: #666;
}

footer.baseline a {
  color: inherit;
  text-decoration: none;
}

footer.baseline a:hover {
  text-decoration: underline;
}
.code-inputs {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr; /* KAS- | XXXX | - | XXXX */
  align-items: center;
  gap: 0.5em;
  width: 100%;
  margin: 0.5em 0;
}

.code-inputs .prefix,
.code-inputs .sep {
  font-weight: bold;
  font-size: 1.1em;
  text-align: right;
}

.code-inputs input {
  width: 100%;
  padding: 0.6em;
  text-align: center;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 1.1em;
  box-sizing: border-box;
}


/* ============================
   Accordéon Specimens (admin)
   ============================ */

/* Bouton toggle compact */
.accordion-toggle-specimen {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;          /* taille réduite */
  line-height: 1;
  padding: 2px 5px;
  margin: 0;
  color: #555;
  vertical-align: middle;
}

.accordion-toggle-specimen:hover {
  color: #000;
  background: #f0f0f0;
  border-radius: 3px;
}

/* Contenu de la ligne étendue */
.accordion-details-specimen {
  background: #fafafa;
}

.accordion-details-specimen .details-box {
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
}

/* Accordéon Specimens */
.details-box {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.detail-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 6px 10px;
  font-size: 11px;
}

.detail-row:nth-child(odd) {
  background: #f9f9f9;
}

.detail-row:nth-child(even) {
  background: #fff;
}

.detail-row .label {
  width: 120px;        /* largeur fixe pour bien aligner */
  font-weight: bold;
  color: #333;
  flex-shrink: 0;
}

.detail-row .value {
  flex: 1;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.actions-extra {
  background: #f0f4f8;
}

.actions-extra .value form {
  margin-right: 8px;
}


.lang-switch {
  text-align: center;
  margin-top: 10px;
  font-size: var(--font-size-small);

}

.lang-switch a {
  text-decoration: none;
  color: #444;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.lang-switch a:hover {
  background: #eee;
  color: #000;
}

.lang-switch a.active {
  background: #333;
  color: #fff;
  font-weight: bold;
}



.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* défilement fluide sur iOS */
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* force un scroll si trop serré */
}

.table-wrapper th,
.table-wrapper td {
  padding: 8px 12px;
  border: 1px solid #ccc;
  text-align: left;
}



/* Barre du haut admin */
.admin-header {
  display: flex;
  flex-wrap: wrap;     /* permet de passer sur plusieurs lignes si ça déborde */
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

/* Les liens/menu à l’intérieur */
.admin-header a,
.admin-header button {
  white-space: nowrap;  /* garde les mots collés */
  font-size: 14px;      /* réduit un peu sur mobile */
}

/* Sur petit écran : force à réduire */
@media (max-width: 600px) {
  .admin-header {
    flex-direction: column;  /* menu empilé */
    align-items: stretch;
  }
  .admin-header a,
  .admin-header button {
    width: 100%;             /* chaque bouton prend toute la largeur */
    text-align: center;
    margin: 2px 0;
  }
}
