html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

h1, h2, h3, h4, h5 {
    font-family: "ashemore", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.form-switch .form-check-input:checked {
    background-color: black;
    border-color: black;

}
.form-switch .form-check-input:focus {
    outline: none;
    box-shadow: none;
    border-color: #960018;
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23960018'/%3e%3c/svg%3e");
}
.form-switch .form-check-input {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23960018'/%3e%3c/svg%3e");
}
    .form-switch .form-check-input:focus:checked {
        outline: none;
        box-shadow: none;
        border-color: black;
        --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23FFFFFF'/%3e%3c/svg%3e");
    }

.logo-dark {
    display: none;
}

[data-bs-theme="dark"] .logo-light {
    display: none;
}

[data-bs-theme="dark"] .logo-dark {
    display: inline;
}

:root {
    --bs-carmin: #960018;
    --bs-carmin-rgb: 150, 0, 24;
    --bs-danger: var(--bs-carmin);
    --bs-danger-rgb: var(--bs-carmin-rgb);
}

[data-bs-theme=light] {
    --bs-body-bg: #ffffff;
    --bs-body-color: #212529;
    --bs-secondary-bg: #faf6f7;
    --bs-tertiary-bg: #fff5f6; /* léger ton chaud pour les sections */
    --bs-navbar-color: #960018;
    --bs-navbar-active-color: #7e0015;
    --bs-tertiary-bg: #FFF;
    --bs-tertiary-bg-rgb: 255,255,255;
    --bs-tertiary-color: #960018;
    --bs-emphasis-color-rgb: 150,0,24;
    --bs-tertiary-color-rgb: 150,0,24;
    --bs-card-title-color: #960018 !important;
    --bs-border-color: #960018;
    --bs-primary-bg-subtle: #fce8eb; /* fond léger rosé */
    --bs-primary-border-subtle: #f5c2c7;
    --bs-btn-primary-bg: #960018;
    --bs-btn-primary-border-color: #960018;
    --bs-btn-primary-hover-bg: #7e0015;
    /* Cartes */
    --bs-card-bg: #fff8f9;
    --bs-card-border-color: #960018 !important;
    --bs-card-color: #212529;
    --bs-card-title-color: #960018 !important;
    /* Boutons */
    --bs-primary: #960018 !important;
    --bs-primary-rgb: 150, 0, 24 !important;
    --bs-btn-primary-bg: #960018 !important;
    --bs-btn-color: #960018 !important;
    --bs-btn-color-rgb: 150, 0, 24 !important;
    --bs-btn-bg: #960018 !important;
    --bs-btn-primary-border-color-rgb: 150,0,24 !important;
    --bs-btn-border-color: #960018 !important;
    --bs-btn-primary-border-color: #960018;
    --bs-btn-primary-border-color-rgb: : 150,0,24;
    --bs-btn-primary-hover-bg: #7e0015;
    --bs-btn-primary-hover-border-color: #7e0015;
    /* Liens */
    --bs-link-color: #960018;
    --bs-link-color-rgb: 150, 0, 24;
    --bs-link-hover-color: #7e0015;
    --bs-link-hover-color-rgb: 126, 0, 21;
    /* Bordures */
    --bs-border-color: #e1c3c8;
    --bs-primary-bg-subtle: #fce8eb;
    --bs-primary-border-subtle: #f5c2c7;
}

[data-bs-theme="light"] body {
    background-image: repeating-linear-gradient( 135deg, 
    rgba(150, 0, 24, 0.75) 0px, rgba(150, 0, 24, 0.75) 2px, /* carmin (léger accent) */
    rgba(255, 255, 255, 0.6) 2px, rgba(255, 255, 255, 0.6) 50px, /* blanc principal */
    rgba(150, 0, 24, 0.75) 50px, rgba(150, 0, 24, 0.75) 52px, 
    rgba(229, 229, 229, 0.5) 52px, rgba(229, 229, 229, 0.5) 80px, /* gris clair 1 */
    rgba(255, 255, 255, 0.6) 80px, rgba(255, 255, 255, 0.6) 100px, /* blanc */
    rgba(150, 0, 24, 0.75) 100px, rgba(150, 0, 24, 0.75) 102px, 
    rgba(255, 255, 255, 0.6) 102px, rgba(255, 255, 255, 0.6) 140px, /* blanc */
    rgba(242, 242, 242, 0.4) 140px, rgba(242, 242, 242, 0.4) 160px, /* gris clair 2, plus doux */
    rgba(255, 255, 255, 0.6) 160px, rgba(255, 255, 255, 0.6) 200px /* blanc final élargi */
    );
}

[data-bs-theme="light"] #darkModeSwitch.form-check-input:checked {
    background-color: #960018; /* carmin */
}
[data-bs-theme="light"] .btn-outline-primary {
    color: #960018;
    border-color: #960018;
    background-color: transparent;
}

    /* Hover / focus : fond carmin, texte blanc, ombre légère */
    [data-bs-theme="light"] .btn-outline-primary:hover,
    [data-bs-theme="light"] .btn-outline-primary:focus {
        color: #ffffff;
        background-color: #960018;
        border-color: #960018;
        box-shadow: 0 0 0 .15rem rgba(150, 0, 24, 0.22);
        text-decoration: none;
    }

    /* Active : teinte un peu plus foncée */
    [data-bs-theme="light"] .btn-outline-primary:active {
        color: #ffffff;
        background-color: #7e0015;
        border-color: #7e0015;
    }

    /* Disabled : ton atténué, rien ne change au hover */
    [data-bs-theme="light"] .btn-outline-primary.disabled,
    [data-bs-theme="light"] .btn-outline-primary:disabled {
        color: rgba(150,0,24,0.4);
        border-color: rgba(150,0,24,0.25);
        background-color: transparent;
        pointer-events: none;
    }

