/* =========================
   Base / Layout général
   ========================= */

:root{
    --bg: #fdfaf8;
    --text: #3e2723;

    --nav-h: 64px;        /* desktop */
    --nav-h-mobile: 56px; /* mobile */
    --side-wave-w: 160px;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;

    background-color: var(--bg);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;

    padding-top: var(--nav-h);

    overflow-y: auto;
    overflow-x: hidden;
}

/* Le contenu prend l'espace restant */
main {
    flex: 1 0 auto;

    /* Supprime l'espace inutile en haut */
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* =========================
   Navbar TOUJOURS VISIBLE
   ========================= */

nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100%;

    height: var(--nav-h);
    z-index: 9999;

    background-color: #705030 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Wrapper navbar */
.nav-wrapper {
    background-color: transparent !important;
    padding: 0 20px;
    height: 100%;
}

/* Logo */
.nav-wrapper a.brand-logo {
    font-weight: 600;
    font-size: 1.8rem;
    letter-spacing: 1px;
}

/* Liens navbar */
.nav-wrapper ul li {
    margin: 0 10px;
}

.nav-wrapper a,
.nav-wrapper ul li a {
    color: #f5f5f5 !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-wrapper ul li a:hover {
    color: #d7ccc8 !important;
    transform: scale(1.05);
}

.nav-wrapper ul li a i.material-icons.left {
    vertical-align: middle;
    margin-right: 6px;
    color: #efebe9;
}

/* =========================
   IMPORTANT : on enlève le gros padding-top global
   (la place est gérée par body { padding-top: ... })
   ========================= */

.container,
.main-content,
main {
    padding-top: 0 !important;
}
main.container {
    max-width: none !important;
    width: 100%;
}

/* =========================
   Sidenav (mobile)
   ========================= */

.sidenav {
    background-color: #8b5e3c;
}

.sidenav a {
    color: #f5f5f5;
}

.sidenav a:hover {
    background-color: #6e4c2d;
}

/* =========================
   Contenu principal
   ========================= */

.main-content {
    margin-top: 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================
   Footer
   ========================= */

.page-footer {
    flex-shrink: 0;
    background-color: #8b5e3c !important;
    padding-top: 30px;
    border-top: 2px solid #6e4c2d;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.page-footer h5 {
    font-weight: 700;
    color: #d7ccc8;
    margin-bottom: 1rem;
}

.page-footer p,
.page-footer ul li a {
    color: #efebe9;
    font-weight: 400;
}

.page-footer ul li a:hover {
    color: #bcaaa4;
}

.footer-copyright {
    background-color: #6e4c2d !important;
    color: #d7ccc8 !important;
    padding: 12px 0;
}

/* =========================
   Cards / UI
   ========================= */

.card-title {
    font-weight: 600;
    font-size: 1.6rem;
}

.card-content p {
    font-size: 1rem;
}

.card-action a:hover {
    color: #8d6e63 !important;
    text-decoration: underline;
}

.card.hoverable:hover {
    transform: translateY(-4px);
    transition: all 0.3s ease-in-out;
}

/* =========================
   Couleurs / Boutons
   ========================= */

.custom-brown {
    background-color: #6e4c2d !important;
}

.custom-green {
    background-color: #558b2f !important;
}

.btn-green-matte {
    background-color: #558b2f !important;
    color: white !important;
}

.btn-green-matte:hover {
    background-color: #33691e !important;
}

/* =========================
   Modals
   ========================= */

.modal {
    overflow-x: hidden !important;
}

/* =========================
   Dashboard blocks
   ========================= */

.dashboard-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    height: 160px;
    border-radius: 16px;
    color: white;
    text-decoration: none;

    padding: 20px;
    gap: 10px;

    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    font-weight: 600;
    font-size: 1.1rem;
}

.dashboard-icon {
    font-size: 3rem;
}

/* =========================
   Bandes latérales SVG (LOCAL)
   ========================= */

body.with-side-waves::before,
body.with-side-waves::after {
    content: "";
    position: fixed;
    top: 0;                 /* couvre toute la hauteur */
    width: var(--side-wave-w);
    height: 100vh;

    background-image: url("/logo/border_green.svg");
    background-repeat: repeat-y;
    background-size: 100% auto;
    background-position: top center;

    z-index: 1;              /* derrière le contenu */
    pointer-events: none;
    opacity: 0.95;
}

body.with-side-waves::before { left: 0; }

body.with-side-waves::after {
    right: 0;
    transform: scaleX(-1);
}

/* Le contenu au-dessus des bandes */
main,
.page-footer {
    position: relative;
    z-index: 2;
}

/* Navbar encore au-dessus */
nav {
    z-index: 9999;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 992px) {
    body.with-side-waves::before,
    body.with-side-waves::after {
        display: none;
    }
}

@media (max-width: 600px) {
    :root { --nav-h: 56px; }

    nav {
        height: var(--nav-h);
    }

    body {
        padding-top: var(--nav-h);
    }

    .nav-wrapper ul li a {
        font-size: 0.9rem;
    }

    .dashboard-link {
        height: 100px;
        padding: 12px;
    }

    .dashboard-icon {
        font-size: 2.2rem;
    }

    .dashboard-link div {
        display: none;
    }

    .adherent-menu {
        grid-template-columns: 1fr !important;
    }
}
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================
   Footer - version compacte
   ========================= */

.page-footer{
    padding-top: 14px !important;        /* avant 30px */
    padding-bottom: 0 !important;
    border-top: 1px solid #6e4c2d !important;
    box-shadow: 0 -1px 6px rgba(0,0,0,0.08) !important;
}

.page-footer .container{
    padding-top: 0 !important;
}

/* Titres plus petits */
.page-footer h5{
    margin: 0 0 8px 0 !important;
    font-size: 1.1rem !important;
    line-height: 1.2 !important;
}

/* Textes plus compacts */
.page-footer p,
.page-footer ul li a{
    margin: 0.15rem 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.35 !important;
}

/* Liste plus serrée */
.page-footer ul{
    margin: 6px 0 0 0 !important;
}
.page-footer ul li{
    margin: 2px 0 !important;
}

/* Bande copyright plus fine */
.footer-copyright{
    padding: 8px 0 !important;           /* avant 12px */
    font-size: 0.9rem !important;
}
.footer-copyright p{
    margin: 0 !important;                /* enlève le gros bloc à droite */
}
/* =========================
   Modals au-dessus de tout
   ========================= */

/* overlay derrière le modal */
.modal-overlay{
    z-index: 20000 !important;
}

/* fenêtre modal */
.modal{
    z-index: 20001 !important;
}
/* =========================
   Footer mobile : uniquement la ligne ©
   ========================= */
@media (max-width: 600px){

    /* cache tout le contenu du footer (les 2 colonnes) */
    .page-footer > .container{
        display: none !important;
    }

    /* garde la barre copyright, et la rend plus compacte */
    .footer-copyright{
        padding: 10px 0 !important;
        font-size: 0.85rem !important;
        text-align: center !important;
    }

    /* le texte "créé par ..." passe sous le © et centré */
    .footer-copyright .right{
        float: none !important;
        display: block !important;
        text-align: center !important;
        margin-top: 4px !important;
    }

    /* petite marge sur les côtés */
    .footer-copyright .container{
        padding: 0 12px !important;
    }
}
.footer-copyright a{
    color: #efebe9 !important;
    text-decoration: underline;
}
.footer-copyright a:hover{
    color: #d7ccc8 !important;
}
/* =========================
   Fix mobile : 1er item du sidenav caché par la navbar
   ========================= */
@media (max-width: 992px) {

    /* Le menu latéral commence sous la navbar */
    .sidenav {
        padding-top: var(--nav-h) !important; /* = 56px chez toi en mobile */
    }

    /* Optionnel : un peu d’air en plus */
    .sidenav li:first-child {
        margin-top: 6px;
    }
}
