/* Core layout + typography (kept small to stay ≤30KB gzipped) */

:root {
    --theme-primary: #886ab5;
    --theme-primary-dark: #6b4d9a;
    --theme-primary-rgb: 136, 106, 181;
    --theme-rgb-primary: 136, 106, 181;
    --theme-secondary: #6c757d;
    --theme-success: #1dc9b7;
    --theme-danger: #fd3995;
    --theme-warning: #ffc241;
    --theme-info: #2096f3;
    --theme-border: #e7ecf3;
    --theme-bg: #f8f9fa;
    --theme-text: #2c3e50;
    --theme-muted: #6c757d;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: "Times New Roman", Times, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    scroll-behavior: auto;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 
}

body {
    margin: 0;
    color: var(--theme-text);
    background-color: #fff;
    font-size: 0.95rem;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin: 0 0 1rem;
}

a {
    color: var(--theme-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--theme-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-content {
    padding: 1.5rem;
    min-height: 100vh;
    background: #fdfdff;
}

@media (min-width: 992px) {
    .page-content {
        padding: 2rem 3rem;
    }
}

.bg-gradient-to-bottom-sm-light {
    background: linear-gradient(180deg, rgba(136, 106, 181, 0.07) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 1rem;
    padding: 1rem;
}

.card {
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header,
.card-body,
.card-footer {
    padding: 1.25rem 1.5rem;
}

.card-header {
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    font-weight: 600;
}

.card-footer {
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    background: #fafbff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    font-size: 0.85rem;
    color: var(--theme-muted);
}

.breadcrumb a {
    color: inherit;
}

.breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 0.5rem;
    color: rgba(17, 24, 39, 0.3);
}

.btn,
button.btn,
input[type="button"].btn,
input[type="submit"].btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.3rem !important;
    padding: 0.55rem 1.25rem;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.2;
    gap: 0.3rem; /* Global gap between text and icon */
}

/* Ensure icons inside buttons have proper spacing */
.btn i,
.btn .fa,
.btn .fal,
.btn .far,
.btn .fas {
    margin: 0; /* Remove any default margins */
}

.btn:focus-visible {
    outline: 2px solid rgba(136, 106, 181, 0.4);
    outline-offset: 2px;
}

/* Force border-radius 0.3rem on all button variants */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-light,
.btn-dark,
.btn-link,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-light,
.btn-outline-dark,
.btn-sm,
.btn-lg,
.btn-block {
    border-radius: 0.3rem !important;
}

.btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, #886ab5 0%, #6b5596 100%);
    border-color: #6b4d9a;
    border-radius: 0.3rem;
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    color: #fff !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #6b5596 0%, #5a4a7a 100%);
}

.btn-primary:active,
.btn-primary.active {
    background: linear-gradient(135deg, #5a4a7a 0%, #4a3d62 100%);
    transform: translateY(0);
}

.btn-primary:disabled,
.btn-primary.disabled {
    color: #fff !important;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    color: #fff !important;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    border-color: #565e64;
    border-radius: 0.3rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary.active {
    color: #fff !important;
    transform: translateY(-2px);
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
}

.btn-secondary:disabled,
.btn-secondary.disabled {
    color: #fff !important;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline-secondary {
    color: var(--theme-text);
    background: #fff;
    border-color: var(--theme-border, #e7ecf3);
    border-radius: 0.3rem;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-outline-secondary:hover {
    background: var(--theme-bg-light, #f8f9fa);
    border-color: var(--theme-primary, #886ab5);
    color: var(--theme-primary, #886ab5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(136, 106, 181, 0.15);
}

.btn-outline-secondary.active {
    background: linear-gradient(135deg, var(--theme-primary, #886ab5) 0%, #6b4d9a 100%);
    border-color: var(--theme-primary, #886ab5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(136, 106, 181, 0.3);
}

/* ====================================
   UNIFIED BUTTON STYLES - QHSELIB
   ====================================
   
   Use these classes for consistent buttons across the website:
   
   1. SAVE BUTTONS (Purple gradient):
      <button class="btn btn-primary btn-save">
        <i class="fal fa-check"></i> Enregistrer
      </button>
   
   2. BACK/RETURN BUTTONS (Gray gradient):
      <a class="btn btn-retour" href="...">
        <i class="fa fa-reply"></i> Retour
      </a>
   
   3. CANCEL BUTTONS (Gray gradient):
      <button class="btn btn-cancel">
        <i class="fa fa-times"></i> Annuler
      </button>
   
   4. EDIT BUTTONS (Purple, for tables and action lists):
      <button class="btn-edit" title="Modifier">
        <i class="fa fa-pen"></i> Modifier
      </button>
      <!-- OR icon-only version -->
      <a href="..." class="btn-edit" title="Modifier" aria-label="Modifier">
        <i class="fa fa-pen"></i>
      </a>
   
   5. DELETE BUTTONS (Red, for tables and action lists):
      <button class="btn-delete" title="Supprimer">
        <i class="fa fa-trash"></i> Supprimer
      </button>
      <!-- OR icon-only version -->
      <a href="#" class="btn-delete" title="Supprimer" aria-label="Supprimer">
        <i class="fa fa-trash"></i>
      </a>
   
   6. DUPLICATE BUTTONS (Yellow, icon-only, matches unlink style):
      <button class="btn-duplicate" title="Dupliquer" aria-label="Dupliquer">
        <i class="fa fa-copy"></i>
      </button>
      <!-- OR as link -->
      <a href="#" class="btn-duplicate" title="Dupliquer" aria-label="Dupliquer">
        <i class="fa fa-copy"></i>
      </a>
   
   ==================================== */

/* ====================================
   EDIT BUTTON (Global - Available Site-Wide)
   Mirrors btn-duplicate icon-only style with purple colors
   ==================================== */
.btn-edit {
    background: linear-gradient(135deg, rgba(136, 106, 181, 0.1) 0%, rgba(136, 106, 181, 0.15) 100%);
    color: #886ab5;
    border: 1px solid rgba(136, 106, 181, 0.2);
    padding: 0.5rem 0.875rem;
    border-radius: 0.3rem;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-edit:hover {
    background: #886ab5;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(136, 106, 181, 0.25);
}

.btn-edit:focus,
.btn-edit:active {
    outline: none;
    box-shadow: 0 2px 8px rgba(136, 106, 181, 0.25), 0 0 0 3px rgba(136, 106, 181, 0.1);
}

/* ====================================
   DELETE BUTTON (Global - Available Site-Wide)
   ==================================== */
.btn-delete {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.15) 100%);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.5rem 0.875rem;
    border-radius: 0.3rem;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-delete:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
    border-color: #ef4444;
}

.btn-delete:focus,
.btn-delete:active {
    outline: none;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35), 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ====================================
   DUPLICATE BUTTON (Global - Available Site-Wide)
   Uses theme warning button colors with unlink button structure
   ==================================== */
.btn-duplicate {
    background: linear-gradient(135deg, rgba(255, 194, 65, 0.1) 0%, rgba(255, 194, 65, 0.15) 100%);
    color: #ffc241;
    border: 1px solid rgba(255, 194, 65, 0.2);
    padding: 0.5rem 0.875rem;
    border-radius: 0.3rem;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-duplicate:hover {
    background: linear-gradient(135deg, #ffc241 0%, #ffb61b 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(255, 194, 65, 0.35);
    border-color: #ffc241;
}

.btn-duplicate:focus,
.btn-duplicate:active {
    outline: none;
    box-shadow: 0 2px 6px rgba(255, 194, 65, 0.35), 0 0 0 3px rgba(255, 194, 65, 0.1);
}

/* Custom PDF button styling */
.btn-pdf {
    color: #fff;
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    border-color: #DC2626;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.3rem;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.btn-pdf:hover {
    color: #fff;
    transform: translateY(-2px);
    background: linear-gradient(135deg, #B91C1C 0%, #991B1B 100%);
    border-color: #B91C1C;
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.btn-pdf:focus,
.btn-pdf.focus {
    color: #fff;
    transform: translateY(-2px);
    background: linear-gradient(135deg, #B91C1C 0%, #991B1B 100%);
    border-color: #B91C1C;
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.btn-pdf.disabled,
.btn-pdf:disabled {
    color: #fff;
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    border-color: #DC2626;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-pdf:not(:disabled):not(.disabled):active,
.btn-pdf:not(:disabled):not(.disabled).active,
.show > .btn-pdf.dropdown-toggle {
    color: #fff;
    background: linear-gradient(135deg, #991B1B 0%, #7F1D1D 100%);
    border-color: #7F1D1D;
    transform: translateY(0);
}

.btn-pdf:not(:disabled):not(.disabled):active:focus,
.btn-pdf:not(:disabled):not(.disabled).active:focus,
.show > .btn-pdf.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.5);
}

/* Custom export button styling */
.btn-export {
    color: #fff;
    background: linear-gradient(135deg, #217346 0%, #1c613b 100%);
    border-color: #217346;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.3rem;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(33, 115, 70, 0.2);
}

.btn-export:hover {
    color: #fff;
    transform: translateY(-2px);
    background: linear-gradient(135deg, #1c613b 0%, #195a37 100%);
    border-color: #1c613b;
    box-shadow: 0 4px 8px rgba(33, 115, 70, 0.3);
}

.btn-export:focus,
.btn-export.focus {
    color: #fff;
    transform: translateY(-2px);
    background: linear-gradient(135deg, #1c613b 0%, #195a37 100%);
    border-color: #1c613b;
    box-shadow: 0 4px 8px rgba(33, 115, 70, 0.3);
}

.btn-export.disabled,
.btn-export:disabled {
    color: #fff;
    background: linear-gradient(135deg, #217346 0%, #1c613b 100%);
    border-color: #217346;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-export:not(:disabled):not(.disabled):active,
.btn-export:not(:disabled):not(.disabled).active,
.show > .btn-export.dropdown-toggle {
    color: #fff;
    background: linear-gradient(135deg, #195a37 0%, #175232 100%);
    border-color: #175232;
    transform: translateY(0);
}

.btn-export:not(:disabled):not(.disabled):active:focus,
.btn-export:not(:disabled):not(.disabled).active:focus,
.show > .btn-export.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(33, 115, 70, 0.5);
}

/* Custom import button styling - Same green as btn-complete-activity */
.btn-import {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: 1px solid #059669;
    padding: 0.5rem 1rem;
    border-radius: 0.3rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-import:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    border-color: #047857;
}

.btn-import:active,
.btn-import:focus {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    color: #fff;
    outline: none;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-import:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.alert {
    padding: 0.9rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.alert-info {
    background: rgba(32, 150, 243, 0.08);
    border-color: rgba(32, 150, 243, 0.35);
    color: #0f5c98;
}

.alert-success {
    background: rgba(29, 201, 183, 0.08);
    border-color: rgba(29, 201, 183, 0.35);
    color: #117064;
}

.alert-warning {
    background: rgba(255, 194, 65, 0.1);
    border-color: rgba(255, 194, 65, 0.35);
    color: #7a4e00;
}

.alert-danger {
    background: rgba(253, 57, 149, 0.08);
    border-color: rgba(253, 57, 149, 0.4);
    color: #9c1d55;
}

/* Table styles removed - use shared/tables.css instead */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: rgba(136, 106, 181, 0.12);
    color: #5a3f8a;
}

.panel-tag {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border-left: 5px solid var(--theme-primary);
    background: rgba(136, 106, 181, 0.07);
    color: var(--theme-text);
}

.panel-tag .panel-tag-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.panel-tag-actions {
    margin-left: auto;
    display: inline-flex;
    gap: 0.75rem;
}

.action-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ====================================
   GLOBAL BUTTON SPACING
   ====================================
   Ensures consistent spacing between buttons in flex containers
*/



/* Ensure buttons in flex containers with gap have no margins */
.d-flex[style*="gap"] .btn,
.d-flex.gap-1 .btn,
.d-flex.gap-2 .btn,
.d-flex.gap-3 .btn,
.d-flex.gap-4 .btn,
.d-flex.gap-2 .btn-delete,
.d-flex.gap-2 .btn-edit {
    margin-right: 0;
    margin-left: 0;
}

/* Ensure gap utility works properly */
.d-flex.gap-2 {
    gap: 0.75rem !important;
}

/* Button groups spacing - REMOVED: Use gap property instead */

.text-muted {
    color: var(--theme-muted) !important;
}

.text-primary {
    color: var(--theme-primary) !important;
}

.shadow-sm {
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.08);
}

.rounded {
    border-radius: 0.5rem !important;
}

.rounded-lg {
    border-radius: 0.75rem !important;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }

.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.flex-wrap { flex-wrap: wrap !important; }

/* Gap utility classes for flex containers */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.75rem !important; } /* Increased from 0.5rem for better button spacing */
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

/* Global button spacing in flex containers - REMOVED: Always use gap property instead */
.d-flex .btn + .btn,
.d-flex .btn-primary + .btn-delete,
.d-flex .btn-primary + .btn-secondary,
.d-flex .btn-primary + .btn,
.d-flex .btn-delete + .btn,
.d-flex .btn + .btn-delete {
    margin-left: 0;
}

.badge-soft {
    background: rgba(17, 24, 39, 0.05);
    color: rgba(17, 24, 39, 0.8);
}

/* Typography helpers */
.fs-lg { font-size: 1.125rem; }
.fs-sm { font-size: 0.85rem; }
.fw-300 { font-weight: 300; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.text-uppercase { text-transform: uppercase; }

/* ====================================
   PAGE CONTENT CARD - Centralized Container Styling
   Replaces: fs-lg fw-300 p-5 bg-white border-faded rounded mb-g
   Mirrors: reservations-main-card styling with Bootstrap classes
   ==================================== */
.page-content-card {
    width: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    font-size: 1.05rem;
    font-weight: 300;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

