/* =========================================================
   RÈGLE GLOBALE FORMULAIRES – ANTI-CHEVAUCHEMENT
   ========================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --topbar-height: 75px;   /* adapte à ta topbar */
    --pw-sidebar-width: 220px;
}

/* Réactiver la croix native des <input type="search"> (Chrome/Edge/Safari) */
input[type="search"]{
  -webkit-appearance: searchfield;
  appearance: auto;
}

input[type="search"]::-webkit-search-cancel-button{
  -webkit-appearance: searchfield-cancel-button;
  appearance: auto;
  cursor: pointer;
}

/* === TOPBAR === */
.header {
    padding: 15px;
    background: #2c7be5;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h2 {
    margin: 0;
    font-size: 20px;
}

.back-btn {
    color: white;
    text-decoration: none;
    font-size: 15px;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 8px;
}

/* === CARDS === */
.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 15px;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0,0,0,.08);
}

.card span.icon {
    font-size: 28px;
    display: block;
}

.card span.label {
    display: block;
    margin-top: 6px;
    font-size: 15px;
    color: #555;
}

.card span.count {
    display: block;
    margin-top: 8px;
    font-size: 26px;
    font-weight: bold;
    color: #17a2b8;
}

.card small {
    color: #666;
}

.item {
    background:#fff;
    margin:10px;
    padding:14px;
    border-radius:8px;
    box-shadow:0 2px 6px rgba(0,0,0,.08);
}
.item a {
    text-decoration:none;
    color:#000;
}
.item.materiel-old {
    background-color: #ffeaea;
    border-left: 4px solid #e57373;
}

.small { color:#666; font-size:13px; }
.badge {
    float:right;
    font-size:12px;
    padding:2px 6px;
    border-radius:6px;
}
.ok { background:#d4edda; }
.off { background:#f8d7da; }
.eye {
    cursor: pointer;
}
.hidden { display:none; }
.contrat {
    background: #e8f4ff;
    color: #2c6ea6;
    border: 1px solid #b8d9f5;
    margin-left: 10px;
}
/* =========================
   FOND GLOBAL
========================= */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    background:
        radial-gradient(circle at top center, rgba(99,102,241,0.15), transparent 60%),
        linear-gradient(135deg, #020617, #1e1b4b, #312e81);
    min-height: 100vh;
}

/* =========================
   ZONE CENTRALE
========================= */
.main {
    display: flex;
    justify-content: center;
    padding: 20px 12px 40px;
}
.form-card {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
main h3 {
    color: #ffffff;
}

/* largeur confortable */
.page {
    width: 100%;
    max-width: 1100px;
}

.page {
    padding-bottom: 30px;
}

/* =========================
   FORM – BASE (MOBILE FIRST)
   ========================= */

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field-rose {
    display: flex;
    flex-direction: column;
    background-color: #fce7f3;
    padding: 8px;
    border-radius: 6px;
}

/* Le break ne fait RIEN sur mobile */
.form-break {
    display: none;
}
/* =========================
   DESKTOP / LARGE SCREEN
   ========================= */
@media (min-width: 900px) {

    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Break logique → force retour à la ligne */
    .form-break {
        display: block;
        grid-column: 1 / -1;
        height: 0;
    }

    /* Exemple : paire Login / MDP */
    .form-field.pair {
        grid-column: span 1;
    }
}

/* =========================
   CHAMPS
========================= */
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 15px;
    background: #fff;
}

.form-field label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}


.form-field textarea {
    min-height: 110px;
    resize: vertical;
}

.form-field input[readonly] {
    background: #f1f3f5;
}
/* =========================
   DATE INPUT – MOBILE FIX
   ========================= */
@media (max-width: 768px) {

  .form-field input[type="date"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    padding: 10px 12px;
    font-size: 16px; /* évite le zoom iOS */
    line-height: 1.2;

    appearance: none;
    -webkit-appearance: none;
    border-radius: 12px;
  }

}

/* =========================
   PASSWORD
========================= */
.field-password {
    display: flex;
    gap: 8px;
}

.field-password button {
    background: #eef2ff;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .page {
        max-width: 100%;
    }

    .card-section {
        padding: 16px;
        border-radius: 14px;
    }
}

/* =========================
   ACTIONS
========================= */
.form-actions {
    margin: 20px 14px;
    text-align: right;
}

.form-actions button {
    background: #2c7be5;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
}

/* =========================
   CARDS (PC / NAS / etc.)
========================= */
.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 15px;
}

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    text-decoration: none;
    color: #000;
    box-shadow: 0 3px 8px rgba(0,0,0,.08);
}
.card-section {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,.15);
}


.card span.icon {
    font-size: 28px;
    display: block;
}

.card span.label {
    display: block;
    margin-top: 6px;
    font-size: 15px;
    color: #555;
}

.card span.count {
    display: block;
    margin-top: 8px;
    font-size: 26px;
    font-weight: bold;
    color: #17a2b8;
}

.card small {
    color: #666;
}
/* =========================
   CHAMPS HORS CARTE
========================= */
.fc-field-outside label {
    color: #ffffff;
    font-weight: 600;
}

.fc-field-outside {
    margin: 16px;
}
/* =========================
   SELECTS COURTS (OUI/NON)
========================= */
.select-short {
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
/* =========================
   BLOCS MEMO (pleINE LARGEUR)
========================= */
.fc-memo-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}
.fc-memo-block textarea {
    width: 100%;
    min-height: 180px;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.6;
    border-radius: 10px;
    border: 1px solid #ccc;
    resize: vertical;
    background: #fdfdfd;
}
.fc-memo-block label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}
.fc-actions {
    margin: 30px 15px 40px;
    display: flex;
    justify-content: center;
}
.btn-primary {
    width: 100%;
    max-width: 420px;

    background: linear-gradient(135deg, #2c7be5, #1a5fd0);
    color: #fff;

    border: none;
    border-radius: 14px;

    padding: 16px 20px;
    font-size: 17px;
    font-weight: 600;

    cursor: pointer;
    text-align: center;

    box-shadow: 0 6px 16px rgba(44,123,229,.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(44,123,229,.45);
}
.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(44,123,229,.3);
}
.badge-code {
    background: #eef2ff;
    color: #FB2C36;
    font-weight: 600;
    font-size: 24px;
    padding: 4px 8px;
    border-radius: 8px;
    letter-spacing: .5px;
}
input[type="date"] {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    box-sizing: border-box;
}
/* =========================================================
   FORCE MOBILE: toujours 1 colonne + ignore les form-break
   ========================================================= */
@media (max-width: 768px) {

  .form-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Chaque champ prend toute la largeur */
  .form-grid > .form-field,
  .form-grid > .field {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }

  /* On ignore totalement les breaks sur mobile */
  .form-grid > .form-break {
    display: none !important;
  }

  /* Champ date : confortable et pas trop large */
  .form-grid input[type="date"]{
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    font-size: 16px !important; /* évite le zoom iOS parfois */
  }
}
.btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
}
/* =========================
   Annexes PC – Card blanche
   ========================= */

