
/* ==========================================
   MON POINTAGE - SARL BIGNON
   STYLE COMPLET
========================================== */

:root {
  --orange: #f45100;
  --orange-dark: #d84300;
  --orange-soft: #fff0e7;
  --bg: #f4f6fa;
  --white: #ffffff;
  --text: #172235;
  --muted: #738096;
  --border: #e5e9f0;
  --shadow: 0 6px 24px rgba(15, 23, 42, .06);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

input,
select,
textarea {
  color: var(--text);
}

input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: white;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--orange);
  outline: 2px solid rgba(244, 81, 0, .2);
  outline-offset: 1px;
}

input:disabled {
  background: #f1f3f6;
  color: #758195;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.6px;
}

h2 {
  font-size: 18px;
  font-weight: 800;
}

h3 {
  font-size: 13px;
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.orange {
  color: var(--orange);
}

.message {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.full {
  width: 100%;
}

.primary {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--orange);
  color: white;
  font-size: 14px;
  font-weight: 800;
  transition: background .2s;
}

.primary:hover:not(:disabled) {
  background: var(--orange-dark);
}

/* ==========================================
   PAGE DE CONNEXION
========================================== */

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      circle at top left,
      rgba(244, 81, 0, .16),
      transparent 40%
    ),
    linear-gradient(160deg, #fff, #f0f3f8);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 34px 28px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 20px 70px rgba(15, 23, 42, .1);
}

.login-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: white;
  border-radius: 18px;
  font-size: 34px;
  font-weight: 800;
}

.login-card .logo-bignon {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 25px;
  object-fit: contain;
}

.login-card h1 {
  font-size: 30px;
  margin-bottom: 4px;
}

.login-card .muted {
  margin-bottom: 26px;
}

.login-card form {
  display: flex;
  flex-direction: column;
}

.login-card .primary {
  margin-top: 24px;
}

/* ==========================================
   APPLICATION
========================================== */

#application {
  min-height: 100vh;
  padding-bottom: 100px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: max(16px, env(safe-area-inset-top))
    20px 16px;
  background: white;
  border-bottom: 1px solid var(--border);
}

.top h1 {
  margin: 3px 0 0;
  color: var(--orange);
  font-size: 23px;
}

.top p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}

#bonjour {
  font-size: 12px;
  font-weight: 700;
}

main {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
}

.page {
  animation: apparition .2s ease;
}

@keyframes apparition {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   CARTES
========================================== */

.card {
  margin-bottom: 20px;
  padding: 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card h2 {
  margin-bottom: 18px;
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-heading h2 {
  margin-bottom: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
}

/* ==========================================
   SEMAINE ET JOURS
========================================== */

.week-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
  padding: 15px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.week-bar > div {
  text-align: center;
}

.week-bar small {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 1px;
}

.week-bar strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.week-bar button {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: var(--orange-soft);
  color: var(--orange);
  border-radius: 11px;
  font-size: 25px;
  font-weight: 800;
}

.week-bar button:hover {
  background: #ffe0cc;
}

.week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.week-days button {
  min-width: 0;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.week-days button.active {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
  box-shadow: 0 5px 15px rgba(244, 81, 0, .2);
}

.day-name {
  font-size: 10px;
  font-weight: 800;
}

.day-number {
  font-size: 20px;
  font-weight: 800;
}

.day-hours {
  font-size: 10px;
  font-weight: 700;
}

/* ==========================================
   RECAPITULATIF HEURES
========================================== */

.overview {
  border-top: 4px solid var(--orange);
}

.big-total {
  margin: 18px 0 2px;
  color: var(--orange);
  font-size: 44px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1.5px;
}

.progress {
  width: 100%;
  height: 10px;
  margin: 20px 0 22px;
  background: #edf0f5;
  border-radius: 999px;
  overflow: hidden;
}

#progression {
  width: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--orange),
    #ff9b40
  );
  border-radius: 999px;
  transition: width .3s;
}

.stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.stat-line:last-child {
  border-bottom: 0;
}

.stat-line span {
  font-size: 13px;
  color: var(--muted);
}

.stat-line strong {
  text-align: right;
  font-size: 14px;
}

.day-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.day-detail:last-child {
  border-bottom: 0;
}

.day-detail span {
  font-size: 13px;
}

.day-detail strong {
  white-space: nowrap;
}

/* ==========================================
   POINTAGE JOURNALIER
========================================== */

.row-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 10px;
}

