/* ===== Base ===== */
html, body {
    height: 100%;
    overflow-x: hidden;
}
html {
    -webkit-text-size-adjust: 100%;
}

/* ===== Impression ===== */
@page {
    size: A4;
    margin: 18mm;
}
@media print {
    table {
        border-collapse: collapse;
        width: 100%;
    }
    th, td {
        border: 1px solid #777;
        padding: 8px;
        vertical-align: top;
    }
    .btn, .pagination, .alert, nav, footer {
        display: none !important;
    }
}

/* ===== Espace pour la navbar ===== */
body {
    padding-top: 80px; /* mobile / défaut */
}
@media (min-width: 992px) {
    body {
        padding-top: 90px; /* desktop */
    }
}

/* ===== Fallback AOS ===== */
[data-aos] {
    opacity: 1 !important;
    transform: none !important;
}

/* ===== Navbar: correctifs robustes ===== */
.psit-navbar {
    z-index: 1030;
    overflow: visible;
}
.psit-navbar .container-fluid {
    overflow: visible;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    overflow-x: visible;
}

/* Logo responsive uniquement */
.brand-logo,
.navbar-brand img {
    height: 38px;
    width: auto;
    max-width: 70px;
    max-height: 38px;
    object-fit: contain;
}

.custom-container {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .brand-logo,
    .navbar-brand img {
        height: 30px;
        max-width: 100px;
    }
    .navbar .container,
    .navbar .container-fluid {
        padding-left: .75rem;
        padding-right: .75rem;
    }
}

/* Menu: pas d'overflow qui coupe les dropdowns */
.navbar .navbar-collapse {
    overflow: visible;
    max-width: 100%;
}

/* Menu très long en mobile : scroll vertical propre */
@media (max-width: 991.98px) {
    .navbar .navbar-collapse {
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }
}

/* Eviter les retours à la ligne bizarres dans le menu */
.navbar .nav-link,
.navbar .dropdown-item {
    white-space: nowrap;
}

/* ===== Boutons démo ===== */
.colorButton.red {
    background-color: yellow;
    color: #000;
}
.colorButton.blue {
    background-color: red;
    color: #000;
}

/* ===== Newsletter ===== */
.newsletter-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0ea5e9 100%);
    color: #fff;
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.text-white-75 {
    color: rgba(255,255,255,.85);
}
.newsletter-form .form-control,
.newsletter-form .btn {
    border: 0;
}
.newsletter-form .form-control:focus {
    box-shadow: 0 0 0 .25rem rgba(14,165,233,.25);
}

/* ===== Footer ===== */
.site-footer {
    position: relative;
    z-index: 1;
    background-color: #212529;
}
.site-footer .container,
.site-footer .row,
.site-footer .col-md-4 {
    background: transparent;
}
.site-footer hr {
    border-color: rgba(255,255,255,.25);
    opacity: .75;
}

/* ===== Overflow horizontal safe ===== */
section, footer, header {
    overflow-x: clip;
}

/* ===== Utilitaires responsive ===== */
@media (max-width: 768px) {
    .w-md-75 {
        width: 100% !important;
    }
}
@media (max-width: 576px) {
    .fs-4 {
        font-size: 1.25rem;
    }
    .btn {
        font-size: 0.875rem;
    }
}
