/* ============================================
   LAYOUT.CSS — Navigation, Footer, Grille
   Mobile First
   ============================================ */

/* --- Header & Navigation --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

@media (max-width: 480px) {
    .site-header .container {
        max-width: 100%;
        padding: 0 var(--space-md);
    }
}

.site-logo {
    font-size: var(--font-size-xl);
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #EAEAEA;
    text-decoration: none;
    transition: color var(--transition-fast);
}

@media (max-width: 480px) {
    .site-logo {
        font-size: var(--font-size-lg);
        letter-spacing: 0;
    }
}

.site-logo:hover {
    color: var(--color-gold-hover);
}

.site-logo span {
    color: var(--color-gold);
}

/* Hamburger (Mobile) */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #EAEAEA;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menu Mobile (overlay) */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background-color: #0A0A0A;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    padding-top: var(--nav-height);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 999;
}

@media (max-width: 480px) {
    .site-nav {
        max-width: 100%;
    }
}

.site-nav.active {
    transform: translateX(0);
}

.site-nav a {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: #999999;
    transition: color var(--transition-fast);
    position: relative;
}

.site-nav a:hover,
.site-nav a.active {
    color: #EAEAEA;
}

.site-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-gold);
}

/* Desktop Nav (min-width: 768px) */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        position: static;
        flex-direction: row;
        background-color: transparent;
        transform: none;
        gap: var(--space-lg);
        min-height: auto;
        padding-top: 0;
        width: auto;
    }

    .site-nav a {
        font-size: var(--font-size-sm);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
}

/* --- Main Content --- */
main {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

/* --- Hero Section --- */
.hero {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-3xl) 0;
}

@media (min-width: 480px) {
    .hero__content {
        display: flex;
        flex-direction: row-reverse;
    }
}

.hero--right {
    width: 500px;
    max-width: 500px;
    margin-left: auto;
}

@media (max-width: 1048px) {
    .hero--right {
        display: none;
    }
}

@media (max-width: 767px) {
    .hero__content {
        flex-direction: column;
    }
}

.hero__subtitle {
    font-size: var(--font-size-md);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    font-weight: 400;
}

.hero__title {
    margin-bottom: var(--space-lg);
}

.hero__tagline {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    line-height: 1.6;
}

.hero__cta-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

@media (min-width: 480px) {
    .hero__cta-group {
        flex-direction: row;
    }
}

/* --- Page Header (pages intérieures) --- */
.page-header {
    padding: var(--space-3xl) 0 var(--space-xl);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-2xl);
}

.page-header__title {
    margin-bottom: var(--space-sm);
}

.page-header__desc {
    color: var(--color-text-muted);
    font-size: var(--font-size-md);
    max-width: 700px;
}

/* --- Grid Layouts --- */
.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid--2 {
    grid-template-columns: 1fr;
}

.grid--3 {
    grid-template-columns: 1fr;
}

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

    .grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* --- Chapter Navigation (Parcours) --- */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-3xl);
}

.chapter-nav__link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.chapter-nav__link:hover {
    color: var(--color-text);
}

.chapter-nav__link--next {
    margin-left: auto;
}

/* --- Footer --- */
.site-footer {
    background-color: #0A0A0A;
    border-top: 1px solid #2A2A2A;
    padding: var(--space-2xl) 0;
    text-align: center;
    color: #999999;
    font-size: var(--font-size-sm);
}

.site-footer__links {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-md);
}

.site-footer__links a {
    color: #999999;
}

.site-footer__links a:hover {
    color: #EAEAEA;
}

.site-footer p {
    color: #999999;
}

.site-footer__note {
    font-size: var(--font-size-xs);
    color: #999999;
    opacity: 0.6;
}

/* --- Breadcrumb (Parcours) --- */
/* Style the list */
.breadcrumb ol {
    padding: 10px 16px;
    list-style: none;
    background-color: #eee;
}

/* Display list items side by side */
.breadcrumb ol li {
    display: inline;
    font-size: 18px;
}

/* Add a slash symbol (/) before/behind each list item */
.breadcrumb ol li+li:before {
    padding: 8px;
    color: black;
    content: "/\00a0";
}

/* Add a color to all links inside the list */
.breadcrumb ol li a {
    color: #0275d8;
    text-decoration: none;
}

/* Add a color on mouse-over */
.breadcrumb ol li a:hover {
    color: #01447e;
    text-decoration: underline;
}


/* --- Plan du site --- */
.sitemap {
    padding: 20px;
}

.sitemap ul {
    list-style: circle;
}

.sitemap ol {
    list-style: disc;
    margin-left: 20px;
}

.sitemap a {
    text-decoration: underline;
}

/* --- Wiki Layout (Parcours) --- */
.wiki-layout {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

.wiki-intro {
    font-size: var(--font-size-lg);
    line-height: 1.6;
    margin-bottom: var(--space-2xl);
    max-width: 800px;
}

.wiki-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

@media (min-width: 1024px) {
    .wiki-columns {
        grid-template-columns: 1fr 300px;
        gap: var(--space-3xl);
    }
}

.wiki-main-content {
    min-width: 0;
}

.wiki-main-content h2 {
    font-size: var(--font-size-xl);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--color-border);
}

.wiki-main-content h3 {
    font-size: var(--font-size-lg);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.wiki-main-content p,
.wiki-main-content li {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.wiki-main-content ul {
    list-style: circle;
    margin-left: 40px;
}

.wiki-main-content ol {
    list-style: auto;
    margin-left: 20px;
}

.wiki-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-xl));
}

.sidebar-box {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.sidebar-title {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--color-border-light);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.sidebar-row {
    font-size: var(--font-size-sm);
}

.sidebar-row strong {
    color: var(--color-text);
    display: block;
    margin-bottom: var(--space-xs);
}

.sidebar-row ul {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--color-text-muted);
}

.sidebar-row ol {
    list-style: auto;
    padding: 0;
    margin: 10px;
    color: var(--color-text-muted);
}

.sidebar-row ul li {
    padding-left: var(--space-sm);
    position: relative;
    margin-bottom: 4px;
}

.sidebar-row ul li::before {
    content: "•";
    color: var(--color-border-light);
    position: absolute;
    left: 0;
}

/* --- Chapter Layout Navigation --- */
.chapter-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--color-border);
}

.chapter-navigation a {
    font-weight: 600;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.chapter-navigation a:hover {
    color: var(--color-text);
}

.chapter-navigation .nav-next {
    margin-left: auto;
}