:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --bs-primary: #5170FF;
    --bs-primary-rgb: 81, 112, 255;
    --bs-link-color: #5170FF;
    --bs-link-hover-color: #3e5bc9;
    --font-heading: "Montserrat", sans-serif;
    --font-brand: 'Sanchez', serif;
    --font-body: 'Outfit', sans-serif;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #0b0e14;
    --bs-body-color: #f1f3f5;
    --bs-tertiary-bg: #161b22;
    --bs-light: #161b22;
    --bs-light-rgb: 22, 27, 34;
}

/* Global utility overrides for Dark Mode */
[data-bs-theme="dark"] .bg-light {
    background-color: #12171d !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #161b22 !important;
    color: #f1f3f5 !important;
}

[data-bs-theme="dark"] footer,
[data-bs-theme="dark"] footer a:not(.btn),
[data-bs-theme="dark"] footer .nav-link,
[data-bs-theme="dark"] footer .link-dark {
    color: #f1f3f5 !important;
}

[data-bs-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .card {
    background-color: #161b22;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .navbar-nav .nav-link {
    color: #f1f3f5 !important;
}

[data-bs-theme="dark"] .btn-outline-dark {
    border-color: #f1f3f5;
    color: #f1f3f5;
}

[data-bs-theme="dark"] .btn-outline-dark:hover {
    background-color: #f1f3f5;
    color: #0b0e14;
}

[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-primary {
    border-color: rgba(255, 255, 255, 0.1) !important;
}



body {
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
}

.ff-1 {
    font-family: var(--font-brand);
    font-weight: 600 !important;
}

/* --- Navbar --- */
.navbar {
    transition: background-color 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .navbar.scrolled {
    background-color: rgba(11, 14, 20, 0.95) !important;
}


/* Fix Navbar Toggler in Dark Mode */
[data-bs-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Fix Navbar Links in Dark Mode (Specific override for light theme navbar in dark mode site) */
[data-bs-theme="dark"] .navbar[data-bs-theme="light"] .nav-link {
    color: rgba(255, 255, 255, 0.55);
}

[data-bs-theme="dark"] .navbar[data-bs-theme="light"] .nav-link:hover,
[data-bs-theme="dark"] .navbar[data-bs-theme="light"] .nav-link.active {
    color: #fff;
}

[data-bs-theme="dark"] .navbar .nav-link {
    color: #f1f3f5 !important;
}

[data-bs-theme="dark"] .navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
    /* filter: invert(1);Removed to avoid conflict with white SVG icon */
}


/* Mobile Navbar Centering */
@media (max-width: 991.98px) {
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
}


/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: url('../img/Back3.webp') no-repeat center center/cover;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Overlay très subtil : dégradé léger pour lisibilité texte */
    background: linear-gradient(to right, rgba(0, 0, 0, 0.1) 20%, rgba(0, 0, 0, 0.0) 80%);
    z-index: 1;
}

[data-bs-theme="dark"] .hero::after {
    background: linear-gradient(to right, rgba(11, 14, 20, 0.8) 30%, rgba(11, 14, 20, 0.6) 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* --- Animation IA --- */
.animation-container {
    position: relative;
    width: 100%;
    max-width: 768px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-logo-container {
    position: relative;
    z-index: 1;
    width: 40vw;
    max-width: 200px;
    animation: floating 5s ease-in-out infinite;
}

.main-logo-container img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.orbit-logo-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10vw;
    max-width: 60px;
}

.orbit-logo-container img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background-color: white;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(140px) rotate(0deg);
    }

    to {
        transform: rotate(360deg) translateX(140px) rotate(-360deg);
    }
}

@media (min-width: 768px) {
    @keyframes orbit {
        from {
            transform: rotate(0deg) translateX(18vw) rotate(0deg);
        }

        to {
            transform: rotate(360deg) translateX(18vw) rotate(-360deg);
        }
    }
}

.orbit-logo-container:nth-child(2) {
    animation: orbit 25s linear infinite;
    animation-delay: -4.1s;
}

.orbit-logo-container:nth-child(3) {
    animation: orbit 25s linear infinite;
    animation-delay: -8.3s;
}

.orbit-logo-container:nth-child(4) {
    animation: orbit 25s linear infinite;
    animation-delay: -12.5s;
}

.orbit-logo-container:nth-child(5) {
    animation: orbit 25s linear infinite;
    animation-delay: -16.7s;
}

.orbit-logo-container:nth-child(6) {
    animation: orbit 25s linear infinite;
    animation-delay: -20.9s;
}

.orbit-logo-container:nth-child(7) {
    animation: orbit 25s linear infinite;
    animation-delay: -25s;
}

/* --- Bannière --- */
.quote-banner {
    background-color: var(--bs-primary);
    color: white;
}

/* Correctifs visuels Photos & Partenaires */
.partner-logo {
    height: 80px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: none !important;
    /* Retrait grayscale */
}

/* Logo Progress visibility fix - Theme based swap */
.progres-logo-img {
    max-width: 300px;
    height: auto;
}

[data-bs-theme="dark"] .progres-logo-img {
    filter: brightness(0) invert(1) !important;
}

[data-bs-theme="dark"] img[src*="logo-francenum.svg"] {
    filter: brightness(0) invert(1) !important;
}



.partner-logo:hover {
    transform: scale(1.1);
}

.team-photo {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 3px solid var(--bs-primary);
}

/* Style du Bandeau Cookie */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #212529;
    color: white;
    padding: 1.5rem;
    z-index: 1050;
    display: none;
    border-top: 3px solid var(--bs-primary);
}

#cookie-consent-banner p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

#cookie-consent-banner a {
    color: var(--bs-primary);
    text-decoration: underline;
}

