/* Header avec image de fond */
header.container-header {
    background-image: url('https://www.medprym.ovh/images/comp/Casiers.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    position: relative;
    min-height: 120px;
    overflow: visible;
    z-index:100;
}

header.container-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

/* Logo */
.navbar-brand {
    position: relative;
    z-index: 2;
    margin: 10px auto;
    display: block;
    text-align: center;
    opacity: 0;
    animation: fadeIn 1.5s ease-in-out 1s forwards;
    width: fit-content;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Menu desktop */
.container-nav {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 2px 0;
    position: relative;
    z-index: 3;
}

.navbar {
    background-color: transparent !important;
    padding: 0;
    width: 100%;
}

.navbar-expand-lg .navbar-collapse {
    justify-content: center;
    padding: 0;
}

/* Menu principal (Desktop) */
.mod-menu_dropdown-metismenu {
    display: flex;
    justify-content: center;
    gap: 1px 1px;
    padding: 0;
    margin: 0 auto;
    background-color: transparent;
    width: auto;
    flex-wrap: wrap;
}

.mod-menu_dropdown-metismenu > li {
    list-style: none;
    margin: 1px;
    flex: 0 0 auto;
    position: relative;
}

/* Style pour les éléments de niveau supérieur (Desktop) */
.mod-menu_dropdown-metismenu > li > a,
.mod-menu_dropdown-metismenu > li.divider > a {
    display: inline-block;
    padding: 4px 2px;
    background-color: #001f3f;
    color: #ffd700 !important;
    border: 2px solid #ffd702;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: bold;
}

/* Style pour les sous-rubriques - Desktop — VERSION AMÉLIORÉE */
.mod-menu_dropdown-metismenu > li ul {
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;

    /* Style amélioré */
    background: rgba(240, 240, 240, 0.85) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 5px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);

    z-index: 9999 !important;
}

.mod-menu_dropdown-metismenu > li ul li a {
    display: block !important;
    padding: 10px 15px !important;
    margin: 0 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #001F3F !important;
    background: transparent !important;
    border: none !important;
    transition: background 0.3s ease, color 0.3s ease;
}

.mod-menu_dropdown-metismenu > li ul li a:hover {
    background: rgba(255, 215, 0, 0.25) !important;
    color: #001F3F !important;
    border-radius: 3px;
}

/* Boutons actifs et survol - Desktop */
.mod-menu_dropdown-metismenu > li.current > a,
.mod-menu_dropdown-metismenu > li.active > a,
.mod-menu_dropdown-metismenu > li.divider.current > a,
.mod-menu_dropdown-metismenu > li.divider.active > a {
    background-color: #228B22 !important;
    color: #ffd700 !important;
    border-color: #ffd702;
}

.mod-menu_dropdown-metismenu > li > a:hover,
.mod-menu_dropdown-metismenu > li.divider > a:hover {
    background-color: #ffffff !important;
    color: #ff0000 !important;
    border-color: #ff0000;
}

/* Fix overflow pour afficher les sous-menus */
body,
.container-header,
.container-nav,
.navbar {
    overflow: visible !important;
}

/* Mobile */
@media (max-width: 991px) {
    /* Logo */
    .navbar-brand {
        margin: 10px auto !important;
    }

    /* Hamburger */
    .navbar-toggler {
        display: block !important;
        position: fixed !important;
        top: 180px !important;
        left: 20px !important;
        z-index: 1200 !important;
        width: 40px !important;
        height: 40px !important;
        border: none !important;
        background: #140554 !important;
        color: #F2F1B6 !important;
        font-size: 1.8rem !important;
        padding: 5px !important;
        border-radius: 5px !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    }

    /* Slider mobile avec image de fond */
    .navbar-collapse {
        display: none !important;
        position: fixed !important;
        top: 230px !important;
        left: 0 !important;
        width: 80% !important;
        max-width: 360px !important;
        background-image: url('https://www.medprym.ovh/images/comp/nenupharComp.jpg') !important;
        background-size: cover !important;
        background-position: center !important;
        z-index: 1150 !important;
        overflow-y: auto !important;
        box-shadow: 5px 0 10px rgba(0, 0, 0, 1) !important;
        max-height: calc(100vh - 230px) !important;
        //position: relative;
     
    }

    .navbar-collapse::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255,0.2);
        z-index: -1;
    }

    /* Affiche le menu quand il est ouvert */
    .navbar-collapse.show {
        display: block !important;
    }

    /* Liste du menu */
    .navbar-collapse .mod-list {
        margin: 0 !important;
        padding: 5px !important;
        list-style: none !important;
        position: relative;
        z-index: 1;
       
    }

    /* Éléments de la liste */
    .navbar-collapse .mod-list li {
        margin: 0 0 5px 0 !important;
        padding: 0 !important;
    }

    /* Style pour les éléments de niveau supérieur (Mobile) */
    .navbar-collapse .mod-list > li > a,
    .navbar-collapse .mod-list > li.divider > a {
        display: block !important;
        padding: 4px 15px !important;
        margin: 0 !important;
        font-size: 0.9rem !important;
        color: #ffd700 !important;
        background-color: rgba(0, 31, 63, 0.8) !important;
        border: 2px solid #ffd700 !important;
        border-radius: 5px !important;
        text-decoration: none !important;
        font-weight: bold !important;
        word-break: break-word !important;
    }

    /* Style pour les sous-rubriques - Mobile */
    /* Suppression de la limite du sous-menu */
