* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

}

body {
    background-color: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    color: #333;
    min-height: 100%;
    /* Le corps prend au minimum toute la hauteur de la fenêtre */
    display: flex;
    flex-direction: column;
    -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10+ */
  user-select: none; /* Standard */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Style pour le nouveau conteneur à droite */
.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
    /* Crée un espace entre la barre de recherche et le bloc de connexion */
}

.logo img {
    height: 70px;
    padding-top: 20px;
}

.search-container {
    display: flex;
    align-items: center;
}

.search-box {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box:focus {
    border-color: #0066cc;
}

.search-icon {
    font-size: 18px;
    background: #0066cc;
    border: 1px solid #0066cc;
    border-radius: 0 4px 4px 0;
    padding: 7px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-icon:hover {
    background: #0052a3;
    border-color: #0052a3;
}

/* Responsive */
@media (max-width: 768px) {
    .search-box {
        width: 120px;
    }
}

.main-nav {
    display: flex;
    justify-content: right;
    background-color: white;
    padding: 5px 0;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    margin: 0 15px;
}

.main-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    /* Cette ligne est la clé, elle centre verticalement */
}

.home-icon {
    /* Le display: flex et align-items: center du parent 'a' s'en occupe */
    font-size: 18px;
    text-decoration: none ! important;
    /* Légèrement augmenté pour mieux correspondre à la taille du texte */
}

/* La règle spécifique pour .main-nav ul li:first-child a a été supprimée. */

.main-nav ul li a:hover {
    color: #0066cc;
}

/* Nouveaux styles pour l'authentification */
.auth-status {
    display: flex;
    flex-direction: column;
    /* <<< LA CLÉ : Met les éléments en colonne */
    align-items: center;
    /* Aligne les éléments à droite de leur conteneur */
    gap: 4px;
    /* Réduit l'espace vertical entre le bouton et le nom */
}

.auth-status span {
    font-size: 12px;
    /* Rend le texte du nom un peu plus petit */
    color: #555;
    /* Une couleur un peu moins forte pour la subtilité */
    text-align: center;
    /* S'assure que le texte reste aligné au centre */
}

/* Les styles du bouton n'ont pas besoin de changer */
.auth-status button {
    background-color: #0d47a1;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-status button:hover {
    background-color: #0a3880;
}

.hidden-link {
    display: none !important;
    /* Cache les liens protégés */
}

.hero-contain {
    font-size: 16px;
    color: #f5f5f5;
    background-image: url("../images/BatimentIRR.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.hero-title {
    font-size: 32px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    padding: 50px;
    height: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 15px;
}

.link-white a:link {
    color: white;
}

.link-white a:visited {
    color: white;
}

.link-white a:hover {
    color: white;
}

.description {
    margin-left: 50px;
    margin-right: 40px;
    text-align: justify;
}

.footer {
    text-align: center;
    font-size: 0.9em;
    line-height: 1.5em;
    /* Augmenté pour une meilleure lisibilité */
    color: #817979;
    width: 100%;
}

main {
    flex-grow: 1;
    /* Le contenu principal grandit pour occuper l'espace vide */
}

html {
    height: 100%;
    /* S'assurer que la base est à 100% */
    scroll-behavior: smooth;
}

/* ===================================================================
   NAVIGATION STICKY
   =================================================================== */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.header-wrapper.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ===================================================================
   FIL D'ARIANE (BREADCRUMB)
   =================================================================== */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 12px 50px;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 10px;
    color: #6c757d;
    font-size: 16px;
    font-weight: bold;
}

.breadcrumb-item a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #004499;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
}

.breadcrumb-home-icon {
    font-size: 16px;
    margin-right: 2px;
}

/* ===================================================================
   BOUTON RETOUR EN HAUT
   =================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
    z-index: 999;
}

.back-to-top:hover {
    background-color: #0052a3;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.5);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ===================================================================
   RESPONSIVE POUR NAVIGATION
   =================================================================== */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 10px 20px;
        font-size: 13px;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 6px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}