#cookie-consent-banner .btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Dark mode toggle - Floating Position */
.theme-toggle-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}



.theme-toggle-btn:hover {
    transform: scale(1.1);
}

[data-bs-theme="dark"] .theme-toggle-btn {
    background: #212529;
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}


/* --- Style Cartes Formation --- */
.card-formation {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
}

[data-bs-theme="dark"] .card-formation {
    border-color: rgba(255, 255, 255, 0.1);
    background: #161b22;
}

.card-formation:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(var(--bs-primary-rgb), 0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.badge-custom {
    font-size: 0.9rem;
    padding: 0.5em 0.75em;
}

/* --- Contact Page --- */
.contact-container {
    background: white;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .contact-container {
    background: #161b22;
}

/* Removal of requested shadows/frames on images */
.no-shadow,
.shadow-none-important {
    box-shadow: none !important;
}

img.shadow,
img.shadow-sm,
.card.shadow-sm {
    box-shadow: none !important;
}

/* --- Global Utility Classes to replace inline styles --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    /* Espace entre texte et icône */
}

/* Correction du Bouton Primary (Fix Bootstrap 5.3) */
.btn-primary {
    --bs-btn-bg: #5170FF;
    --bs-btn-border-color: #5170FF;
    --bs-btn-hover-bg: #415acc;
    --bs-btn-hover-border-color: #3d54bf;
    --bs-btn-focus-shadow-rgb: 81, 112, 255;
    --bs-btn-active-bg: #3a51b5;
    --bs-btn-active-border-color: #354aa8;
}

/* Correction du Bouton Outline Primary */
.btn-outline-primary {
    --bs-btn-color: #5170FF;
    --bs-btn-border-color: #5170FF;
    --bs-btn-hover-bg: #5170FF;
    --bs-btn-hover-border-color: #5170FF;
    --bs-btn-focus-shadow-rgb: 81, 112, 255;
    --bs-btn-active-bg: #5170FF;
    --bs-btn-active-border-color: #5170FF;
}

.icon-inline {
    width: 1em;
    height: 1em;
    /* vertical-align: middle; Removed for better alignment with flexbox */
}

.icon-lg {
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
}

.img-cover {
    object-fit: cover;
}

/* Handled above with .progres-logo-img */

.footer-bottom {
    background-color: var(--bs-primary);
}

.team-photo-sq {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

/* --- Final Polish Utilities --- */
.img-zoom {
    transform: scale(1.05);
}

.min-h-300 {
    min-height: 300px;
}

.formation-quote-icon {
    font-size: 4rem;
    top: -2rem;
    left: -1rem;
    transform: rotate(180deg);
    z-index: 1;
}

.formation-quote-text {
    z-index: 2;
}
/* --- Tab Panes Visibility & Spacing --- */
.tab-pane {
    padding: 2.5rem !important;
}

.tab-pane h3 {
    margin-bottom: 1.5rem;
    color: var(--bs-primary);
}

.tab-pane ul {
    list-style: none;
    padding-left: 0;
}

.tab-pane ul li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tab-pane ul li i {
    color: var(--bs-primary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* --- Utilities --- */
.icon-rotate-phone {
    transform: rotate(15deg);
    display: inline-block;
}

.footer-credits {
    font-size: 0.9rem;
    opacity: 0.9;
}
.ff-1 { font-family: var(--font-brand); }
