/*
===============================================================================
Fichier : /css/app.css
Créé le : 2026-03-18 10:05 (Europe/Zurich)
Modifié le : 2026-03-18 10:05 (Europe/Zurich)
Auteur : OpenAI
-------------------------------------------------------------------------------
Rôle :
- Ligne graphique unique de l'atelier
- Contraste fort, cartes aérées, responsive PC + tablette
- Harmonisation des formulaires, tableaux, alertes et boutons
===============================================================================
*/
:root {
    --bg: #0f172a;
    --bg-soft: #172554;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --line: #dbe4f0;
    --text: #0f172a;
    --muted: #475569;
    --primary: #2563eb;
    --primary-strong: #1d4ed8;
    --success: #15803d;
    --warning: #b45309;
    --danger: #b91c1c;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
    --radius: 18px;
    --radius-sm: 12px;
    --container: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 28%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 22%),
        linear-gradient(180deg, #0f172a 0%, #172554 100%);
    color: var(--text);
    font: 16px/1.5 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: rgba(15, 23, 42, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
}

.brand-title {
    display: inline-block;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.brand-subtitle {
    margin: 4px 0 0;
    color: rgba(255,255,255,0.72);
    font-size: 0.95rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255,255,255,0.88);
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
    transition: 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.12);
    outline: none;
}

.nav-link.is-active {
    background: rgba(59,130,246,0.22);
    border-color: rgba(96,165,250,0.45);
    color: #ffffff;
}

.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-content {
    flex: 1;
    padding: 28px 0 40px;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 0 0 22px;
}

.page-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.65rem, 2vw, 2.2rem);
    line-height: 1.15;
}

.page-description {
    margin: 8px 0 0;
    color: rgba(255,255,255,0.78);
    max-width: 920px;
}

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
    border: 1px solid rgba(219,228,240,0.82);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin: 0 0 18px;
}

.card h2,
.card h3,
.card h4 {
    margin: 0 0 10px;
    color: var(--text);
}

.card p:last-child,
.card ul:last-child,
.card ol:last-child,
.card table:last-child {
    margin-bottom: 0;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.row > * {
    flex: 1 1 220px;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

.kpi {
    padding: 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}

.kpi strong {
    display: block;
    font-size: 1.6rem;
    line-height: 1.05;
    margin-bottom: 6px;
}

.muted,
.small {
    color: var(--muted);
}

.small {
    font-size: 0.92rem;
}

.badge,
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge.badge-success,
.chip.chip-success {
    background: #ecfdf3;
    border-color: #86efac;
    color: #166534;
}

.badge.badge-warning,
.chip.chip-warning {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.badge.badge-danger,
.chip.chip-danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    margin-bottom: 16px;
}

.alert.alert-success {
    background: #ecfdf3;
    border-color: #86efac;
    color: #166534;
}

.alert.alert-danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.alert.alert-info {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:hover,
button.btn:hover,
.btn:focus-visible,
button.btn:focus-visible {
    transform: translateY(-1px);
    background: #f8fafc;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    outline: none;
}

.btn-primary,
button.btn-primary {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%);
    color: #ffffff;
    border-color: transparent;
}

.btn-primary:hover,
button.btn-primary:hover,
.btn-primary:focus-visible,
button.btn-primary:focus-visible {
    background: linear-gradient(180deg, #3b82f6 0%, var(--primary-strong) 100%);
}

.btn-danger,
button.btn-danger {
    background: #ffffff;
    color: var(--danger);
    border-color: #fecaca;
}

.btn-ghost,
button.btn-ghost {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255,255,255,0.18);
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--text);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96,165,250,0.18);
    outline: none;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--primary);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #ffffff;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.table th,
.table td {
    padding: 14px 14px;
    border-bottom: 1px solid #e5edf6;
    text-align: left;
    vertical-align: top;
}

.table th {
    background: #eef4fb;
    color: #1e3a8a;
    font-size: 0.9rem;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: #f8fbff;
}

.actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inline-form {
    display: inline-flex;
}

.definition-list {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px 14px;
    margin: 0;
}

.definition-list dt {
    font-weight: 700;
    color: var(--muted);
}

.definition-list dd {
    margin: 0;
}

.site-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(15,23,42,0.92);
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0 26px;
    color: rgba(255,255,255,0.76);
}

.site-footer-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.search-panel {
    display: grid;
    gap: 16px;
}

.search-results {
    display: grid;
    gap: 12px;
}

.result-card {
    padding: 16px;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    border: 1px solid var(--line);
}

.result-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.result-title {
    margin: 0;
    font-size: 1.05rem;
}