.annexes-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 18px;
    margin-top: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    max-width: 700px;
}

.annexes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

/* Formulaire */
.annexe-form {
    margin-bottom: 16px;
}

.annexe-row {
    margin-bottom: 10px;
}

.annexe-form input[type="file"],
.annexe-form input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.annexe-form input[type="file"] {
    background: #f9fafb;
}

.annexe-form button {
    background: #2563eb; /* bleu DisaTime */
    color: #fff;
    border: none;
    padding: 9px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.annexe-form button:hover {
    background: #1e40af;
}

/* Liste annexes */
.annexes-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.annexes-list li {
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.annexes-list li:last-child {
    border-bottom: none;
}
.annexe-form select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: #fff;
}
/* =========================
   Ligne date + badges PC
   ========================= */

.pc-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.pc-meta-left .small {
    font-size: 12px;
    color: #6b7280; /* gris doux */
}

/* badges à droite */
.pc-badges {
    display: flex;
    gap: 6px;
}

/* badges existants */
.pc-badge {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.badge-complet {
    background-color: #dcfce7;
    color: #166534;
}

/* Rouge pâle – Non complet */
.badge-non-complet {
    background-color: #fee2e2; /* rouge très clair */
    color: #991b1b;           /* rouge foncé lisible */
}
.badge-garantie-ko {
    background: #fecaca;
    color: #7f1d1d;
    font-size: 0.75rem;
    padding: 3px 7px;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-vendu {
    background-color: #e0f2fe;
    color: #075985;
}
.badge-contrat{
    background:#20c997;
    color:white;
    padding:2px 6px;
    border-radius:6px;
    font-size:11px;
}

@media (max-width: 500px) {
    .pc-card-meta {
        flex-direction: column;
        align-items: flex-end;
    }

    .pc-meta-left {
        align-self: flex-start;
        margin-bottom: 4px;
    }
}

/* SIDE BAR de Gauche*/
.pw-sidebar {
    position: fixed;
    top: var(--topbar-height);     /* 👈 clé du problème */
    left: 0;
    width: var(--pw-sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: #f8fafc;
    border-right: 1px solid #e5e7eb;
    padding: 16px 12px;
    overflow-y: auto;
}


.pw-nav-item {
    display: block;
    padding: 10px 14px;
    margin-bottom: 6px;
    text-decoration: none;
    color: #1f2937;
    border-radius: 6px;
    font-weight: 500;
}

.pw-nav-item:hover {
    background: #e0e7ff;
    color: #1e3a8a;
}

.pw-nav-item.active {
    background: #c7d2fe;
    color: #1e40af;
    font-weight: 600;
}

.pw-nav-item.logout {
    color: #b91c1c;
}

.pw-content {
    margin-left: var(--pw-sidebar-width);
    padding: 20px;
    padding-top: calc(var(--topbar-height) + 20px);
}
@media (max-width: 768px) {
    .pw-sidebar {
        position: relative;
        top: 0;
        width: 100%;
        height: auto;
    }

    .pw-content {
        margin-left: 0;
        padding-top: 20px;
    }
}

/* glisser déplacer*/
.annexe-dropzone-card {
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    cursor: pointer;
    min-height: 220px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.2s ease;
}

.annexe-dropzone-card.dragover {
    background: #e0e7ff;
    border-color: #4f46e5;
    color: #1e40af;
}

.annexe-item {
    margin-bottom: 10px;
}

.annexe-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.annexe-meta {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
}

.annexe-desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.annexe-date {
    white-space: nowrap;
    font-size: 11px;
    opacity: 0.8;
}

.annexe-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.35;
}

.annexe-delete:hover {
    opacity: 1;
    color: #dc2626;
}

.dropzone-content {
    text-align: center;
    pointer-events: none; /* important */
}

.dropzone-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.dropzone-title {
    font-size: 18px;
    font-weight: 600;
}

.dropzone-sub {
    font-size: 14px;
    color: #475569;
    margin-top: 6px;
}

.dropzone-hint {
    font-size: 13px;
    color: #64748b;
    margin-top: 12px;
    font-style: italic;
}
@media (max-width: 900px) {
    .annexes-grid {
        grid-template-columns: 1fr;
    }
}
/* Overlay sombre */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 40, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-overlay[hidden] {
    display: none !important;
}

/* Carte blanche centrée */
.modal-card {
    background: #ffffff;
    color: #111827;
    border-radius: 16px;
    padding: 24px 28px;
    width: 420px;
    max-width: 90%;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}

/* Titre */
.modal-card h3 {
    margin-top: 0;
    margin-bottom: 18px;
    color: #1e3a8a;
}

/* Champs */
.modal-field {
    margin-bottom: 16px;
}

.modal-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.modal-field input,
.modal-field select {
    width: 100%;
    padding: 9px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

/* Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

/* Boutons */
.btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
}
.modal-content {
    background: #fff;
    max-width: 420px;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
}
.fc-actions {
    display: flex;
    gap: 10px; /* 👈 espace entre les boutons */
    margin-top: 16px;
}
.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}
/* Slider pour les boutons Oui/Non */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #6c63ff; /* couleur comme ton image */
}

input:checked + .slider:before {
    transform: translateX(20px);
}
.search-wrapper {
    position: relative;
}

.search-wrapper input {
    width: 100%;
    padding: 14px 42px 14px 14px;
    font-size: 18px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

/* bouton croix */
.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
    display: none;
}

.search-clear:hover {
    opacity: 0.9;
}

/* afficher la croix uniquement si le champ n’est pas vide */
.search-wrapper input:not(:placeholder-shown) + .search-clear {
    display: block;
}
.badge-usage {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.badge-usage-ok {
    background: #d1f7d6;
    color: #146c2e;
}

.badge-usage-equal {
    background: #dbeafe;
    color: #0b5ed7;
}

.badge-usage-full {
    background: #ffd9d9;
    color: #b42318;
}
.btn-success {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
}
.btn-success:hover {
    background:#218838;
}
.btn-sm {
    padding:4px 8px;
    font-size:13px;
}

.item {
    padding:8px 10px;
    border-bottom:1px solid #eee;
}
/* ===============================
   Mini bouton Copier (Win11 style)
   =============================== */

.btn-copy-mini {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition: background 0.15s ease, transform 0.05s ease;
}

/* Icône SVG */
.btn-copy-mini svg {
    width: 14px;
    height: 14px;
    stroke: #555;
}

/* Hover */
.btn-copy-mini:hover {
    background: rgba(0,0,0,0.06);
}

/* Click */
.btn-copy-mini:active {
    transform: scale(0.92);
}

/* Feedback quand copié */
.btn-copy-mini.copied {
    background: rgba(0, 120, 215, 0.15);
}

.btn-copy-mini.copied svg {
    stroke: #0078d7;
}

.btn-copy-login {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition: background 0.15s ease, transform 0.05s ease;
}

/* Icône SVG */
.btn-copy-login svg {
    width: 14px;
    height: 14px;
    stroke: #555;
}

/* Hover */
.btn-copy-login:hover {
    background: rgba(0,0,0,0.06);
}

/* Click */
.btn-copy-login:active {
    transform: scale(0.92);
}

/* Feedback quand copié */
.btn-copy-login.copied {
    background: rgba(0, 120, 215, 0.15);
}

.btn-copy-login.copied svg {
    stroke: #0078d7;
}


.alias-card {
    background: #eef5ff;
    border-left: 4px solid #4a90e2;
    padding: 6px 10px;
    margin: 6px 0;
    font-size: 13px;
    border-radius: 6px;
    color: #2c3e50;
}
.shared-mail {
    background-color: #f3fbf5;   /* vert très pâle */
    border-left: 5px solid #2ecc71;
}
.shared-badge {
    background: #e6f4ff;
    color: #0b5394;
    border: 1px solid #b3d7ff;
}
.btn-anydesk {
    display: inline-block;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: bold;
    background: #e74c3c;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: 0.2s;
}

.btn-anydesk:hover {
    background: #c0392b;
}
.btn-action-mini {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 5px;
	background: #e74c3c;
	color: white;
	text-decoration: none;
	transition: 0.15s ease;
}

.btn-action-mini svg {
	width: 14px;
	height: 14px;
	stroke: none;
}

.btn-action-mini:hover {
	background: #c0392b;
}
.field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
/* Wrapper horizontal interne */
.form-field-button .button-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Le champ prend tout l'espace restant */
.form-field-button .form-control {
    flex: 1;
}

/* Bouton rouge mini */
.btn-anydesk-mini {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e74c3c;
    color: white;
    border-radius: 8px; /* même arrondi que tes inputs */
    text-decoration: none;
    flex-shrink: 0;
    transition: 0.15s ease;
}

.btn-anydesk-mini:hover {
    background: #c0392b;
}

.btn-anydesk-mini svg {
    width: 14px;
    height: 14px;
}
.mini-launch {
    font-size: 13px;
    text-decoration: none;
    margin-left: 4px;
    cursor: pointer;
    opacity: 0.75;
    transition: 0.15s ease;
}

.mini-launch:hover {
    opacity: 1;
    transform: scale(1.1);
}
.mini-pc-btn {
    font-size: 13px;
    text-decoration: none;
    margin-left: 3px;
    opacity: 0.75;
    transition: 0.15s ease;
}

.mini-pc-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.emp-pc-link {
    margin-right: 8px;
}
.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background-color: #1ebe5d;
}
.office-badge {
    background: #f1e6ff;        /* mauve clair */
    color: #5b2d91;             /* mauve foncé */
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 14px;
    display: inline-block;
    float: right;
    margin-left: 8px;
}
.pw-inline {
    display:flex;
    align-items:center;
    gap:6px;
}

.pw-compact {
    display:flex;
    align-items:center;
    gap:4px;
}

.pw-mini {
    width:110px;
    padding:2px 6px;
    font-size:12px;
    border:1px solid #ddd;
    border-radius:6px;
    background:#f8f8f8;
}

.btn-eye-mini {
    background:none;
    border:none;
    font-size:14px;
    cursor:pointer;
    padding:0;
}

.btn-eye-mini:hover {
    opacity:0.7;
}
.field-password{ position:relative; }

.field-password input{
  width:100%;
  padding-right:95px;       /* réserve la place des 2 boutons */
  box-sizing:border-box;
}

.pw-actions{
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  gap:6px;                  /* petit espace entre boutons */
}

.pw-btn{
  width:34px;
  height:34px;
  border:none;
  background:#e6e9ee;
  border-radius:8px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

.pw-btn:hover{ background:#d9dde3; }


.logiciels-multi-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    margin-bottom: 12px;
}

.logiciel-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.logiciel-check:last-child {
    border-bottom: none;
}

.logiciel-check input[type="checkbox"] {
    transform: scale(1.1);
}
/* =========================================================
   PWGESTION DESIGN SYSTEM 2026
   Composants communs et accueil
   ========================================================= */

:root {
    --pw-primary: #2563eb;
    --pw-primary-dark: #1e40af;
    --pw-accent: #0d9488;
    --pw-ink: #172033;
    --pw-muted: #64748b;
    --pw-border: #dce3ed;
    --pw-surface: #ffffff;
    --pw-surface-soft: #f7f9fc;
    --pw-danger: #dc2626;
    --pw-radius-sm: 9px;
    --pw-radius: 14px;
    --pw-radius-lg: 20px;
    --pw-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 14px rgba(15, 23, 42, .05);
    --pw-shadow: 0 12px 32px rgba(15, 23, 42, .09);
    --pw-transition: 160ms ease;
}

html {
    color-scheme: light;
}

body.pw-app {
    min-height: 100vh;
    color: var(--pw-ink);
    background: var(--pw-surface-soft);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.pw-app a:focus-visible,
.pw-app button:focus-visible,
.pw-app input:focus-visible,
.pw-app select:focus-visible,
.pw-app textarea:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .28);
    outline-offset: 2px;
}

.pw-dashboard-header {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 12px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid rgba(220, 227, 237, .85);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 12px rgba(15, 23, 42, .04);
    backdrop-filter: blur(14px);
}

.pw-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--pw-ink);
    text-decoration: none;
}

