/* ====================================
   GLOBAL NAVIGATION SETTINGS
   ==================================== */

/* Prevent page scroll when clicking tabs or changing hash */
html {
    scroll-behavior: auto !important;
}

/* ====================================
   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: 6px;
    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: 6px;
    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: 6px;
    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 export button styling */
.btn-export {
    color: #fff;
    background: linear-gradient(135deg, #217346 0%, #1c613b 100%);
    border-color: #217346;
    transition: all 0.2s ease;
}

.btn-export:hover {
    color: #fff;
    transform: translateY(-2px);
    background: linear-gradient(135deg, #1c613b 0%, #195a37 100%);
    border-color: #1c613b;
}

.btn-export:focus,
.btn-export.focus {
    color: #fff;
    transform: translateY(-2px);
    background: linear-gradient(135deg, #1c613b 0%, #195a37 100%);
    border-color: #1c613b;
}

.btn-export.disabled,
.btn-export:disabled {
    color: #fff;
    background: linear-gradient(135deg, #217346 0%, #1c613b 100%);
    border-color: #217346;
}

.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;
}

.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);
}

/* Apply transition to all primary buttons globally */
.btn-primary {
     transition: all 0.2s ease;
     background: linear-gradient(135deg, #886ab5 0%, #6b5596 100%);
}
.btn-primary:hover {
   transform: translateY(-2px);
   background: linear-gradient(135deg, #6b5596 0%, #5a4a7a 100%);
}
.btn-secondary {
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}
.btn-secondary:hover {
   transform: translateY(-2px);
   background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
}

/* Legacy class support */
.btn-primary.transition-up{
     transition: all 0.2s ease;
}
.btn-primary.transition-up:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(136, 106, 181, 0.25);
}