.empty-state {
    padding: 24px;
    border-radius: var(--radius-sm);
    border: 1px dashed #94a3b8;
    background: rgba(255,255,255,0.6);
    color: var(--muted);
}

.split-card {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.help-box {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.list-clean {
    margin: 0;
    padding-left: 18px;
}

.list-clean li + li {
    margin-top: 6px;
}

.voice-fab {
    position: fixed !important;
    right: 18px !important;
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22);
    font-size: 1.35rem;
    cursor: pointer;
    z-index: 120;
}

.voice-fab.listening {
    background: #dcfce7;
}

/* Calage */
.len-input {
    width: 7ch;
    max-width: 7ch;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.len-input::-webkit-outer-spin-button,
.len-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.len-input[type=number] {
    -moz-appearance: textfield;
}

.cal-row {
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.delta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: #f8fafc;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 700;
}

.delta-green  { color:#14532d; background:#dcfce7; border-color:#86efac; }
.delta-orange { color:#7c2d12; background:#ffedd5; border-color:#fdba74; }
.delta-red    { color:#7f1d1d; background:#fee2e2; border-color:#fca5a5; }
.delta-purple { color:#3b0764; background:#f3e8ff; border-color:#d8b4fe; }

.voice-btn,
.speak-btn {
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
}

.voice-btn.listening {
    background: #dcfce7;
}

.voice-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(219,228,240,0.82);
    box-shadow: var(--shadow);
}

.voice-ctl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
    border-radius: 12px;
    cursor: pointer;
}

.voice-ctl[aria-pressed="true"] {
    border-color: #86efac;
    box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}

.voice-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #94a3b8;
}

.voice-ctl[aria-pressed="true"] .voice-dot {
    background: #22c55e;
    animation: pulse 1.2s infinite;
}

.voice-hint {
    font-size: 0.86rem;
    color: #475569;
}

.side-pill {
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

.side-pill.g { color:#065f46; background:#ecfdf5; border-color:#6ee7b7; }
.side-pill.d { color:#1e3a8a; background:#eff6ff; border-color:#93c5fd; }

@keyframes pulse {
    0% { transform: scale(1); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@media (max-width: 1080px) {
    .split-card,
    .grid-3,
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .site-header-inner,
    .site-footer-inner,
    .page-head,
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav,
    .site-footer-meta {
        justify-content: flex-start;
    }

    .grid-2,
    .split-card,
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .definition-list {
        grid-template-columns: 1fr;
    }

    .table th,
    .table td {
        padding: 12px 10px;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(var(--container), calc(100% - 18px));
    }

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

    .nav-link {
        width: 100%;
        justify-content: center;
    }

    .actions-inline,
    .toolbar-actions {
        width: 100%;
    }

    .actions-inline > *,
    .toolbar-actions > * {
        flex: 1 1 auto;
    }
}


/*
===============================================================================
Compléments graphiques - Authentification et gestion des accès
===============================================================================
*/
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex: 1 1 auto;
    flex-wrap: wrap;
}

.user-chip-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 220px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #ffffff;
}

.user-chip-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.7);
}

.user-chip-meta {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.72);
}

.card-soft {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.auth-body {
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(680px, 100%);
    padding: 28px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
    border: 1px solid rgba(219,228,240,0.82);
    box-shadow: var(--shadow);
}

.auth-head {
    margin-bottom: 18px;
}

.auth-head h1 {
    margin: 12px 0 8px;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.1;
}

.auth-intro {
    margin: 0;
    color: var(--muted);
}

.help-box {
    padding: 14px 16px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.toggle-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 600;
}

.toggle-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.account-list {
    display: grid;
    gap: 16px;
}

.account-card {
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: #f8fafc;
    padding: 18px;
}

.account-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.account-card-head h3 {
    margin: 0 0 4px;
}

.account-form {
    margin: 0;
}

@media (max-width: 980px) {
    .site-header-inner,
    .site-footer-inner,
    .page-head,
    .account-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .header-right,
    .user-chip-wrap {
        justify-content: flex-start;
    }

    .kpi-grid,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(var(--container), calc(100% - 20px));
    }

    .card,
    .auth-card,
    .account-card {
        padding: 18px;
        border-radius: 16px;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-link {
        min-height: 42px;
    }

    .user-chip {
        width: 100%;
        min-width: 0;
    }
}

/*
===============================================================================
Compléments graphiques - Cartes clients / voiles / contrôle atelier
===============================================================================
*/
.atelier-list-layout {
    align-items: start;
}

.listing-grid {
    display: grid;
    gap: 16px;
}

.entity-card {
    padding: 18px 18px 16px;
    border-radius: 16px;
    border: 1px solid #dbe4f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.entity-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.entity-title {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.2;
}

.entity-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.entity-badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.entity-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 12px 0 0;
    border-top: 1px solid #e5edf6;
}

.entity-meta-item {
    min-width: 180px;
    color: #334155;
    font-size: 0.94rem;
}

.entity-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.entity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.entity-actions > * {
    flex: 0 0 auto;
}

.entity-actions .inline-form {
    display: inline-flex;
}

.wing-plan-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 18px;
}

.wing-plan-card,
.wing-plan-help,
.suspente-group-card,
.wing-board {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid #dbe4f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.plan-preview-wrap {
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
}

.plan-preview {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
}

.suspente-groups {
    display: grid;
    gap: 16px;
}

.suspente-table-head,
.suspente-table-row {
    display: grid;
    grid-template-columns: 110px 110px minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.suspente-table-head {
    padding: 0 0 8px;
    color: #1e3a8a;
    font-size: 0.9rem;
    font-weight: 700;
}

.suspente-table-row {
    padding: 12px 0;
    border-top: 1px solid #e5edf6;
}

.suspente-cell-main,
.suspente-cell-usine {
    padding-top: 8px;
}

.suspente-check-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.checkline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 700;
}

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

.wing-maps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.wing-map {
    position: relative;
    border-radius: 12px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
    cursor: crosshair;
    /* overflow:visible pour que le SVG positionné en absolute soit visible */
    overflow: visible;
}

.wing-map img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #f1f5f9;
}

.wing-point {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #dc2626;
    border: 3px solid rgba(255,255,255,0.96);
    box-shadow: 0 5px 14px rgba(127, 29, 29, 0.28);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.wing-point.wing-preview {
    background: #f97316;
}

@media (max-width: 1080px) {
    .wing-plan-layout,
    .wing-maps-grid,
    .porosite-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .entity-card-top,
    .entity-meta-line,
    .entity-actions,
    .suspente-table-head,
    .suspente-table-row,
    .wing-plan-layout,
    .wing-maps-grid,
    .porosite-grid {
        grid-template-columns: 1fr;
    }

    .entity-card-top {
        flex-direction: column;
    }

    .entity-badges {
        justify-content: flex-start;
    }

    .suspente-table-head {
        display: none;
    }

    .suspente-table-row {
        gap: 10px;
        padding: 14px;
        border: 1px solid #e5edf6;
        border-radius: 14px;
        background: #ffffff;
        margin-top: 10px;
    }
}

/* ========================================================================== */
/* Fichier : /css/app.css                                                      */
/* Ajouts rapport atelier client                                               */
/* Créé le : 2026-03-25 11:20 (Europe/Zurich)                                  */
/* ========================================================================== */

.report-form-page {
    max-width: 1280px;
    margin: 0 auto 24px;
}

.report-form-grid {
    display: grid;
    gap: 14px;
}

.report-form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.report-form-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-readonly-box {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #dbe4f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.report-readonly-box h3,
.report-readonly-box p {
    margin: 0 0 8px;
}

.report-check-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.checkbox-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
    cursor: pointer;
}

.checkbox-tile span {
    font-weight: 700;
    color: #0f172a;
}

.report-edit-block {
    padding: 20px;
    border-radius: 12px;
    border: 1.5px solid #b6c9e8;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(30,58,138,0.06);
    margin-bottom: 14px;
}

.report-edit-block h3 {
    margin: 0 0 14px;
    font-size: 1rem;
    color: #1e3a8a;
    border-bottom: 2px solid #dbeafe;
    padding-bottom: 8px;
}

/* Inputs et selects dans les tableaux rapport — plus contrastés */
.report-edit-table input,
.report-edit-table select {
    width: 100%;
    min-height: 38px;
    padding: 6px 9px;
    border: 1.5px solid #94a3b8;
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.88rem;
    transition: border-color 0.12s;
}

.report-edit-table input:focus,
.report-edit-table select:focus {
    border-color: #3b82f6;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* Labels plus visibles */
.card label {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.875rem;
    margin-bottom: 5px;
    display: block;
}

/* Section title toggles — fond bleu clair pour la visibilité */
.report-title-toggle {
    background: linear-gradient(90deg, #eff6ff 0%, #e0effe 100%);
    border-radius: 8px;
    padding: 10px 14px;
    border-left: 4px solid #3b82f6;
    margin-bottom: 14px;
}

.report-title-toggle h2 {
    color: #1e3a8a !important;
    font-size: 1rem;
    margin: 0;
}

/* Select résultat conforme / non conforme */
select.result-select {
    font-weight: 700;
    font-size: 0.88rem;
    border-width: 2px;
    cursor: pointer;
}

/* Bouton outil actif cartographie */
.btn.is-active,
.btn-sm.is-active {
    background: #1e40af;
    color: #ffffff;
    border-color: #1e40af;
}

/* Tables rapport — entêtes plus contrastées */
.table th {
    background: #1e3a8a !important;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px 12px;
}

.table td {
    padding: 10px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #dde9f5;
}

.table tbody tr:nth-child(even) td {
    background: #f0f6ff;
}

.table tbody tr:hover td {
    background: #dbeafe;
}

.report-inline-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.report-inline-checks label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #334155;
}

/* ===== CARTOGRAPHIE — fix SVG overlay ===== */
.wing-map-wrap {
    position: relative;
    display: block;
    line-height: 0; /* évite l'espace sous l'image */
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #b6c9e8;
    background: #f8fafc;
}

.wing-map-wrap img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    user-select: none;
    pointer-events: none; /* l'image ne capte pas les events — le SVG le fait */
}

.wing-map-wrap svg {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
    display: block;
    pointer-events: all;
    /* height est défini dynamiquement par JS mais on force le minimum */
    min-height: 100%;
}

/* ===== TITRES DE SECTION PLUS GRANDS ===== */
.section-title h2,
.report-title-toggle h2 {
    font-size: 1.25rem !important;
    font-weight: 700;
    color: #1e3a8a !important;
    letter-spacing: -0.01em;
}

/* Numéros dans les titres (ex: "2. Inspection") */
.report-title-toggle h2,
.section-title > div > h2 {
    font-size: 1.25rem !important;
}

.card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
}

.card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e3a8a;
}