.pw-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, var(--pw-primary), var(--pw-accent));
    box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.pw-brand > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.pw-brand strong {
    font-size: 17px;
    letter-spacing: -.025em;
}

.pw-brand small {
    margin-top: 4px;
    color: var(--pw-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.pw-user-menu {
    display: flex;
    align-items: center;
    gap: 9px;
}

.pw-company-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--pw-border);
    border-radius: 999px;
    color: #334155;
    background: #fff;
    font-size: 13px;
    font-weight: 650;
}

.pw-icon-link {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--pw-border);
    border-radius: 12px;
    color: var(--pw-ink);
    background: #fff;
    text-decoration: none;
    transition: transform var(--pw-transition), border-color var(--pw-transition), background var(--pw-transition);
}

.pw-icon-link:hover {
    transform: translateY(-1px);
    border-color: #b9c8dc;
    background: #f8fafc;
}

.pw-icon-link-danger:hover {
    border-color: #fecaca;
    color: var(--pw-danger);
    background: #fef2f2;
}

.pw-dashboard-shell {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(34px, 6vw, 74px) 0 48px;
}

.pw-dashboard-intro {
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    padding: clamp(26px, 5vw, 46px);
    border: 1px solid #d8e2f0;
    border-radius: var(--pw-radius-lg);
    background:
        radial-gradient(circle at 92% 10%, rgba(13, 148, 136, .15), transparent 28%),
        radial-gradient(circle at 74% 90%, rgba(37, 99, 235, .14), transparent 35%),
        #fff;
    box-shadow: var(--pw-shadow-sm);
}

