:root {
    --skymax-aubergine: #21193A;
    --skymax-light-aubergine: #382356;
    --skymax-mauve: #9E8AF7;
    --skymax-orange: #FF8026;
    --skymax-cyan: #00C6FF;
    --success: #10b981;
    --danger: #ef4444;
    --bg-color: #f3f4f6;
    --surface: #ffffff;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-radius: 12px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    color: var(--text-dark);
}

a { color: var(--skymax-light-aubergine); }

/* TOPBAR */
.topbar {
    background: var(--skymax-aubergine);
    color: white;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}
.brand { font-weight: 700; letter-spacing: 0.5px; }
.brand span { color: var(--skymax-orange); }
.mainnav { display: flex; align-items: center; gap: 18px; flex: 1; flex-wrap: wrap; }
.mainnav > a { color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 600; font-size: 14px; }
.mainnav > a:hover { color: white; }

/* MENUS DÉROULANTS (Formulaires, Admin) */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
    background: none; border: none; color: rgba(255,255,255,0.85); font-family: inherit;
    font-weight: 600; font-size: 14px; cursor: pointer; padding: 0; display: flex; align-items: center; gap: 5px;
}
.nav-dropdown-trigger::after { content: '▾'; font-size: 9px; opacity: 0.8; }
.nav-dropdown-trigger:hover, .nav-dropdown.open .nav-dropdown-trigger { color: white; }
.nav-dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0; margin-top: 16px;
    background: var(--surface); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    min-width: 230px; padding: 8px; z-index: 200;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block; padding: 9px 14px; border-radius: 6px; color: var(--text-dark) !important;
    text-decoration: none; font-size: 14px; font-weight: 600;
}
.nav-dropdown-menu a:hover { background: #f3f4f6; }
.nav-dropdown-menu .nav-group-label {
    display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-light); font-weight: 700; padding: 8px 14px 2px;
}
.nav-dropdown-menu .nav-divider { border-top: 1px solid #e5e7eb; margin: 6px 4px; }
.userbox { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.link-btn { background: none; border: none; color: rgba(255,255,255,0.75); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; }
.site-switch-select { background: rgba(255,255,255,0.12); color: white; border: 1px solid rgba(255,255,255,0.3); border-radius: 6px; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.site-switch-select option { color: var(--text-dark); }

.role-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #e5e7eb; color: var(--text-dark);
}
.role-admin { background: var(--skymax-mauve); color: white; }
.role-manager { background: var(--skymax-cyan); color: #063a4d; }
.role-employe { background: #e5e7eb; color: var(--text-dark); }
.role-secretaire { background: #fde68a; color: #78350f; }

/* PAGE */
.page { max-width: 960px; margin: 0 auto; padding: 32px 20px 60px; }
h1 { color: var(--skymax-aubergine); font-size: 26px; margin: 0 0 20px; }

/* FLASH */
.flash { padding: 12px 18px; border-radius: 8px; margin-bottom: 20px; font-weight: 600; font-size: 14px; }
.flash-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* CALLOUT */
.callout { background: #f5f3ff; border-left: 4px solid var(--skymax-mauve); border-radius: 0 8px 8px 0; padding: 16px 20px; margin-top: 20px; }
.callout p { margin: 0; color: var(--skymax-light-aubergine); }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin: 10px 0 30px; }
.dashboard-tile {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    background: var(--surface); border: 2px solid #e5e7eb; border-radius: var(--border-radius);
    padding: 24px 14px; text-align: center; text-decoration: none; transition: all 0.2s ease;
}
.dashboard-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(33,25,58,0.12); filter: brightness(0.98); }
.dashboard-tile-icon { font-size: 34px; line-height: 1; }
.dashboard-tile-label { font-weight: 700; font-size: 14px; }

/* BUTTONS */
.btn-primary {
    display: inline-block;
    background: var(--skymax-orange);
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.btn-primary:hover { background: #e66a15; }

/* TABLES */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--border-radius); overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.05); margin-top: 10px; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; font-size: 14px; }
.data-table thead th { background: #f9fafb; color: var(--text-light); text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; }
.data-table tbody tr { border-top: 1px solid #f0f0f0; }
.data-table tbody tr:hover { background: #fafafa; }

/* FORMS */
.stacked-form { display: flex; flex-direction: column; gap: 18px; max-width: 480px; background: var(--surface); padding: 26px; border-radius: var(--border-radius); box-shadow: 0 4px 14px rgba(0,0,0,0.05); margin-top: 10px; }
.stacked-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 13px; color: var(--skymax-light-aubergine); text-transform: uppercase; }
.stacked-form input[type="text"], .stacked-form input[type="email"], .stacked-form input[type="password"], .stacked-form select {
    padding: 12px 14px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 15px; font-family: inherit; background: #f9fafb;
}
.stacked-form input:focus, .stacked-form select:focus { outline: none; border-color: var(--skymax-mauve); background: white; }
.checkbox-line { flex-direction: row !important; align-items: center; gap: 10px !important; text-transform: none !important; }

/* LOGIN */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, var(--skymax-aubergine), var(--skymax-light-aubergine)); }
.login-card { background: var(--surface); padding: 44px 40px; border-radius: 16px; width: 100%; max-width: 380px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.login-brand { text-align: center; font-size: 22px; font-weight: 800; color: var(--skymax-aubergine); margin-bottom: 26px; letter-spacing: 0.5px; }
.login-brand span { color: var(--skymax-orange); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 13px; color: var(--skymax-light-aubergine); text-transform: uppercase; }
.login-form input { padding: 14px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 15px; background: #f9fafb; }
.login-form input:focus { outline: none; border-color: var(--skymax-mauve); background: white; }

/* FORMULAIRES DE TERRAIN (check-lists, fiches) */
.hint { color: var(--text-light); margin-bottom: 20px; }
.page { max-width: 1000px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; background: var(--surface); padding: 30px; border-radius: var(--border-radius); box-shadow: 0 4px 14px rgba(0,0,0,0.05); margin-top: 10px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.full-width { grid-column: span 2; }
.form-grid label { font-weight: 700; font-size: 13px; color: var(--skymax-light-aubergine); text-transform: uppercase; }
.form-grid input[type="text"], .form-grid input[type="email"], .form-grid input[type="number"],
.form-grid input[type="time"], .form-grid input[type="date"], .form-grid select, .form-grid textarea {
    width: 100%; padding: 14px; border: 2px solid #e5e7eb; border-radius: 8px; background: #f9fafb; font-size: 15px; font-family: inherit;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; border-color: var(--skymax-mauve); background: white; }
.form-grid textarea { resize: vertical; min-height: 90px; }
.highlight-input { font-weight: bold; font-size: 18px; color: var(--skymax-orange); background: #fff7ed !important; }
.field-required-badge { font-size: 11px; font-weight: 700; color: var(--danger); margin-left: 6px; text-transform: none; }
.section-title { color: var(--skymax-aubergine); border-bottom: 3px solid var(--skymax-cyan); padding-bottom: 8px; margin-top: 10px; font-size: 19px; display: inline-block; }

.radio-group, .checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-group input, .checkbox-group input { display: none; }
.radio-group label, .checkbox-group label {
    background: #f3f4f6; padding: 10px 18px; border-radius: 30px; border: 2px solid #e5e7eb; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--skymax-aubergine); text-transform: none;
}
.radio-group input:checked + label, .checkbox-group input:checked + label {
    background: var(--skymax-mauve); color: white; border-color: var(--skymax-mauve);
}
.radio-group label.urgent { color: var(--danger); border-color: var(--danger); }

.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-line {
    background: #f9fafb; padding: 13px 18px; border-radius: 8px; border: 2px solid #e5e7eb; cursor: pointer;
    font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 10px; text-transform: none;
}
.task-checkbox { position: static !important; display: inline-block !important; width: auto !important; margin: 0; }
.task-line.task-critical { border-color: #fecaca; background: #fef2f2; }
.task-text { min-width: 0; }
.task-description { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--text-light); }
.critical-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--danger); text-transform: uppercase; background: #fef2f2; border: 1px solid #fecaca; padding: 2px 8px; border-radius: 20px; }

.progress-wrapper { margin-bottom: 22px; padding: 18px 20px; background: #f9fafb; border-radius: 10px; border: 1px solid #e5e7eb; }
.progress-bar-track { background: #e5e7eb; border-radius: 99px; height: 12px; overflow: hidden; margin-bottom: 8px; }
.progress-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--skymax-mauve), var(--skymax-cyan)); transition: width 0.3s ease; width: 0%; }
.progress-text { font-size: 13px; font-weight: 600; color: var(--skymax-light-aubergine); }

.btn-submit {
    background: var(--skymax-orange); color: white; padding: 18px; border: none; border-radius: 8px; cursor: pointer;
    font-size: 18px; font-weight: 700; width: 100%; grid-column: span 2; margin-top: 10px; text-transform: uppercase; letter-spacing: 1px;
}
.btn-submit:hover { background: #e66a15; }

.callout-warn { background: #fef2f2; border-left-color: var(--danger); }
.callout-warn p { color: #991b1b; }
/* Consigne à ne pas manquer (fiche anniversaire : à compléter avant encaissement). */
.callout-strong { border: 2px solid var(--danger); border-left-width: 6px; border-radius: 8px; margin: 6px 0 16px; }
.callout-strong p { font-size: 17px; }

.review-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 6px; }
.review-list li { padding: 10px 14px; border-radius: 8px; background: #f9fafb; display: flex; align-items: center; gap: 8px; }
.review-list li.is-checked { background: #ecfdf5; }
.field-name { font-weight: 700; color: var(--skymax-light-aubergine); white-space: nowrap; }
.is-inactive { opacity: 0.45; }
.link-btn-inline { background: none; border: none; color: var(--skymax-light-aubergine); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; }
.site-filter { margin-bottom: 20px; }
.site-filter select { padding: 10px 14px; border-radius: 8px; border: 2px solid #e5e7eb; font-size: 14px; }

/* SIGNATURE & PHOTO (phase 3) */
/* `only light` : le mode sombre forcé du navigateur ne doit pas assombrir le pavé,
   sinon le trait foncé (exigé par le serveur et le PDF) devient invisible. */
.signature-wrapper { border: 2px dashed #ccc; border-radius: 8px; background: #e5e7eb; overflow: hidden; position: relative; color-scheme: only light; }
.signature-pad { width: 100%; height: 160px; cursor: crosshair; touch-action: none; display: block; }
.btn-clear {
    position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.9); color: var(--skymax-orange);
    border: 1px solid #ccc; padding: 5px 10px; border-radius: 4px; font-size: 12px; font-weight: bold; cursor: pointer;
}
.btn-clear:hover { background: #f3f4f6; }

.photo-picker { background: #f9fafb; padding: 18px; border-radius: 8px; border: 2px dashed #ccc; }
.photo-picker-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.btn-camera {
    background: var(--skymax-mauve); color: white; padding: 13px 18px; border: none; border-radius: 8px; cursor: pointer;
    font-size: 15px; font-weight: 600;
}
.btn-camera:hover { background: #8b74f0; }
.photo-file-name { font-size: 14px; font-weight: 600; color: var(--text-light); }
.photo-preview { margin-top: 16px; }
.photo-preview img { max-height: 220px; border-radius: 8px; border: 2px solid var(--skymax-mauve); padding: 4px; background: white; }

.attachment-block { margin-top: 24px; }
.attachment-grid { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px; }
.attachment-card { background: var(--surface); border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; text-align: center; }
.attachment-card img { max-height: 160px; max-width: 220px; }
.attachment-card .attachment-label { display: block; margin-top: 8px; font-size: 12px; color: var(--text-light); font-weight: 600; }

/* HISTORIQUE : FILTRES, PAGINATION, RÉSUMÉ (phase 4) */
.filter-bar {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
    background: var(--surface); padding: 18px; border-radius: var(--border-radius);
    box-shadow: 0 4px 14px rgba(0,0,0,0.05); margin-top: 10px;
}
.filter-bar label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 12px; color: var(--skymax-light-aubergine); text-transform: uppercase; }
.filter-bar select, .filter-bar input[type="date"] { padding: 10px 12px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 14px; background: #f9fafb; }
.filter-bar .btn-primary { padding: 10px 20px; }

.result-line { margin: 16px 0 6px; font-size: 14px; color: var(--text-light); }

.site-breakdown { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.site-breakdown-pill { background: #f5f3ff; color: var(--skymax-light-aubergine); border-radius: 20px; padding: 6px 14px; font-size: 13px; font-weight: 600; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 20px; font-size: 14px; }
.pagination a { font-weight: 700; }

@media (max-width: 680px) {
    /* Une seule colonne, et chaque élément l'occupe entièrement : un `span 2` oublié
       recréerait sinon une 2e colonne implicite (formulaire coupé en deux sur mobile). */
    .form-grid { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; }
    .form-grid > * { grid-column: 1 / -1; }

    /* Anniversaires du tableau de bord : une carte par anniversaire au lieu d'un tableau. */
    .birthdays-table thead { display: none; }
    .birthdays-table, .birthdays-table tbody, .birthdays-table tr, .birthdays-table td { display: block; width: 100%; }
    .birthdays-table tbody tr { padding: 12px 14px; }
    .birthdays-table td { padding: 3px 0; white-space: normal !important; }
    .birthdays-table td[data-label]::before { content: attr(data-label) " : "; color: var(--text-light); font-size: 12px; }
    .birthdays-table td.cell-when { font-size: 16px; }
}

.option-price { display: block; font-size: 11px; font-weight: 600; opacity: 0.75; text-transform: none; }
.birthday-option { display: inline-flex; flex-direction: column; align-items: stretch; gap: 6px; }
.qty-stepper { display: inline-flex; align-items: stretch; border-radius: 999px; overflow: hidden; background: var(--skymax-aubergine); align-self: center; }
.qty-stepper button { background: none; border: none; color: #fff; font-size: 18px; font-weight: 700; width: 34px; cursor: pointer; }
.checkbox-group .qty-stepper input { display: block; width: 44px; border: none; text-align: center; font-size: 15px; font-weight: 700; padding: 6px 0; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.note-details { margin: 4px 0 0; }
.note-details summary { cursor: pointer; list-style: none; }
.note-details summary::-webkit-details-marker { display: none; }
.note-details summary .note-more { color: var(--skymax-orange); font-weight: 600; white-space: nowrap; }
.note-details[open] summary { display: none; }

/* Pastilles de statut de paiement (réservations Qweekle du tableau de bord). */
.pay-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.pay-paid { background: #ecfdf5; color: #065f46; }
.pay-partial { background: #fff7ed; color: #9a3412; }
.pay-unpaid { background: #fef2f2; color: #991b1b; }
.pay-cancelled { background: #f3f4f6; color: #6b7280; text-decoration: line-through; }
.pay-none { background: #f3f4f6; color: #6b7280; }
.pay-unknown { background: #eff6ff; color: #1e40af; }

/* Barres d'affluence prévue (occupation Qweekle par créneau). */
.load-bar-track { background: #e5e7eb; border-radius: 999px; height: 12px; overflow: hidden; min-width: 120px; }
.load-bar { height: 100%; border-radius: 999px; background: var(--success); transition: width 0.2s ease; }
.load-bar.load-high { background: var(--skymax-orange); }
.load-bar.load-full { background: var(--danger); }

/* Sélecteur d'anniversaire Qweekle (fiche anniversaire) : date → heure → anniversaire. */
.qweekle-picker { background: var(--surface); padding: 24px 26px; border-radius: var(--border-radius);
    box-shadow: 0 4px 14px rgba(0,0,0,0.05); margin: 18px 0 24px; border-top: 4px solid var(--skymax-orange); }
.picker-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.picker-head h3 { margin: 0; font-size: 20px; color: var(--skymax-aubergine); }
.picker-sub { font-size: 13px; color: var(--text-light); }
.picker-step { margin-top: 22px; }
.picker-step-label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; letter-spacing: 0.05em;
    color: var(--skymax-light-aubergine); text-transform: uppercase; margin-bottom: 10px; }
.picker-step-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
    background: var(--skymax-aubergine); color: #fff; font-size: 12px; letter-spacing: 0; }
.picker-empty { margin: 18px 0 0; padding: 14px 16px; background: #f9fafb; border-radius: 8px; color: var(--text-light); }

.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.date-tile { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    min-width: 64px; padding: 8px 6px; border: 2px solid #e5e7eb; border-radius: 10px; background: #fff;
    color: var(--text-dark); text-decoration: none; transition: all 0.15s ease; }
.date-tile:hover { border-color: var(--skymax-mauve); transform: translateY(-1px); }
.date-tile-dow { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-light); }
.date-tile-day { font-size: 22px; font-weight: 800; line-height: 1.1; color: var(--skymax-aubergine); }
.date-tile-month { font-size: 11px; color: var(--text-light); }
.date-tile.is-today { border-color: var(--skymax-mauve); }
.date-tile.is-today .date-tile-dow { color: var(--skymax-orange); }
.date-tile.is-active { background: var(--skymax-aubergine); border-color: var(--skymax-aubergine); }
.date-tile.is-active span { color: #fff; }
.date-tile-other { min-width: 140px; margin: 0; }
.date-tile-other input { border: none; background: transparent; font-size: 14px; font-family: inherit; color: var(--skymax-aubergine); padding: 4px 0; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 2px solid #e5e7eb; border-radius: 999px;
    background: #fff; color: var(--skymax-aubergine); text-decoration: none; font-size: 15px; font-weight: 700; transition: all 0.15s ease; }
.chip:hover { border-color: var(--skymax-mauve); }
.chip-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 999px; background: #fff7ed; color: #9a3412; font-size: 12px; }
.chip.is-active { background: var(--skymax-orange); border-color: var(--skymax-orange); color: #fff; }
.chip.is-active .chip-count { background: rgba(255,255,255,0.25); color: #fff; }

.birthday-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.birthday-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 2px solid #e5e7eb; border-radius: 12px;
    text-decoration: none; color: var(--text-dark); background: #fff; transition: all 0.15s ease; }
.birthday-card:hover { border-color: var(--skymax-orange); box-shadow: 0 8px 20px rgba(33,25,58,0.10); transform: translateY(-2px); }
.birthday-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.birthday-room { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #fff;
    background: var(--skymax-light-aubergine); padding: 3px 10px; border-radius: 6px; }
.birthday-pax { font-weight: 700; font-size: 14px; color: var(--skymax-aubergine); }
.birthday-client { font-weight: 700; font-size: 16px; color: var(--skymax-aubergine); }
.birthday-meta { font-size: 12px; color: var(--text-light); }
.birthday-card .pay-pill { align-self: flex-start; }

/* Champ en lecture seule (repris de Qweekle, non modifiable dans la fiche). */
.form-grid textarea.readonly-input, .form-grid input.readonly-input { background: #f3f4f6; color: var(--text-light); cursor: not-allowed; border-style: dashed; }
.form-grid textarea.readonly-input:focus { border-color: #e5e7eb; box-shadow: none; }

/* Résumé façon Qweekle : produits de la commande et déroulé des activités d'un anniversaire. */
.order-summary { margin: 12px 0 6px; padding: 12px 14px; background: #fff; border-radius: 8px; border: 1px solid #e9e5fb; }
.order-summary-product { display: flex; align-items: baseline; gap: 10px; font-weight: 700; color: var(--skymax-aubergine); padding: 2px 0; }
.order-summary-qty { min-width: 26px; text-align: right; color: var(--skymax-orange); }
.order-summary-label { flex: 1; }
.order-summary-amount { font-weight: 600; color: var(--text-light); white-space: nowrap; }
.programme { display: flex; flex-direction: column; gap: 3px; margin: 6px 0 0 36px; }
.programme-line { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: #1e6fb8; }
.programme-time { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 40px; }
.programme-activity { font-weight: 600; }
.programme-location { color: var(--text-light); font-size: 12px; }
.programme-line.is-room { color: var(--skymax-orange); }
.programme-compact { margin: 2px 0 0; }
.programme-compact .programme-line { font-size: 12px; }

/* Formule d'anniversaire figée par Qweekle : la formule choisie reste lisible, les autres s'effacent. */
.radio-group.is-locked label, .checkbox-group.is-locked label { cursor: not-allowed; }
.radio-group.is-locked input:not(:checked) + label, .checkbox-group.is-locked input:not(:checked) + label { opacity: 0.4; }

/* Case obligatoire « Bon cadeau remis au client », juste avant la validation. */
.gift-voucher { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 2px dashed var(--skymax-orange);
    border-radius: 10px; background: #fff7ed; font-size: 15px; color: var(--skymax-aubergine); cursor: pointer; }
.gift-voucher input { width: 22px; height: 22px; accent-color: var(--skymax-orange); flex-shrink: 0; }
.gift-voucher:has(input:checked) { border-style: solid; border-color: var(--success); background: #ecfdf5; }

/* Tableau de bord : état de la fiche anniversaire. */
.fiche-done { color: #065f46; font-weight: 700; font-size: 13px; }
.fiche-late { color: #b91c1c; font-weight: 700; }
.data-table tbody tr.row-overdue { background: #fef2f2; }
.data-table tbody tr.row-overdue:hover { background: #fee2e2; }

/* Cloche de notifications (barre du haut) : fiches anniversaire à remplir, check-lists en cours. */
.notif-trigger { position: relative; font-size: 18px; line-height: 1; padding: 4px 2px; }
.notif-trigger::after { content: none; }
.notif-badge { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
    border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.notif-panel { width: 340px; max-height: 70vh; overflow-y: auto; }
.nav-dropdown-menu a.notif-item { background: #fff7ed; margin: 4px 0; }
.nav-dropdown-menu a.notif-item:hover { background: #ffedd5; }
.notif-meta { display: block; font-size: 12px; font-weight: 400; color: var(--text-light); margin-top: 2px; }
.notif-empty { margin: 0; padding: 10px 14px; color: var(--text-light); font-size: 14px; }
.notif-draft form { margin: 0 0 6px 14px; }
@media (max-width: 680px) {
    .topbar { position: relative; }
    .notif-menu { position: static; }
    .notif-panel { position: absolute; top: 100%; left: 8px; right: 8px; width: auto; margin-top: 6px; }
}

/* Actions d'une ligne de tableau (Modifier / Supprimer). */
.row-actions { white-space: nowrap; }
.row-actions form { display: inline; margin: 0 0 0 12px; }
.link-danger { color: var(--danger) !important; }

/* Historique : lien direct vers le PDF d'une fiche. */
.pdf-link { margin-left: 12px; padding: 4px 10px; border-radius: 6px; background: #fff7ed; color: #9a3412 !important;
    font-weight: 700; font-size: 13px; text-decoration: none; }
.pdf-link:hover { background: #ffedd5; }

/* Choix du mot de passe à la première connexion. */
.password-intro { margin: 0 0 18px; color: var(--text-dark); line-height: 1.5; }

/* Configuration des check-lists (admin / manager). */
.checklist-zone { margin: 18px 0 6px; color: var(--skymax-light-aubergine); }
.checklist-admin td:first-child { width: 100%; }
.row-actions form:first-of-type { margin-left: 12px; }
.checklist-add { margin: 16px 0 8px; }
.checklist-add summary { cursor: pointer; font-weight: 700; color: var(--skymax-orange); padding: 6px 0; }
.checklist-add-form { margin-top: 8px; }

/* L'attribut `hidden` l'emporte toujours (sinon `.form-group { display:flex }` l'annulerait :
   blocs conditionnels data-show-if, mentions « * requis » conditionnelles...). */
[hidden] { display: none !important; }

/* Statuts de suivi (G4) : jaune = en cours, vert = terminé, rouge = problème. */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-yellow { background: #fef9c3; color: #854d0e; }
.status-green { background: #ecfdf5; color: #065f46; }
.status-red { background: #fef2f2; color: #991b1b; }
.status-inline { margin: 0; }
.status-select { border: 1px solid transparent; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.status-select:hover, .status-select:focus { border-color: var(--skymax-mauve); }
.status-panel { background: var(--surface); border-radius: var(--border-radius); padding: 18px 22px; margin: 16px 0 22px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05); }
.status-panel-head { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--skymax-aubergine); }
.status-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 14px; }
.status-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--skymax-light-aubergine); text-transform: uppercase; }
.status-form select, .status-form input { padding: 9px 12px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 14px; font-family: inherit; }
.status-form input { min-width: 280px; }
.status-journal-title { margin: 18px 0 8px; font-size: 14px; color: var(--skymax-light-aubergine); }
.status-journal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.status-journal li { padding: 8px 12px; background: #f9fafb; border-radius: 8px; }
.status-journal-date { color: var(--text-light); font-size: 12px; margin-right: 6px; }
.status-journal-comment { margin-top: 4px; color: var(--text-dark); font-style: italic; }

/* Signatures (G1 / G3) : nom du signataire au-dessus du pavé, pavé vide signalé à l'envoi. */
.signer-name { margin-bottom: 10px; }
.signature-wrapper.signature-missing { border-color: var(--danger); background: #fef2f2; }
.signature-error { margin: 6px 0 0; color: var(--danger); font-weight: 700; font-size: 13px; }

/* Bons de prestation : retrouver un client, recherche par n° d'entreprise. */
.client-lookup { position: relative; background: #f5f3ff; border-radius: 10px; padding: 14px 16px; }
.client-lookup-input { width: 100%; padding: 12px 14px; border: 2px solid #ddd6fe; border-radius: 8px; font-size: 15px; font-family: inherit; }
.client-lookup-results { position: absolute; left: 16px; right: 16px; top: 78px; z-index: 20; background: #fff; border: 1px solid #e5e7eb;
    border-radius: 10px; box-shadow: 0 12px 30px rgba(33,25,58,0.15); max-height: 320px; overflow-y: auto; }
.client-lookup-item { display: block; width: 100%; text-align: left; padding: 10px 14px; border: none; border-bottom: 1px solid #f3f4f6;
    background: #fff; cursor: pointer; font-family: inherit; }
.client-lookup-item:hover { background: #fff7ed; }
.client-lookup-item strong { display: block; color: var(--skymax-aubergine); }
.client-lookup-item span { font-size: 12px; color: var(--text-light); }
.client-lookup-status { padding: 10px 14px; color: var(--text-light); font-size: 13px; }
.bce-row { display: flex; gap: 8px; }
.bce-row input { flex: 1; min-width: 0; }
.btn-secondary { background: #fff; color: var(--skymax-aubergine); border: 2px solid var(--skymax-mauve); border-radius: 8px;
    padding: 0 12px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.btn-secondary:hover { background: #f5f3ff; }
.btn-secondary:disabled { opacity: 0.6; cursor: wait; }
.bce-status { min-height: 1em; }
.bce-status.is-error { color: var(--danger); font-weight: 600; }

/* Plusieurs photos (preuves d'achat). */
.photo-preview-multi { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-preview-multi img { max-height: 140px; }

/* Fiche anniversaire : case « Problème constaté ». */
.problem-flag { padding: 12px 16px; border: 2px dashed #fecaca; border-radius: 10px; background: #fff; cursor: pointer; }
.problem-flag:has(input:checked) { border-style: solid; border-color: var(--danger); background: #fef2f2; }

/* Bouton « Rafraîchir » (relecture immédiate des réservations Qweekle). */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.refresh-form { margin: 0 0 0 auto; }
.btn-refresh { background: #fff; color: var(--skymax-aubergine); border: 2px solid #e5e7eb; border-radius: 999px;
    padding: 7px 14px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.btn-refresh:hover { border-color: var(--skymax-mauve); background: #f5f3ff; }
.btn-refresh:disabled { opacity: 0.6; cursor: wait; }

/* Suppression d'un document (admin). */
.danger-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid #fecaca; }
.btn-danger { background: #fff; color: var(--danger); border: 2px solid var(--danger); border-radius: 8px; padding: 9px 16px;
    font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn-danger:hover { background: #fef2f2; }

/* Historique : information clé sous le nom du formulaire (ex. catégorie d'objet trouvé). */
.row-summary { display: block; margin-top: 3px; font-size: 13px; color: var(--text-light); }

/* Formulaires en cours (brouillons) : bandeau de rappel et boutons sous l'envoi. */
.draft-banner { margin: 0 0 20px; border-left-color: var(--skymax-orange); background: #fff7ed; }
.draft-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.draft-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; background: #fff; border-radius: 8px; border: 1px solid #fed7aa; }
.draft-list form { margin: 0; }
.draft-list-label { flex: 1 1 220px; min-width: 0; }
.draft-list-meta { display: block; font-size: 13px; color: var(--text-light); }
.btn-draft { display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; font-size: 14px; text-decoration: none; }
.draft-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.draft-actions .btn-draft { flex: 1 1 260px; padding: 14px 16px; }
.draft-status { grid-column: 1 / -1; margin: -8px 0 0; font-size: 13px; color: var(--text-light); text-align: center; }
.draft-status.is-error { color: var(--danger); font-weight: 600; }

/* Menu « À propos » (coin supérieur droit) et ses pages. */
.nav-dropdown-right .nav-dropdown-menu { left: auto; right: 0; min-width: 200px; }
.about-menu .nav-dropdown-trigger { font-size: 20px; line-height: 1; }
.about-menu .nav-dropdown-trigger::after { content: none; }
.about-card { background: var(--surface); border-radius: var(--border-radius); box-shadow: 0 4px 14px rgba(0,0,0,0.05); padding: 20px 24px; margin-top: 16px; }
.about-card .section-title { margin-top: 0; }
.about-card p { margin: 0; }
.about-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
.changelog-date { font-weight: 400; color: var(--text-light); }
.changelog-current { margin-left: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; padding: 2px 8px; border-radius: 20px; vertical-align: middle; }

/* Fiche utilisateur : affectations manager / secrétaire. */
.user-assignments { padding: 12px 14px; border-radius: 8px; background: #f5f3ff; font-size: 14px; }
.user-assignments ul { margin: 6px 0 0; padding-left: 20px; }
.user-assignments .hint { margin: 6px 0 0; }

/* Tâches. */
.task-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.task-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px;
    background: var(--surface); border-radius: 10px; border-left: 5px solid var(--skymax-orange); box-shadow: 0 4px 14px rgba(0,0,0,0.05); }
.task-item.is-late { border-left-color: var(--danger); }
.task-list.is-done .task-item, .task-item.is-done { border-left-color: var(--success); opacity: 0.75; }
.task-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.task-meta { font-size: 13px; color: var(--text-light); }
.task-desc { font-size: 14px; color: var(--text-dark); }
.task-link { font-size: 13px; font-weight: 700; }
.task-item form { margin: 0; }

/* Objets perdus : liste détaillée et tags. */
.lost-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 12px 0 22px; }
.lost-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--border-radius); overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.05); }
.lost-photo { display: block; aspect-ratio: 4 / 3; background: #f3f4f6; }
.lost-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lost-nophoto { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-light); font-size: 13px; }
.lost-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lost-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--skymax-aubergine); }
.lost-desc { margin: 0; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lost-meta { margin: 0; font-size: 12px; color: var(--text-light); }
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; }
.tag-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; border-radius: 999px; background: #ede9fe; font-size: 12px; font-weight: 700; }
.tag-chip a { color: var(--skymax-light-aubergine); text-decoration: none; }
.tag-chip form { margin: 0; display: inline; }
.tag-remove { border: none; background: none; cursor: pointer; color: var(--text-light); font-size: 15px; line-height: 1; padding: 0 5px; }
.tag-remove:hover { color: var(--danger); }
.tag-add { margin: 0; }
.tag-add input { width: 90px; padding: 3px 10px; border: 1px dashed var(--skymax-mauve); border-radius: 999px; font-size: 12px; font-family: inherit; }
.tag-add input:focus { outline: none; border-style: solid; width: 140px; }