.navbar-collapse .mod-list > li ul {
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
    left: 0 !important;
    top: auto !important;
}

    .navbar-collapse .mod-list > li ul li a {
        display: block !important;
        padding: 6px 15px !important;
        margin: 0 0 2px 0 !important;
        font-size: 0.9rem !important;
        color: #ffd700 !important;
        background-color: rgba(0, 31, 63, 0.8) !important;
        border: 1px solid #ffd700 !important;
        border-radius: 3px !important;
    }

    /* Boutons actifs et survol - Mobile */
    .navbar-collapse .mod-list li.current > a,
    .navbar-collapse .mod-list li.active > a,
    .navbar-collapse .mod-list li.divider.current > a,
    .navbar-collapse .mod-list li.divider.active > a {
        color: #ffd700 !important;
        background-color: rgba(34, 139, 34, 0.8) !important;
        border-color: #ffd700 !important;
    }

    .navbar-collapse .mod-list li > a:hover,
    .navbar-collapse .mod-list li.divider > a:hover {
        background-color: rgba(255, 255, 255, 0.8) !important;
        color: #ff0000 !important;
        border-color: #ff0000 !important;
    }
}

/* pour joodb */
.p { font-size:18px;}

.AmmCorpsTexteGras
{
font-weight : bold;
  font-size:18px;
color:#5c6bc0;
}

.AmmAnnexeTitre1  
{
font-size:18px;
color:#3863ab;
font-weight:bold;
}

.AmmAnnexeTitre2
{
color:green;
  font-size:18px;
font-weight : bold;
}

.AmmAnnexeTitre3
{
color:blue;
  font-size:18px;
font-weight : bold;
}

.AmmAnnexeTitre4
{
color:#4c9d38;
  font-size:18px;
font-weight : bold;
font-style: italic;
}


.AmmListePuces1
{
 padding-left: 15px;
  font-size:18px;
}

.AmmListePuces2
{
 padding-left: 30px;
  font-size:18px;
}
.noticeA
{
font-size:18px;
background: #ffecb3;
}

.noticeB
{
font-size:18px;
background: #f0f4c3;
}

.titu
{
font-size:20px;
background: #000000;
color:#ffffff;
text-align:center;
}


/* ======== BOXED LAYOUT + RADIAL BLEU + MICRO-LUMIERES + GRAIN ======== */