.pw-dashboard-intro::after {
    position: absolute;
    right: clamp(20px, 8vw, 100px);
    bottom: -52px;
    width: 170px;
    height: 170px;
    border: 28px solid rgba(37, 99, 235, .05);
    border-radius: 50%;
    content: "";
}

.pw-eyebrow {
    margin: 0 0 10px;
    color: var(--pw-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.pw-dashboard-intro h1 {
    max-width: 720px;
    margin: 0;
    color: var(--pw-ink);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.pw-dashboard-intro > div > p:last-child {
    max-width: 650px;
    margin: 15px 0 0;
    color: var(--pw-muted);
    font-size: clamp(14px, 2vw, 17px);
    line-height: 1.6;
}

.pw-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.pw-module-card {
    --module-color: var(--pw-primary);
    --module-soft: #eff6ff;
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 132px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius);
    color: var(--pw-ink);
    background: var(--pw-surface);
    box-shadow: var(--pw-shadow-sm);
    text-decoration: none;
    transition: transform var(--pw-transition), border-color var(--pw-transition), box-shadow var(--pw-transition);
}

.pw-module-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--module-color);
    content: "";
    opacity: .8;
}

.pw-module-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--module-color) 35%, #dce3ed);
    box-shadow: var(--pw-shadow);
}

.pw-module-icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 14px;
    background: var(--module-soft);
    font-size: 24px;
}

.pw-module-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.pw-module-content strong {
    font-size: 16px;
    line-height: 1.3;
}

.pw-module-content small {
    margin-top: 6px;
    color: var(--pw-muted);
    font-size: 12.5px;
    line-height: 1.45;
}

.pw-module-arrow {
    color: var(--module-color);
    font-size: 21px;
    font-weight: 700;
    transition: transform var(--pw-transition);
}

.pw-module-card:hover .pw-module-arrow {
    transform: translateX(3px);
}