.form-control:autofill {

}
[data-bs-theme="light"] .form-control:focus {
    border-color: var(--bs-carmin);
    box-shadow: 0 0 0 0.15rem rgba(150, 0, 24, 0.25);
}

[data-bs-theme="light"] .card {
    --bs-card-border-color: #e1c3c8;
}

[data-bs-theme=dark] {
    --bs-tertiary-bg: #960018;
    --bs-tertiary-bg-rgb: 150,0,24;
    --bs-tertiary-color: #FFF;
    --bs-tertiary-color-rgb: 255,255,255;
    --bs-emphasis-color-rgb: 255,255,255;
    --bs-card-title-color: #FFF;
    --bs-tertiary-color: #960018;
    --bs-tertiary-color-rgb: 150,0,24;
    --bs-primary: #960018 !important;
    --bs-primary-rgb: 150, 0, 24 !important;
}

[data-bs-theme="dark"] {
    --bs-link-color: #960018; /* carmin éclairci pour contraste */
    --bs-link-color-rgb: 150,0,24;
    --bs-link-hover-color: #fff;
    --bs-link-hover-color-rgb: 255, 255, 255;
    /* Boutons et états actifs */
    --bs-btn-primary-bg: #960018;
    --bs-btn-primary-border-color: #960018;
    --bs-btn-primary-hover-bg: #b51e2b;
    --bs-btn-primary-hover-border-color: #b51e2b;
    /* Bordures subtiles */
    --bs-primary-border-subtle: #5c1014;
    /* Carte / composants */
    --bs-card-bg: var(--bs-tertiary-bg);
    --bs-card-border-color: #5c1014;
}

    [data-bs-theme="dark"] body {
        background-image: repeating-linear-gradient( 135deg, 
        rgba(150, 0, 24, 0.35) 0px, rgba(150, 0, 24, 0.35) 2px, /* carmin foncé léger */
        rgba(18, 18, 18, 1) 2px, rgba(18, 18, 18, 1) 50px, /* fond principal */
        rgba(150, 0, 24, 0.35) 50px, rgba(150, 0, 24, 0.35) 52px, 
        rgba(50, 50, 50, 0.8) 52px, rgba(50, 50, 50, 0.8) 80px, /* gris anthracite fin */
        rgba(18, 18, 18, 1) 80px, rgba(18, 18, 18, 1) 100px, /* fond principal */
        rgba(150, 0, 24, 0.35) 100px, rgba(150, 0, 24, 0.35) 102px, 
        rgba(18, 18, 18, 1) 102px, rgba(18, 18, 18, 1) 140px, /* fond principal */
        rgba(80, 80, 80, 0.6) 140px, rgba(80, 80, 80, 0.6) 160px, /* gris moyen */
        rgba(18, 18, 18, 1) 160px, rgba(18, 18, 18, 1) 200px /* fin de cycle */
        );
        background-color: #121212;
        background-attachment: fixed;
    }

    [data-bs-theme="dark"] .card.shadow-sm {
        box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.5) !important;
    }

    /* Dark theme — boutons outline primary en carmin */
    [data-bs-theme="dark"] .btn-outline-primary {
        color: #ffffff; 
        border-color: #960018;
        background-color: transparent;
    }

        /* Hover / focus : fond carmin vif, texte blanc, halo léger */
        [data-bs-theme="dark"] .btn-outline-primary:hover,
        [data-bs-theme="dark"] .btn-outline-primary:focus {
            color: #ffffff;
            background-color: #960018;
            border-color: #960018;
            box-shadow: 0 0 0 .15rem rgba(255, 179, 193, 0.25);
            text-decoration: none;
        }

        /* Active : teinte légèrement plus foncée */
        [data-bs-theme="dark"] .btn-outline-primary:active {
            color: #ffffff;
            background-color: #7e0015;
            border-color: #7e0015;
        }

        /* Disabled : ton atténué, neutre sur fond sombre */
        [data-bs-theme="dark"] .btn-outline-primary.disabled,
        [data-bs-theme="dark"] .btn-outline-primary:disabled {
            color: rgba(255, 179, 193, 0.4);
            border-color: rgba(150,0,24,0.25);
            background-color: transparent;
            pointer-events: none;
        }
    [data-bs-theme="dark"] .form-control {
        background-color: rgba(80, 80, 80, 0.6);
        border-color: #495057;
    }
    [data-bs-theme="dark"] .form-control:focus {
            border-color: var(--bs-carmin);
            box-shadow: 0 0 0 0.15rem rgba(150, 0, 24, 0.25);
    }

    .nav-item:has(.nav-link.active) {
        border-bottom: 1px solid var(--bs-link-hover-color);
    }
.sup {
    font-size:0.5rem;
    top: -1em;
}
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
}
.alert-success {
    color: #00967e;
    border-color: #00967e;
}
.alert-danger {
    border: 1px solid var(--bs-carmin);
    color: var(--bs-carmin);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px rgba(80, 80, 80, 0.6) inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}
[data-bs-theme="light"] input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
    -webkit-text-fill-color: #000 !important;
}

[data-bs-theme="dark"] input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px rgba(80, 80, 80, 0.6) inset !important;
    -webkit-text-fill-color: #fff !important;
}