.row-title h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .8px;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.time-row label {
  flex: 0 0 105px;
  margin: 0;
  font-size: 13px;
}

.time-row input {
  flex: 1;
  min-width: 0;
}

.time-row span {
  font-size: 18px;
  font-weight: 800;
  color: var(--orange);
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.choice-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-row button {
  min-height: 46px;
  padding: 10px 5px;
  background: #f3f5f8;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
}

.choice-row button.active {
  background: var(--orange-soft);
  color: var(--orange-dark);
  border: 2px solid var(--orange);
}

.choice-row button:disabled {
  opacity: .45;
}

#chantier {
  margin-bottom: 18px;
}

#enregistrerPointage,
#soumettrePointage {
  margin-top: 12px;
}

/* ==========================================
   CHANTIERS / GEOPLATEFORME IGN
========================================== */

#chantierSelect,
#gestionZonage select,
#gestionChantiers select {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: white;
  color: var(--text);
  margin-bottom: 10px;
}

#pointage [data-zone] {
  pointer-events: none;
  cursor: default;
}

#pointage .choice-row:has([data-zone]) {
  opacity: .75;
}

#gestionZonage button,
#gestionChantiers button {
  margin: 10px 0;
}

#listeChantiersAdmin > div {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

#listeChantiersAdmin button {
  margin-left: 10px;
}

/* ==========================================
   HISTORIQUE
========================================== */

#listeHistorique {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#listeHistorique .card {
  margin-bottom: 0;
}

#listeHistorique h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

/* ==========================================
   REGLAGES ADMINISTRATEUR
========================================== */

#parametres .card label {
  margin-top: 16px;
}

#parametres input {
  margin-bottom: 5px;
}

#enregistrerTarifs {
  margin-top: 22px;
}

/* ==========================================
   ADMINISTRATION
========================================== */

#administration .card {
  margin-bottom: 20px;
}

#formCreerSalarie {
  display: flex;
  flex-direction: column;
}

#formCreerSalarie .primary {
  margin-top: 22px;
}

#listeSalaries,
#listeValidations {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#listeSalaries > div,
#listeValidations > div {
  padding: 13px 14px;
  background: #f6f7fa;
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 13px;
}

#listeValidations p {
  margin-bottom: 12px;
}

/* ==========================================
   VALIDATION / REFUS ADMIN
========================================== */