.pw-tone-cyan { --module-color: #0891b2; --module-soft: #ecfeff; }
.pw-tone-blue { --module-color: #2563eb; --module-soft: #eff6ff; }
.pw-tone-violet { --module-color: #7c3aed; --module-soft: #f5f3ff; }
.pw-tone-indigo { --module-color: #4f46e5; --module-soft: #eef2ff; }
.pw-tone-pink { --module-color: #db2777; --module-soft: #fdf2f8; }
.pw-tone-green { --module-color: #059669; --module-soft: #ecfdf5; }
.pw-tone-orange { --module-color: #ea580c; --module-soft: #fff7ed; }
.pw-tone-slate { --module-color: #475569; --module-soft: #f1f5f9; }

.pw-admin-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 22px;
    padding: 20px 22px;
    border-radius: var(--pw-radius);
    color: #e2e8f0;
    background: #172033;
    box-shadow: var(--pw-shadow-sm);
}

.pw-admin-panel > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pw-admin-panel strong,
.pw-admin-panel small {
    display: block;
}

.pw-admin-panel small {
    margin-top: 4px;
    color: #94a3b8;
}

.pw-admin-icon {
    font-size: 26px;
}

.pw-btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--pw-transition), background var(--pw-transition);
}

.pw-btn:hover {
    transform: translateY(-1px);
}

.pw-btn-dark {
    flex: 0 0 auto;
    color: #172033;
    background: #fff;
}

.pw-btn-dark:hover {
    background: #e2e8f0;
}

.pw-dashboard-footer {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 18px 28px;
    color: #94a3b8;
    font-size: 12px;
}

@media (max-width: 900px) {
    .pw-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .pw-dashboard-header {
        min-height: 64px;
        padding: 10px 14px;
    }

    .pw-brand-mark {
        width: 40px;
        height: 40px;
    }

    .pw-brand small,
    .pw-company-badge {
        display: none;
    }

    .pw-dashboard-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 22px;
    }

    .pw-dashboard-intro {
        margin-bottom: 14px;
        padding: 24px 20px;
        border-radius: 16px;
    }

    .pw-dashboard-intro h1 {
        font-size: 29px;
    }

    .pw-module-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .pw-module-card {
        min-height: 102px;
        padding: 16px;
    }

    .pw-module-icon {
        width: 46px;
        height: 46px;
    }

    .pw-admin-panel {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pw-module-card,
    .pw-module-arrow,
    .pw-icon-link,
    .pw-btn {
        transition: none;
    }
}

/* En-tête partagé des pages métier */
.pw-page-header.header {
    position: sticky;
    z-index: 25;
    top: 0;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 360px) minmax(180px, 1fr);
    gap: 18px;
    min-height: 68px;
    align-items: center;
    padding: 11px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    background: linear-gradient(110deg, #1e40af, #2563eb 62%, #0f766e);
    box-shadow: 0 4px 18px rgba(15, 23, 42, .13);
}

.pw-page-header .header-left,
.pw-page-header .header-right {
    display: flex;
    align-items: center;
    gap: 9px;
}

.pw-page-header .header-right {
    justify-content: flex-end;
}

.pw-page-header h2 {
    overflow: hidden;
    color: #fff;
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pw-menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 10px;
    color: #fff;
    background: rgba(255,255,255,.12);
    font-size: 18px;
    cursor: pointer;
}

.pw-quick-search {
    display: flex;
    gap: 6px;
    width: 100%;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 12px;
    background: rgba(255, 255, 255, .13);
}

.pw-quick-search input {
    min-width: 0;
    width: 100%;
    height: 34px;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: transparent;
    font: inherit;
    font-size: 13px;
}

.pw-quick-search input::placeholder {
    color: rgba(255,255,255,.72);
}

.pw-quick-search input:focus {
    outline: none;
}

.pw-quick-search button {
    display: grid;
    width: 36px;
    flex: 0 0 36px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: #123;
    background: #fff;
    cursor: pointer;
}

.pw-page-header .back-btn {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid rgba(255,255,255,.19);
    border-radius: 10px;
    background: rgba(255,255,255,.12);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    transition: background var(--pw-transition), transform var(--pw-transition);
}

.pw-page-header .back-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.22);
}

@media (max-width: 760px) {
    .pw-page-header.header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        min-height: 62px;
        padding: 9px 11px;
    }

    .pw-menu-toggle {
        display: grid;
        place-items: center;
    }

    .pw-page-header h2 {
        font-size: 16px;
    }

    .pw-page-header .pw-quick-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .pw-page-header .header-right {
        max-width: 42vw;
        overflow-x: auto;
    }

    .pw-page-header .back-btn {
        min-height: 36px;
        padding: 6px 9px;
        font-size: 12px;
    }
}

/* =========================================================
   MODULES METIER : listes et fiches harmonisees
   ========================================================= */
.pw-entity-list,
.pw-entity-detail {
    --pw-module-color: #2563eb;
    --pw-module-soft: #eff6ff;
}

.pw-module-employes { --pw-module-color: #7c3aed; --pw-module-soft: #f5f3ff; }
.pw-module-pcs { --pw-module-color: #2563eb; --pw-module-soft: #eff6ff; }
.pw-module-nas { --pw-module-color: #059669; --pw-module-soft: #ecfdf5; }
.pw-module-perifs { --pw-module-color: #ea580c; --pw-module-soft: #fff7ed; }
.pw-module-sites { --pw-module-color: #0891b2; --pw-module-soft: #ecfeff; }
.pw-module-logiciels { --pw-module-color: #4f46e5; --pw-module-soft: #eef2ff; }
.pw-module-mails { --pw-module-color: #db2777; --pw-module-soft: #fdf2f8; }
.pw-module-contacts { --pw-module-color: #0d9488; --pw-module-soft: #f0fdfa; }
.pw-module-offices { --pw-module-color: #475569; --pw-module-soft: #f1f5f9; }
.pw-module-passwords { --pw-module-color: #9333ea; --pw-module-soft: #faf5ff; }
.pw-module-procedures { --pw-module-color: #4f46e5; --pw-module-soft: #eef2ff; }

.pw-entity-list .pw-content,
.pw-entity-detail .pw-content {
    padding-top: 24px;
}

.pw-entity-list .pw-content > .main,
.pw-entity-list .main > .page,
.pw-entity-detail .pw-content > .main,
.pw-entity-detail .main > .page {
    width: min(1180px, 100%);
    margin-right: auto;
    margin-left: auto;
}

.pw-entity-list .page,
.pw-entity-detail .page {
    color: var(--pw-ink);
}

.pw-entity-list .search-box {
    margin: 0 0 15px;
    padding: 13px;
    border: 1px solid var(--pw-border);
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--pw-shadow-sm);
}

.pw-entity-list .search-box input {
    min-height: 44px;
    font-size: 14px;
}

.pw-entity-list .list,
.pw-entity-list .items,
.pw-entity-list .cards-perif {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    padding: 0;
}

.pw-entity-list .item {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 16px 17px;
    overflow: hidden;
    border: 1px solid var(--pw-border);
    border-radius: 13px;
    color: var(--pw-ink);
    background: #fff;
    box-shadow: var(--pw-shadow-sm);
    transition: transform var(--pw-transition), border-color var(--pw-transition), box-shadow var(--pw-transition);
}

.pw-entity-list .item::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--pw-module-color);
    content: "";
    opacity: .7;
}

.pw-entity-list .item:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--pw-module-color) 38%, #dce3ed);
    box-shadow: var(--pw-shadow);
}

.pw-entity-list .item a,
.pw-entity-list .item-link {
    color: inherit;
    text-decoration: none;
}

.pw-entity-list .item strong,
.pw-entity-list .item-title,
.pw-entity-list .name {
    color: #263449;
    font-size: 14px;
    font-weight: 760;
}

.pw-entity-list .small,
.pw-entity-list .meta,
.pw-entity-list .item small {
    color: var(--pw-muted);
    line-height: 1.5;
}

.pw-entity-list .materiel-old {
    border-color: #fecaca;
    background: #fffafa;
}

.pw-entity-list .materiel-old::before {
    background: #dc2626;
}

.pw-entity-list .office-badge,
.pw-entity-list .pc-badge,
.pw-entity-list .badge {
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 780;
}

.pw-entity-detail .card-section,
.pw-entity-detail details,
.pw-entity-detail .annexes-card {
    border-color: var(--pw-border);
    background: #fff;
    box-shadow: var(--pw-shadow-sm);
}

.pw-entity-detail .card-section,
.pw-entity-detail .annexes-card {
    margin-bottom: 13px;
    border-radius: 14px;
}

.pw-entity-detail .card-section > h2,
.pw-entity-detail .card-section > h3,
.pw-entity-detail .section-title {
    color: #263449;
}

.pw-entity-detail details > summary {
    color: #263449;
    font-weight: 760;
    cursor: pointer;
}

.pw-entity-detail .form-grid {
    gap: 14px;
}

.pw-entity-detail .form-field,
.pw-entity-detail .fc-field {
    padding: 0;
}

.pw-entity-detail .drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 13px;
    color: var(--pw-muted);
    background: #f8fafc;
    transition: border-color var(--pw-transition), background var(--pw-transition);
}

.pw-entity-detail .drop-zone:hover,
.pw-entity-detail .drop-zone.dragover {
    border-color: var(--pw-module-color);
    background: var(--pw-module-soft);
}

.pw-entity-detail .modal-content,
.pw-entity-list .modal-content {
    border: 1px solid var(--pw-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

@media (max-width: 860px) {
    .pw-entity-list .list,
    .pw-entity-list .items,
    .pw-entity-list .cards-perif {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .pw-entity-list .pw-content,
    .pw-entity-detail .pw-content {
        padding-top: 13px;
    }

    .pw-entity-list .item {
        padding: 14px;
        border-radius: 11px;
    }

    .pw-entity-detail .card-section,
    .pw-entity-detail .annexes-card {
        border-radius: 12px;
    }
}

/* =========================================================
   MODULE CLIENTS : liste et fiche
   ========================================================= */
.pw-list-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 48px;
}

.pw-list-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 25px 28px;
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius-lg);
    background:
        radial-gradient(circle at 92% 16%, rgba(8, 145, 178, .16), transparent 26%),
        #fff;
    box-shadow: var(--pw-shadow-sm);
}

.pw-list-intro h1 {
    margin: 0;
    color: var(--pw-ink);
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -.035em;
}

.pw-list-intro p:last-child {
    margin: 8px 0 0;
    color: var(--pw-muted);
    font-size: 13px;
}

.pw-list-count {
    display: grid;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    place-items: center;
    border-radius: 20px;
    color: #0e7490;
    background: #ecfeff;
    font-size: 25px;
    font-weight: 850;
}

.pw-list-tools {
    display: grid;
    grid-template-columns: minmax(320px, 1.25fr) minmax(240px, .75fr);
    gap: 12px;
    margin-bottom: 17px;
    padding: 14px;
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius);
    background: #fff;
    box-shadow: var(--pw-shadow-sm);
}

.pw-create-inline {
    display: flex;
    gap: 8px;
}

.pw-create-inline input,
.pw-client-search {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: var(--pw-ink);
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.pw-client-search {
    padding-left: 40px;
    background-image: linear-gradient(transparent, transparent);
}

.pw-list-tools:has(.pw-client-search) {
    position: relative;
}

.pw-list-tools::after {
    position: absolute;
    top: 26px;
    right: calc(33.33% - 4px);
    color: #94a3b8;
    content: "⌕";
    font-size: 22px;
    pointer-events: none;
}

.pw-create-inline input:focus,
.pw-client-search:focus {
    border-color: var(--pw-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.pw-clients-page .list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    padding: 0;
}

.pw-clients-page .client {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    padding: 17px 18px;
    overflow: hidden;
    border: 1px solid var(--pw-border);
    border-radius: 13px;
    color: var(--pw-ink);
    background: #fff;
    box-shadow: var(--pw-shadow-sm);
    font-size: 16px;
    text-decoration: none;
    transition: transform var(--pw-transition), border-color var(--pw-transition), box-shadow var(--pw-transition);
}

.pw-clients-page .client::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: #0891b2;
    content: "";
    opacity: .65;
}

.pw-clients-page .client:hover {
    transform: translateY(-2px);
    border-color: #a9cddd;
    background: #fff;
    box-shadow: var(--pw-shadow);
}

.pw-clients-page .client-name {
    padding-left: 3px;
    font-size: 15px;
    font-weight: 760;
    letter-spacing: -.01em;
}

.pw-clients-page .client-right {
    gap: 6px;
}

.pw-clients-page .legacy {
    padding: 4px 7px;
    border-radius: 7px;
    color: #64748b;
    background: #f1f5f9;
    font-size: 11px;
}

.pw-clients-page .status,
.pw-client-detail-page .status {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.pw-clients-page .status.on,
.pw-client-detail-page .status.on {
    color: #047857;
    background: #d1fae5;
}

.pw-clients-page .status.off,
.pw-client-detail-page .status.off {
    color: #b91c1c;
    background: #fee2e2;
}

.pw-clients-page .status.complete {
    color: #0369a1;
    background: #e0f2fe;
}

.pw-clients-page .status.incomplete {
    color: #a16207;
    background: #fef3c7;
}

.pw-clients-page .star {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    font-size: 18px;
}

.pw-clients-page .star:hover {
    background: #fff8db;
}

.alert-success {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #a7f3d0;
    border-radius: 11px;
    color: #047857;
    background: #ecfdf5;
    font-size: 13px;
    font-weight: 650;
}

/* Fiche client */
.pw-client-shell {
    padding-top: 24px;
}

.pw-client-page {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.pw-client-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 17px;
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius-lg);
    background:
        radial-gradient(circle at 90% 10%, rgba(37, 99, 235, .12), transparent 28%),
        #fff;
    box-shadow: var(--pw-shadow-sm);
}

.pw-client-avatar {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    box-shadow: 0 10px 20px rgba(37, 99, 235, .2);
    font-size: 20px;
    font-weight: 850;
}

.pw-client-heading h1 {
    margin: 0;
    color: var(--pw-ink);
    font-size: clamp(23px, 3vw, 32px);
    letter-spacing: -.035em;
}

.pw-client-heading .pw-eyebrow {
    margin-bottom: 5px;
}

.pw-client-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
    color: var(--pw-muted);
    font-size: 12px;
}

.pw-client-meta a {
    color: var(--pw-primary);
    text-decoration: none;
}

.pw-client-detail-page .cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
    margin: 0 0 18px;
}

.pw-client-detail-page .card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: 11px;
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 84px;
    align-items: center;
    justify-content: stretch;
    padding: 15px;
    border: 1px solid var(--pw-border);
    border-radius: 13px;
    color: var(--pw-ink);
    background: #fff;
    box-shadow: var(--pw-shadow-sm);
    text-align: left;
}

.pw-client-detail-page .card:hover {
    transform: translateY(-2px);
    border-color: #bad0e9;
    background: #fff;
    box-shadow: var(--pw-shadow);
}

.pw-client-detail-page .card .icon {
    display: grid;
    width: 42px;
    height: 42px;
    grid-row: 1;
    place-items: center;
    border-radius: 12px;
    background: #eff6ff;
    font-size: 20px;
}

.pw-client-detail-page .card .label {
    grid-row: 1;
    margin: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 720;
}

.pw-client-detail-page .card .count {
    display: grid;
    min-width: 30px;
    height: 30px;
    grid-row: 1;
    place-items: center;
    margin: 0;
    border-radius: 9px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 13px;
}

.pw-client-form {
    display: grid;
    gap: 13px;
}

.pw-client-code-legacy {
    display: none;
}

.pw-client-detail-page details.card-section {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.pw-client-detail-page details.card-section > summary {
    position: relative;
    padding: 16px 48px 16px 18px;
    color: #263449;
    background: #fff;
    font-size: 14px;
    font-weight: 780;
    cursor: pointer;
    list-style: none;
    transition: background var(--pw-transition);
}

.pw-client-detail-page details.card-section > summary::-webkit-details-marker {
    display: none;
}

.pw-client-detail-page details.card-section > summary::after {
    position: absolute;
    top: 50%;
    right: 18px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    color: #64748b;
    background: #f1f5f9;
    content: "+";
    line-height: 26px;
    text-align: center;
    transform: translateY(-50%);
}

.pw-client-detail-page details[open].card-section > summary {
    border-bottom: 1px solid var(--pw-border);
    background: #f8fafc;
}

.pw-client-detail-page details[open].card-section > summary::after {
    content: "−";
}

.pw-client-detail-page details.card-section > :not(summary) {
    margin-right: 18px;
    margin-left: 18px;
}

.pw-client-detail-page details.card-section > :last-child {
    margin-bottom: 18px;
}

.pw-client-detail-page details.card-section .form-grid:first-of-type {
    margin-top: 18px;
}

.pw-client-detail-page .fc-memo-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
}

@media (max-width: 980px) {
    .pw-client-detail-page .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .pw-list-shell {
        width: min(100% - 22px, 1120px);
        padding-top: 16px;
    }

    .pw-list-intro {
        padding: 19px;
        border-radius: 15px;
    }

    .pw-list-count {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
        border-radius: 15px;
        font-size: 20px;
    }

    .pw-list-tools {
        grid-template-columns: 1fr;
        padding: 11px;
    }

    .pw-list-tools::after {
        display: none;
    }

    .pw-clients-page .list {
        grid-template-columns: 1fr;
    }

    .pw-create-inline {
        align-items: stretch;
        flex-direction: column;
    }

    .pw-clients-page .client {
        padding: 15px 13px;
    }

    .pw-clients-page .client-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .pw-clients-page .client-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .pw-client-shell {
        padding-top: 13px;
    }

    .pw-client-hero {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 17px;
        border-radius: 15px;
    }

    .pw-client-hero > .btn-secondary {
        grid-column: 1 / -1;
    }

    .pw-client-avatar {
        width: 52px;
        height: 52px;
        border-radius: 15px;
        font-size: 17px;
    }

    .pw-client-detail-page .cards {
        grid-template-columns: 1fr;
    }

    .pw-client-detail-page .fc-memo-block {
        grid-template-columns: 1fr;
    }
}

/* Composants métier communs : cartes, formulaires, boutons et tableaux */
body:not(.pw-dashboard-page) {
    color: var(--pw-ink);
    background-color: var(--pw-surface-soft);
}

.page,
.pw-content {
    color: var(--pw-ink);
}

.card-section,
.form-section,
.annexes-card {
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius);
    background: var(--pw-surface);
    box-shadow: var(--pw-shadow-sm);
}

.card-section {
    margin-bottom: 16px;
    padding: clamp(16px, 2vw, 22px);
}

.card-section > h2,
.card-section > h3,
.form-section > h2,
.form-section > h3 {
    margin-top: 0;
    color: var(--pw-ink);
    letter-spacing: -.02em;
}

.form-grid {
    gap: 15px;
}

.form-field,
.field,
.modal-field,
.fc-field {
    min-width: 0;
}

.form-field label,
.field label,
.modal-field label,
.fc-field label {
    display: block;
    margin-bottom: 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .015em;
}

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea,
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea,
.modal-field input:not([type="checkbox"]):not([type="radio"]),
.modal-field select,
.modal-field textarea,
.fc-field input:not([type="checkbox"]):not([type="radio"]),
.fc-field select,
.fc-field textarea,
.search-box input {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: var(--pw-radius-sm);
    color: var(--pw-ink);
    background: #fff;
    font: inherit;
    font-size: 14px;
    transition: border-color var(--pw-transition), box-shadow var(--pw-transition), background var(--pw-transition);
}

.form-field textarea,
.field textarea,
.modal-field textarea,
.fc-field textarea {
    min-height: 98px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.modal-field input:focus,
.modal-field select:focus,
.modal-field textarea:focus,
.fc-field input:focus,
.fc-field select:focus,
.fc-field textarea:focus,
.search-box input:focus {
    border-color: var(--pw-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}

.readonly,
input[readonly],
textarea[readonly],
select:disabled,
input:disabled,
textarea:disabled {
    color: #64748b;
    background: #f1f5f9 !important;
    cursor: not-allowed;
}

.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-sm {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--pw-transition), filter var(--pw-transition), box-shadow var(--pw-transition);
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-sm:hover {
    transform: translateY(-1px);
    filter: brightness(.97);
}

.btn-primary {
    color: #fff;
    background: var(--pw-primary);
    box-shadow: 0 5px 12px rgba(37, 99, 235, .18);
}

.btn-secondary {
    border-color: var(--pw-border);
    color: #334155;
    background: #fff;
}

.btn-success {
    color: #fff;
    background: #059669;
}

.btn-danger {
    color: #fff;
    background: var(--pw-danger);
}

.btn-sm {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
}

table {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--pw-border);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--pw-shadow-sm);
}

th {
    padding: 11px 13px;
    border-bottom: 1px solid var(--pw-border);
    color: #475569;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .045em;
    text-align: left;
    text-transform: uppercase;
}

td {
    padding: 11px 13px;
    border-bottom: 1px solid #edf1f6;
    color: #334155;
    font-size: 13px;
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr {
    transition: background var(--pw-transition);
}

tbody tr:hover {
    background: #f8fbff;
}

.badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
}

.badge.ok,
.ok.badge {
    color: #047857;
    background: #d1fae5;
}

.badge.off,
.off.badge {
    color: #b91c1c;
    background: #fee2e2;
}

@media (max-width: 760px) {
    .pw-content,
    .page {
        padding-right: 12px;
        padding-left: 12px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .card-section {
        padding: 15px;
        border-radius: 12px;
    }

    .table-responsive,
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Navigation latérale commune */
.pw-sidebar {
    top: 68px;
    width: var(--pw-sidebar-width);
    padding: 15px 12px;
    border-right: 1px solid var(--pw-border);
    background: rgba(255, 255, 255, .97);
    box-shadow: 5px 0 22px rgba(15, 23, 42, .04);
}

.pw-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pw-sidebar hr {
    width: 100%;
    margin: 10px 0;
    border: 0;
    border-top: 1px solid var(--pw-border);
}

.pw-sidebar .pw-nav-item {
    display: flex;
    min-height: 42px;
    align-items: center;
    margin: 0;
    padding: 9px 11px;
    border-radius: 10px;
    color: #475569;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.25;
    transition: color var(--pw-transition), background var(--pw-transition), transform var(--pw-transition);
}

.pw-nav-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-right: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .9;
}

/* Pages autonomes : connexion, profil, paramètres, rapports et manager */
.pw-auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 15% 15%, rgba(37, 99, 235, .2), transparent 28%),
        radial-gradient(circle at 88% 82%, rgba(13, 148, 136, .18), transparent 30%),
        #eef3f9;
}

.pw-auth-page .login-box {
    position: relative;
    width: min(100%, 420px);
    padding: 34px;
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 22px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 24px 65px rgba(15, 23, 42, .15);
}

.pw-auth-page .login-box::before {
    display: grid;
    width: 54px;
    height: 54px;
    margin: 0 auto 17px;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--pw-primary), var(--pw-accent));
    box-shadow: 0 10px 24px rgba(37, 99, 235, .24);
    content: "PW";
    font-weight: 850;
}