/* --- Gradient radial sur body.site --- */
body.site {
    position: relative;
    z-index: 0;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at 50% 40%,
        #3f5ba8 0%,      /* centre clair bleu */
        #2a3d6e 25%,
        #040a17 60%,
        #020C38 100%     /* bord sombre */
    ) fixed !important;
}

/* Neutralisation du fond Cassiopeia */
.site,
.body-wrapper {
    background: transparent !important;
}

/* --- Conteneur principal centré (boxed layout) --- */
.site-grid {
    width: 100%;
    max-width: 1400px;
    background: #ffffff;
    margin: 0 auto !important;
    box-shadow: 0 0 25px rgba(0,0,0,0.35);
    border-radius: 10px;
    padding-bottom: 20px;
    position: relative;
    z-index: 1; /* au-dessus du radial et des lumières */
}

/* --- Header inclus dans la boîte --- */
header.container-header {
    max-width: 1400px;
    margin: 0 auto !important;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

/* --- Micro-lumières visibles autour de la boîte --- */
body.site::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0; /* sous la boîte (.site-grid) */
    pointer-events: none;

    background-image:
        radial-gradient(circle 150px at 0% 0%, rgba(255,219,0,0.85) 0%, transparent 100%),    /* coin haut-gauche */
        radial-gradient(circle 150px at 100% 0%, rgba(255,219,0,0.65) 0%, transparent 100%),  /* coin haut-droit */
        radial-gradient(circle 150px at 0% 100%, rgba(255,219,0,0.65) 0%, transparent 100%),  /* coin bas-gauche */
        radial-gradient(circle 150px at 100% 100%, rgba(255,219,0,0.85) 0%, transparent 100%); /* coin bas-droit */

    background-repeat: no-repeat;
    opacity: 0.45;
}

/* --- Grain subtil mais visible --- */
body.site::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0; /* sous le contenu mais au-dessus du gradient */
    pointer-events: none;

    background-image: url("data:image/svg+xml;utf8,\
        <svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'>\
            <filter id='noise'>\
                <feTurbulence type='fractalNoise' baseFrequency='2' numOctaves='5' stitchTiles='stitch'/>\
            </filter>\
            <rect width='200' height='200' filter='url(#noise)' opacity='0.35'/>\
        </svg>");
    opacity: 0.25; /* un peu plus visible que subtil */
}


/* Bouton d'installation PWA centré en bas */
#pwa-install-btn {
    display: none; /* OBLIGATOIRE */
    position: fixed;
    bottom: 30px;
    left: 10%;
    right: 10%;
    padding: 12px 24px;
    background-color: #121959 !important;
    color: #F6FA1E !important;
    font-weight: 600;
    font-size: 24px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.2s ease, opacity 0.3s ease;
}


* === Tableau responsive bas de page (.bottom-a) === */
.medprym-grid {
    text-align: center;
}

.grid-title {
    color: #169179;
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0 20px;
}

.grid-buttons {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* 🔹 Version tablette et desktop -> force 3 colonnes */
@media (min-width: 600px) {
    .grid-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
}

.grid-item img {
    width: 100%;
    max-width: 120px;
    height: auto;
}

.item-label {
    font-size: 14px;
    font-weight: bold;
    color: #34495e;
    margin-bottom: 8px;
}

/* Conteneur */
.medprym-grid {
    text-align: center;
}

/* Titres */
.grid-title {
    color: #169179;
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0 20px;
}

/* Grille responsive */
.grid-buttons {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* Forcer 3 colonnes dès tablette */
@media (min-width: 600px) {
    .grid-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Carte/bouton */
.grid-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 12px;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Effet au survol */
.grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}

/* Image */
.grid-item img {
    width: 100%;
    max-width: 120px;
    height: auto;
    margin-bottom: 8px;
}

/* Texte */
.item-label {
    font-size: 14px;
    font-weight: bold;
    color: #34495e;
    margin-bottom: 5px;
}