.fiche-semaine-admin {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.fiche-semaine-admin h3 {
  font-size: 16px;
  line-height: 1.45;
  margin: 0 0 14px;
  color: var(--text);
}

.actions-semaine {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions-semaine button {
  flex: 1;
  min-width: 170px;
}

.detail-semaine {
  margin-top: 16px;
}

.tableau-semaine-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.tableau-semaine {
  width: 100%;
  min-width: 770px;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.tableau-semaine th {
  background: #fff0e7;
  color: #a63805;
  font-weight: 800;
}

.tableau-semaine th,
.tableau-semaine td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.tableau-semaine tbody tr:nth-child(even) {
  background: #f8fafc;
}

.resume-semaine {
  margin: 14px 0 0;
  font-weight: 800;
  color: var(--text);
}

.bouton-refus {
  padding: 12px 18px;
  min-height: 46px;
  border-radius: 12px;
  background: #b91c1c;
  color: white;
  font-weight: 800;
}

.bouton-refus:hover:not(:disabled) {
  background: #991b1b;
}

.bouton-annuler-refus {
  padding: 12px 18px;
  min-height: 46px;
  border-radius: 12px;
  background: #e9edf3;
  color: var(--text);
  font-weight: 700;
  margin-left: 8px;
}

.panneau-refus {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff7f7;
}

.panneau-refus textarea {
  display: block;
  width: 100%;
  min-height: 90px;
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid #e5a3a3;
  border-radius: 10px;
  resize: vertical;
  background: white;
}

/* ==========================================
   ALERTES DE REFUS SALARIE
========================================== */

.alertes-refus {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.alerte-refus-carte {
  padding: 18px;
  border: 1px solid #fca5a5;
  border-left: 5px solid #b91c1c;
  border-radius: 14px;
  background: #fff7f7;
  box-shadow: 0 6px 20px rgba(127, 29, 29, .07);
}

.alerte-refus-carte strong {
  color: #991b1b;
  font-size: 16px;
}

.alerte-refus-carte p {
  margin: 9px 0 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.alerte-refus-carte button {
  width: 100%;
  max-width: 300px;
}

/* ==========================================
   ARCHIVES
========================================== */

#listeArchives {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.archive-card {
  margin-bottom: 0;
}

.archive-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.archive-statut {
  font-weight: 700;
  color: #15803d;
  font-size: 13px;
}

/* ==========================================
   NAVIGATION BAS DE PAGE
========================================== */

.navigation {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 7px;
  padding:
    10px
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--border);
  box-shadow: 0 -5px 25px rgba(15, 23, 42, .06);
}

.navigation button {
  flex: 1;
  max-width: 180px;
  min-width: 0;
  min-height: 53px;
  padding: 11px 8px;
  color: var(--muted);
  background: transparent;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  transition: background .2s;
}

.navigation button:hover {
  background: #f5f6f9;
}

.navigation button.active {
  background: var(--orange-soft);
  color: var(--orange);
}

/* ==========================================
   CLOCHE DE NOTIFICATIONS
========================================== */

.actions-entete {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.notifications-wrapper {
  position: relative;
}

.bouton-cloche {
  position: relative;
  width: 50px;
  height: 50px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
  background: var(--orange-soft);
  color: var(--orange);
  border: 1px solid #ffdbc5;
  box-shadow: 0 4px 12px rgba(244, 81, 0, .12);
}

.bouton-cloche:hover {
  background: #ffe0cc;
}

.bouton-cloche .icone-cloche {
  display: block;
  width: 31px;
  height: 31px;
  fill: currentColor;
}

.compteur-notifications {
  position: absolute;
  top: -7px;
  right: -8px;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border: 2px solid white;
  border-radius: 999px;
  background: #e52323;
  color: white;
  font-size: 12px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 7px rgba(185, 28, 28, .25);
}

.panneau-notifications {
  position: absolute;
  z-index: 500;
  right: 0;
  top: calc(100% + 12px);
  width: min(380px, calc(100vw - 24px));
  max-height: min(460px, 75vh);
  overflow-y: auto;
  padding: 0;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .18);
}

.notifications-entete {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: white;
  border-bottom: 1px solid var(--border);
}

.notifications-entete strong {
  font-size: 15px;
}

.bouton-actualiser-notifications {
  padding: 7px 10px;
  color: var(--orange-dark);
  background: var(--orange-soft);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}

.liste-notifications {
  padding: 6px 0;
}

.notification-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item strong {
  display: block;
  font-size: 13px;
}

.notification-item p {
  margin: 6px 0 10px;
  color: #66758b;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notification-action {
  min-height: 36px;
  padding: 8px 11px;
  color: white;
  background: var(--orange);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.notification-action:hover {
  background: var(--orange-dark);
}

.notification-vide {
  margin: 0;
  padding: 22px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ==========================================
   BOUTON DECONNEXION ORANGE
========================================== */

#deconnexion {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 43px;
  height: 43px;
  color: var(--orange);
  background: var(--orange-soft);
  border-radius: 13px;
  font-size: 22px;
  font-weight: 800;
}

#deconnexion:hover {
  background: #ffe0cc;
}

/* ==========================================
   CONFIRMATION ENVOI SEMAINE
   RESERVEE AUX SALARIES
========================================== */

.confirmation-semaine {
  width: min(420px, calc(100% - 28px));
  max-height: 90dvh;
  max-height: 90vh;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: white;
  color: var(--text);
  box-shadow: 0 20px 70px rgba(23, 34, 53, .25);
}

.confirmation-semaine[open] {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 12000;
}

.confirmation-semaine::backdrop {
  background: rgba(15, 23, 42, .55);
}

.confirmation-semaine h2 {
  margin: 0 0 24px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
}

.confirmation-semaine-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.confirmation-semaine-actions button {
  min-width: 110px;
  min-height: 46px;
  padding: 11px 15px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 800;
}

.confirmation-annuler {
  background: white;
  color: var(--text);
  border: 1px solid #ccd4df;
}

.confirmation-annuler:hover {
  background: #f4f6fa;
}

.confirmation-semaine-actions .primary {
  background: var(--orange);
  color: white;
}

.confirmation-semaine-actions .primary:hover {
  background: var(--orange-dark);
}

/* ==========================================
   FICHES PDF PROFESSIONNELLES
========================================== */

.pdf-document {
  position: fixed;
  inset: 0;
  z-index: 11000;
  overflow-y: auto;
  padding: 28px;
  background: white;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

.pdf-document .actions-pdf {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.pdf-document .actions-pdf button {
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--orange);
  color: white;
  font-weight: 700;
}

.pdf-document .actions-pdf .pdf-fermer {
  background: #e9edf3;
  color: var(--text);
}

.pdf-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--orange);
}

.pdf-identite {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.pdf-logo {
  width: 118px;
  max-height: 82px;
  object-fit: contain;
  flex-shrink: 0;
}

.pdf-entete h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  color: var(--text);
}

.pdf-sous-titre {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.pdf-statut {
  flex-shrink: 0;
  padding: 7px 10px;
  border-radius: 999px;
  color: #b84200;
  background: var(--orange-soft);
  font-size: 10px;
  font-weight: 800;
}

.pdf-infos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}

.pdf-infos > div,
.pdf-totaux > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 15px;
  background: #f4f6fa;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.pdf-etiquette {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .6px;
}

.pdf-infos strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.pdf-tableau {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 11px;
}

.pdf-tableau th {
  padding: 10px 7px;
  background: var(--orange);
  border: 1px solid #e36a2a;
  color: white;
  text-align: left;
  font-weight: 800;
}

.pdf-tableau td {
  padding: 10px 7px;
  border: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.pdf-tableau tbody tr:nth-child(even) {
  background: #fff7f1;
}

.pdf-cellule-total {
  font-weight: 800;
  white-space: nowrap;
}

.pdf-totaux {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 24px;
}

.pdf-totaux strong {
  font-size: 18px;
  color: var(--orange);
}

/* ==========================================
   SIGNATURE NOM / PRENOM SALARIE
========================================== */

.pdf-signatures {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 14px;
}

.pdf-signature {
  min-height: 105px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #cdd5df;
  border-radius: 10px;
}

.pdf-signature strong {
  color: var(--text);
}

.pdf-nom-signature {
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
}

.pdf-date-signature {
  display: none !important;
}

.pdf-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 10px;
}

/* ==========================================
   ANCIEN AFFICHAGE PDF ARCHIVES
========================================== */

#archivePDF {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: white;
  color: var(--text);
  overflow: auto;
  padding: 24px;
  font: 14px Arial, sans-serif;
}