.pw-auth-page .login-box h1 {
    margin: 0;
    color: var(--pw-ink);
    font-size: 27px;
    letter-spacing: -.035em;
}

.pw-auth-page .societe {
    margin: 7px 0 25px;
    color: var(--pw-muted);
}

.pw-auth-page .login-box label {
    display: block;
    margin: 12px 0 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
}

.pw-auth-page .login-box input:not([type="checkbox"]) {
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: var(--pw-ink);
    background: #fff;
    font: inherit;
}

.pw-auth-page .login-box input:focus {
    border-color: var(--pw-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}

.pw-auth-page .login-box button[type="submit"] {
    width: 100%;
    min-height: 46px;
    margin-top: 18px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(110deg, var(--pw-primary), #1d4ed8);
    font: inherit;
    font-weight: 780;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .2);
}

.pw-auth-page .error,
.pw-standalone-page .error,
.pw-standalone-page .err {
    padding: 11px 13px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #b91c1c;
    background: #fef2f2;
    font-size: 13px;
}

.pw-standalone-page > .container,
.pw-profile-page > .container,
.pw-code-search-page .card-search {
    width: min(720px, calc(100% - 28px));
    margin: 36px auto;
    padding: clamp(20px, 4vw, 32px);
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius-lg);
    background: #fff;
    box-shadow: var(--pw-shadow);
}