.wing-map.is-readonly {
    cursor: default;
}

.report-preview-shell {
    max-width: 1180px;
    margin: 0 auto 28px;
}

.report-section {
    background: linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(248,250,252,0.99) 100%);
    border: 1px solid #dbe4f0;
    border-radius: 22px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    padding: 22px;
    margin: 0 0 18px;
}

.report-head-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.report-kicker {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 700;
}

.report-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    color: #334155;
}

.report-synthese-box,
.report-note-box,
.report-warning-box {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #dbe4f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.report-services {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.report-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.92rem;
}

.report-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.report-subsection + .report-subsection {
    margin-top: 18px;
}

.report-subtitle {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
}

.report-table th,
.report-table td {
    padding: 10px 12px;
    border: 1px solid #dbe4f0;
    text-align: left;
    vertical-align: top;
}

.report-table th {
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.92rem;
}

.report-table.compact th,
.report-table.compact td {
    font-size: 0.9rem;
    padding: 8px 10px;
}

.report-subresult {
    margin-top: 10px;
}

.report-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.88rem;
    border: 1px solid transparent;
}

.report-badge.is-good {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.report-badge.is-warn {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.report-badge.is-bad {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.report-badge.is-neutral {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
}

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

.report-measure-groups {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.report-measure-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
}

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

.report-map-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #dbe4f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.report-map-title {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.report-map-canvas {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
    padding: 10px;
    min-height: 200px;
}

.report-map-canvas img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #f1f5f9;
}

.report-map-point {
    position: absolute;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    border: 2px solid rgba(255,255,255,0.98);
    box-shadow: 0 5px 14px rgba(127, 29, 29, 0.32);
    transform: translate(-50%, -50%);
}

.report-warning-box {
    border-color: #fca5a5;
    background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
    color: #991b1b;
    font-weight: 800;
}

@media (max-width: 1080px) {
    .report-form-grid-4,
    .report-check-grid,
    .report-map-grid,
    .report-head-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .report-form-grid-2,
    .report-form-grid-3,
    .report-form-grid-4,
    .report-check-grid,
    .report-head-grid,
    .report-text-grid,
    .report-map-grid {
        grid-template-columns: 1fr;
    }

    .report-inline-checks,
    .report-meta-line {
        flex-direction: column;
        gap: 8px;
    }
}


.report-title-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.toggle-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
    font-weight: 700;
    color: #0f172a;
}

.toggle-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.report-title-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.report-brand-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.report-brand-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
}

.report-brand-logo {
    width: 140px;
    height: auto;
    display: block;
}

.report-brand-right {
    min-width: 280px;
    text-align: right;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.55;
}

.report-head-grid-summary {
    margin-top: 10px;
}

.report-signature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.report-signature-box {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px dashed #94a3b8;
    background: #ffffff;
}

.report-signature-label {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 18px;
}

.report-signature-line {
    height: 28px;
    border-bottom: 2px solid #0f172a;
}

@media (max-width: 820px) {
    .report-brand-head,
    .report-brand-left {
        flex-direction: column;
    }

    .report-brand-right {
        min-width: 0;
        text-align: left;
    }

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