#archivePDF .actions-pdf {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

#archivePDF button {
  background: var(--orange);
  color: white;
  border-radius: 9px;
  padding: 12px 16px;
  font-weight: 700;
}

#archivePDF .tableau-semaine {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 11px;
}

#archivePDF .tableau-semaine th,
#archivePDF .tableau-semaine td {
  padding: 7px;
  border: 1px solid #ddd;
}

/* ==========================================
   RESPONSIVE TABLETTE ET ORDINATEUR
========================================== */

@media (min-width: 800px) {
  .top {
    padding: 18px 36px;
  }

  main {
    padding: 32px;
  }

  .card {
    padding: 28px;
  }

  .week-days {
    gap: 12px;
  }

  .week-days button {
    min-height: 100px;
  }

  .navigation {
    gap: 15px;
  }

  .navigation button {
    font-size: 14px;
  }
}

/* ==========================================
   VERSION TELEPHONE
========================================== */

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .top {
    padding:
      max(12px, env(safe-area-inset-top))
      15px 12px;
    gap: 8px;
  }

  .top h1 {
    font-size: 21px;
  }

  main {
    padding: 16px 12px;
  }

  .card {
    padding: 18px 15px;
    margin-bottom: 15px;
    border-radius: 15px;
  }

  h2 {
    font-size: 17px;
  }

  .week-bar {
    padding: 11px 8px;
    gap: 7px;
  }

  .week-bar strong {
    font-size: 12px;
  }

  .week-days {
    gap: 4px;
  }

  .week-days button {
    min-height: 74px;
    border-radius: 8px;
    padding: 7px 2px;
  }

  .day-name {
    font-size: 9px;
  }

  .day-number {
    font-size: 17px;
  }

  .day-hours {
    font-size: 8px;
  }

  .big-total {
    font-size: 38px;
  }

  .time-row {
    gap: 6px;
  }

  .time-row label {
    flex-basis: 68px;
    font-size: 12px;
  }

  .time-row input {
    padding: 8px 5px;
    font-size: 13px;
  }

  .choice-row {
    gap: 5px;
  }

  .choice-row button {
    padding: 8px 2px;
    font-size: 11px;
  }

  .navigation {
    gap: 2px;
    padding:
      7px 5px
      max(8px, env(safe-area-inset-bottom));
  }

  .navigation button {
    min-height: 48px;
    padding: 8px 2px;
    font-size: 10px;
    border-radius: 9px;
  }

  .fiche-semaine-admin {
    padding: 13px;
  }

  .actions-semaine button {
    min-width: 100%;
  }

  .actions-entete {
    gap: 6px;
  }

  .bouton-cloche,
  #deconnexion {
    width: 40px;
    height: 40px;
  }

  .bouton-cloche .icone-cloche {
    width: 27px;
    height: 27px;
  }

  .panneau-notifications {
    right: -46px;
  }

  .confirmation-semaine {
    padding: 20px;
  }

  .confirmation-semaine h2 {
    font-size: 18px;
  }

  .confirmation-semaine-actions button {
    min-width: 100px;
  }

  .pdf-document {
    padding: 16px;
  }

  .pdf-logo {
    width: 72px;
  }

  .pdf-entete h1 {
    font-size: 15px;
  }

  .pdf-statut {
    font-size: 9px;
  }

  .pdf-identite {
    gap: 10px;
  }

  .pdf-tableau {
    font-size: 9px;
  }

  .pdf-tableau th,
  .pdf-tableau td {
    padding: 7px 4px;
  }

  .pdf-infos,
  .pdf-totaux {
    gap: 7px;
  }
}