.pw-profile-page .pw-content > .container {
    width: min(720px, 100%);
    margin: 12px auto 36px;
    padding: clamp(20px, 4vw, 32px);
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius-lg);
    background: #fff;
    box-shadow: var(--pw-shadow);
}

.pw-code-search-page .card-search {
    max-width: 520px;
}

.pw-code-search-page .input,
.pw-code-search-page .btn-search {
    min-height: 46px;
    border-radius: 10px;
    font: inherit;
}

.pw-code-search-page .input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
}

.pw-code-search-page .btn-search {
    width: 100%;
    margin-top: 10px;
    border: 0;
    color: #fff;
    background: var(--pw-primary);
    font-weight: 750;
}

.pw-settings-page .layout,
.pw-manager-page .wrap,
.pw-manager-page .list,
.pw-report-detail-page .page,
.pw-reports-page .page {
    width: min(1160px, calc(100% - 30px));
    margin-right: auto;
    margin-left: auto;
}

.pw-reports-page .pw-sidebar {
    width: 220px;
    max-width: 220px;
}

.pw-reports-page .pw-content {
    width: auto;
    min-height: calc(100vh - 68px);
    margin-left: 220px;
    padding-top: 24px;
}

.pw-reports-shell {
    width: min(980px, 100%);
}

