/* Page d'accueil visiteur — cartes explicatives */
.landing-guest {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1rem 1.5rem;
}

.landing-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (min-width: 600px) {
    .landing-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .landing-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .landing-guest {
        padding-right: 22%;
    }
}

.landing-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.35rem 1.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(7, 150, 95, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.landing-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(7, 150, 95, 0.12);
    color: rgb(7, 150, 95);
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
}

.landing-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: rgb(7, 150, 95);
}

.landing-card p {
    margin: 0;
    font-size: 0.92rem;
    color: #555;
    line-height: 1.5;
}

.landing-card--welcome {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(7, 150, 95, 0.08) 100%);
    border-color: rgba(7, 150, 95, 0.25);
}

.landing-card--welcome .landing-card__icon {
    margin-left: auto;
    margin-right: auto;
}

.landing-card--welcome h3 {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
}

.landing-card--welcome p {
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    max-width: 640px;
    margin: 0 auto;
    color: #444;
}

body.dark-mode .landing-card--welcome {
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.98) 0%, rgba(7, 150, 95, 0.15) 100%);
}

body.dark-mode .landing-card--welcome p {
    color: #ccc;
}

.landing-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.landing-cta a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.landing-cta__primary {
    background: rgb(7, 150, 95);
    color: #fff !important;
}

.landing-cta__primary:hover {
    background: rgb(1, 100, 68);
}

.landing-cta__secondary {
    background: #fff;
    color: rgb(7, 150, 95) !important;
    border: 2px solid rgb(7, 150, 95);
}

.landing-cta__secondary:hover {
    background: rgba(7, 150, 95, 0.08);
}

/* Publicités intercalées (petits écrans / tablette) */
.landing-ad-slot {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    padding: 0.5rem 0;
}

.landing-ad-slot iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 175px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
}

.landing-ad-slot__label {
    margin: 0.35rem 0 0;
    color: rgba(0, 0, 0, 0.35);
    font-weight: bold;
    font-size: 0.85rem;
}

.landing-ad-slot--after-cta {
    margin-bottom: 1rem;
}

@media (max-width: 1439px) {
    .landing-ad-slot {
        display: block;
    }
}

@media (min-width: 1440px) {
    .landing-ad-slot {
        display: none !important;
    }
}

body.dark-mode .landing-ad-slot__label {
    color: rgba(255, 255, 255, 0.45);
}

body.dark-mode .landing-ad-slot iframe {
    background: rgba(0, 0, 0, 0.2);
}

body.dark-mode .landing-card {
    background: rgba(45, 45, 45, 0.95);
    border-color: rgba(7, 150, 95, 0.3);
}

body.dark-mode .landing-card p {
    color: #bbb;
}

body.dark-mode .landing-cta__secondary {
    background: #333;
}

/* ===== Layout index — header & footer ===== */
:root {
    --site-header-height: 64px;
}

body.index-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body.index-page .main {
    flex: 1;
    width: 100%;
    padding-top: 0.5rem;
}

body.index-page footer,
body.index-page .site-footer {
    position: static;
    margin-top: auto;
    width: 100%;
    left: auto;
    bottom: auto;
    text-align: center;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 300;
    background: rgb(7, 150, 95);
    color: #fff;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}

.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    min-height: var(--site-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #fff;
    min-width: 0;
}

.site-header__logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.45);
}

.site-header__logo--user {
    width: 40px;
    height: 40px;
}

.site-header__title {
    font-weight: 700;
    font-size: clamp(1rem, 3vw, 1.2rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-header__nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}

.site-header__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.2s;
    white-space: nowrap;
}

.site-header__link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.site-header__link--accent {
    background: #fff;
    color: rgb(7, 150, 95) !important;
}

.site-header__link--accent:hover {
    background: #f0faf6;
}

.site-header__theme .dark-mode-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    cursor: pointer;
    color: #fff;
}

.site-header__theme .dark-mode-toggle span {
    color: #fff;
}

.site-header__burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
}

.site-header__burger:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Footer */
.site-footer {
    background: rgb(7, 150, 95);
    color: #fff;
    padding: 1.5rem 1rem;
    font-size: 0.88rem;
    width: 100%;
    box-sizing: border-box;
}

.site-footer__inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.65rem;
}

.site-footer__copy {
    margin: 0;
    font-weight: 600;
    line-height: 1.6;
    max-width: 100%;
}

.site-footer__rights {
    margin: 0;
    font-size: 0.82rem;
    opacity: 0.9;
    line-height: 1.4;
}

.site-footer__copy a {
    color: #fff;
    text-decoration: underline;
}

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0;
    margin-top: 0.35rem;
    width: 100%;
    max-width: 520px;
}

.site-footer__nav a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    line-height: 1.4;
    transition: opacity 0.2s;
}

.site-footer__nav a:not(:last-child)::after {
    content: "·";
    margin-left: 0.5rem;
    opacity: 0.65;
    pointer-events: none;
}

.site-footer__nav a:hover {
    opacity: 0.85;
    text-decoration: underline;
    color: #fff;
}

/* Ajustements menu admin avec nouveau header */
body.index-page .burger-menu:not(.site-header__burger) {
    top: calc(var(--site-header-height) + 10px);
}

body.index-page .nav_admin {
    top: calc(var(--site-header-height) + 10px);
}

@media (max-width: 600px) {
    body.index-page .nav_admin {
        top: var(--site-header-height);
        right: 0;
        left: auto;
        max-height: calc(100dvh - var(--site-header-height));
        overflow-y: auto;
    }

    .site-header__link-label {
        display: none;
    }

    .site-header__link--icon {
        padding: 0.45rem 0.6rem;
    }

    .site-header__link--accent {
        font-size: 0.82rem;
        padding: 0.4rem 0.65rem;
    }

    .site-header__burger {
        display: inline-flex;
    }
}

@media (min-width: 601px) {
    body.index-page .site-header__burger {
        display: none;
    }

    body.index-page .burger-menu.site-header__burger {
        display: none;
    }
}

@media (max-width: 480px) {
    .site-footer__nav {
        flex-direction: column;
        gap: 0.35rem;
    }

    .site-footer__nav a:not(:last-child)::after {
        content: none;
    }
}

body.dark-mode .site-header {
    background: rgb(5, 120, 78);
}

body.dark-mode .site-footer {
    background: rgb(5, 120, 78);
}