/* ==========================================
   ACCESSIBILITE
========================================== */

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(244, 81, 0, .35);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ==========================================
   IMPRESSION PDF
========================================== */

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  html,
  body {
    background: white !important;
  }

  .top,
  .navigation,
  .panneau-notifications,
  .alertes-refus,
  .panneau-refus,
  .bouton-refus,
  .bouton-annuler-refus {
    display: none !important;
  }

  body:has(.pdf-document) > :not(.pdf-document) {
    display: none !important;
  }

  .pdf-document,
  #archivePDF.pdf-document,
  #fichePDF.pdf-document {
    display: block !important;
    position: static !important;
    inset: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    font-size: 10px;
  }

  .pdf-document .actions-pdf {
    display: none !important;
  }

  .pdf-tableau {
    font-size: 9px;
  }

  .pdf-tableau td,
  .pdf-tableau th {
    padding: 6px 5px;
  }

  .pdf-entete,
  .pdf-infos,
  .pdf-totaux,
  .pdf-signatures,
  .pdf-signature {
    break-inside: avoid;
  }

  .pdf-tableau tr {
    break-inside: avoid;
  }

  .pdf-tableau th,
  .pdf-statut,
  .pdf-totaux strong {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .pdf-signature {
    min-height: 72px;
  }

  .pdf-date-signature {
    display: none !important;
  }

  body:has(#archivePDF:not(.pdf-document))
    > :not(#archivePDF) {
    display: none !important;
  }

  #archivePDF:not(.pdf-document) {
    position: static !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  #archivePDF .actions-pdf {
    display: none !important;
  }

  #archivePDF .tableau-semaine {
    font-size: 9px;
  }

  #archivePDF .tableau-semaine th,
  #archivePDF .tableau-semaine td {
    padding: 5px;
  }
}
#premiereConnexion[hidden] {
  display: none !important;
}