.pw-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pw-report-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    min-height: 120px;
    padding: 20px;
    border: 1px solid var(--pw-border);
    border-radius: 15px;
    color: var(--pw-ink);
    background: #fff;
    box-shadow: var(--pw-shadow-sm);
    text-decoration: none;
    transition: transform var(--pw-transition), border-color var(--pw-transition), box-shadow var(--pw-transition);
}

.pw-report-card:hover {
    transform: translateY(-2px);
    border-color: #a9cddd;
    box-shadow: var(--pw-shadow);
}

.pw-report-icon {
    width: 48px;
    height: 48px;
    padding: 12px;
    border-radius: 14px;
    fill: none;
    stroke: #0e7490;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    background: #ecfeff;
}

.pw-report-card span {
    display: flex;
    flex-direction: column;
}

.pw-report-card strong {
    font-size: 15px;
}

.pw-report-card small {
    margin-top: 6px;
    color: var(--pw-muted);
    line-height: 1.45;
}

.pw-report-card b {
    color: #0891b2;
    font-size: 20px;
}

@media (max-width: 760px) {
    .pw-reports-page .pw-sidebar {
        width: min(290px, 86vw);
        max-width: none;
    }

    .pw-reports-page .pw-content {
        margin-left: 0;
        padding-top: 13px;
    }

    .pw-report-grid {
        grid-template-columns: 1fr;
    }
}

.pw-settings-page .layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
    padding-top: 24px;
}

.pw-settings-page .menu,
.pw-settings-page .content,
.pw-settings-page .form-card {
    border: 1px solid var(--pw-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: var(--pw-shadow-sm);
}

.pw-settings-page .menu {
    padding: 12px;
}

.pw-settings-page .menu a {
    display: block;
    margin: 3px 0;
    padding: 10px 11px;
    border-radius: 9px;
    color: #475569;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.pw-settings-page .menu a:hover {
    color: var(--pw-primary-dark);
    background: #eff6ff;
}

.pw-settings-page .content,
.pw-settings-page .form-card {
    padding: 22px;
}

.pw-manager-page .wrap,
.pw-manager-page .list {
    padding-top: 24px;
}

.pw-manager-page .card,
.pw-manager-page .societe {
    margin-bottom: 10px;
    padding: 16px 18px;
    border: 1px solid var(--pw-border);
    border-radius: 13px;
    color: var(--pw-ink);
    background: #fff;
    box-shadow: var(--pw-shadow-sm);
    text-decoration: none;
    transition: transform var(--pw-transition), box-shadow var(--pw-transition);
}

.pw-manager-page .card:hover,
.pw-manager-page .societe:hover {
    transform: translateY(-2px);
    box-shadow: var(--pw-shadow);
}

.pw-report-detail-page .page,
.pw-reports-page .page {
    padding-top: 24px;
    padding-bottom: 40px;
}

@media (max-width: 760px) {
    .pw-auth-page {
        padding: 14px;
    }

    .pw-auth-page .login-box {
        padding: 25px 20px;
        border-radius: 17px;
    }

    .pw-settings-page .layout {
        grid-template-columns: 1fr;
        padding-top: 13px;
    }

    .pw-settings-page .menu {
        display: flex;
        overflow-x: auto;
    }

    .pw-settings-page .menu a {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

.pw-sidebar .pw-nav-item.active .pw-nav-icon {
    opacity: 1;
}

.pw-sidebar .pw-nav-item:hover {
    transform: translateX(2px);
    color: var(--pw-primary-dark);
    background: #eff6ff;
}

.pw-sidebar .pw-nav-item.active {
    color: #fff;
    background: linear-gradient(110deg, var(--pw-primary), #1d4ed8);
    box-shadow: 0 7px 15px rgba(37, 99, 235, .2);
}

.pw-sidebar .pw-nav-item.logout {
    margin-top: 3px;
    color: #b91c1c;
    background: #fff7f7;
}

.pw-sidebar .pw-nav-item.logout:hover {
    color: #991b1b;
    background: #fee2e2;
}

@media (max-width: 760px) {
    .pw-sidebar {
        position: fixed;
        z-index: 40;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(290px, 86vw);
        height: 100dvh;
        padding-top: 18px;
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    .pw-sidebar.open {
        transform: translateX(0);
    }

    .pw-content {
        margin-left: 0;
    }
}
