/* Composants réutilisables — Navbar, Footer, Cards, Boutons, Tables, Breadcrumb */

/* ------------------------------------------------
   Base
   ------------------------------------------------ */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--brand-anthracite);
    margin: 0;
    line-height: 1.6;
}

::selection {
    background: rgba(102, 178, 178, 0.3);
    color: #fff;
}

a       { color: var(--brand-teal); text-decoration: none; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--brand-anthracite);
    line-height: 1.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ------------------------------------------------
   Navbar
   ------------------------------------------------ */
.site-navbar {
    background: var(--brand-dark);
    border-bottom: 3px solid var(--brand-gold);
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-height);
}

.site-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.site-navbar-brand:hover { color: #fff; }

.site-navbar-brand .brand-suffix {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.site-navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-navbar-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.site-navbar-nav a:hover,
.site-navbar-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Dropdown menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-dropdown-toggle::after {
    content: '';
    border: solid rgba(255, 255, 255, 0.6);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 2.5px;
    transform: rotate(45deg);
    margin-top: -2px;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 76, 76, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    min-width: 280px;
    padding: 0.5rem 0;
    padding-top: 1rem;
    margin-top: 0.5rem;
    z-index: 1001;
}

/* Pont invisible entre le toggle et le menu pour maintenir le hover */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-category {
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s;
    border-radius: 0;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-card-alt);
    color: var(--brand-dark);
}

.nav-dropdown-menu a i {
    color: var(--brand-teal);
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

/* Mobile toggle */
.navbar-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.navbar-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* ------------------------------------------------
   Footer
   ------------------------------------------------ */
.site-footer {
    background: var(--brand-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.site-footer h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.site-footer .footer-brand-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    max-width: 320px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer ul li {
    margin-bottom: 0.5rem;
}

.site-footer ul a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer ul a:hover {
    color: var(--brand-gold);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    transition: all 0.2s;
}

.footer-social a:hover {
    background: var(--brand-teal);
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
}

.footer-bottom a {
    color: var(--brand-teal);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--brand-gold);
}

/* ------------------------------------------------
   Cards
   ------------------------------------------------ */
.site-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 76, 76, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 76, 76, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
}

.site-card-static {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 76, 76, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
}

.site-card-accent-teal {
    border-top: 3px solid var(--brand-teal);
}

.site-card-accent-gold {
    border-left: 3px solid var(--brand-gold);
}

/* ------------------------------------------------
   Boutons
   ------------------------------------------------ */
.site-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.4;
}

.site-btn-primary {
    background: var(--brand-dark);
    color: #fff;
    border-color: var(--brand-dark);
}

.site-btn-primary:hover {
    background: #006666;
    border-color: #006666;
    color: #fff;
}

.site-btn-outline {
    background: transparent;
    color: var(--brand-dark);
    border-color: var(--brand-teal);
}

.site-btn-outline:hover {
    background: var(--brand-teal-light);
    color: var(--brand-dark);
}

.site-btn-gold {
    background: var(--brand-gold);
    color: var(--brand-dark);
    border-color: var(--brand-gold);
}

.site-btn-gold:hover {
    background: #e9a020;
    border-color: #e9a020;
    color: var(--brand-dark);
}

.site-btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

.site-btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
}

/* ------------------------------------------------
   Breadcrumb
   ------------------------------------------------ */
.site-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    list-style: none;
    margin: 0;
    flex-wrap: wrap;
}

.site-breadcrumb a {
    color: var(--brand-teal);
    text-decoration: none;
}

.site-breadcrumb a:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}

.site-breadcrumb li + li::before {
    content: '/';
    margin-right: 0.5rem;
    color: var(--text-muted);
}

/* ------------------------------------------------
   Badges
   ------------------------------------------------ */
.site-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.site-badge-teal {
    background: var(--brand-teal-light);
    color: var(--brand-dark);
}

.site-badge-gold {
    background: var(--brand-gold-light);
    color: #92690d;
}

.site-badge-good {
    background: rgba(34, 197, 94, 0.12);
    color: var(--color-good);
}

.site-badge-warn {
    background: rgba(249, 115, 22, 0.12);
    color: var(--color-warn);
}

.site-badge-bad {
    background: rgba(239, 68, 68, 0.12);
    color: var(--color-bad);
}

/* ------------------------------------------------
   Tables
   ------------------------------------------------ */
.site-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.site-table thead tr {
    background: var(--bg-card-alt);
}

.site-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.site-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.site-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.site-table tbody tr:hover {
    background: var(--bg-card-alt);
}

/* ------------------------------------------------
   Forms
   ------------------------------------------------ */
.site-form-group {
    margin-bottom: 1.25rem;
}

.site-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.site-form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.site-form-control:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(102, 178, 178, 0.25);
}

.site-form-control::placeholder {
    color: var(--text-muted);
}

textarea.site-form-control {
    resize: vertical;
    min-height: 120px;
}

select.site-form-control {
    appearance: auto;
}

.site-form-error {
    font-size: 0.8rem;
    color: var(--color-bad);
    margin-top: 0.25rem;
}

/* ------------------------------------------------
   Section spacing
   ------------------------------------------------ */
.site-section {
    padding: var(--section-padding);
}

.hero-compact + .site-section {
    padding-top: 1.5rem;
}

.site-section-alt {
    background: var(--bg-card);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ------------------------------------------------
   Grid helpers
   ------------------------------------------------ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* ------------------------------------------------
   Icon circles
   ------------------------------------------------ */
.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.icon-circle-teal {
    background: var(--brand-teal-light);
    color: var(--brand-dark);
}

.icon-circle-gold {
    background: var(--brand-gold-light);
    color: #92690d;
}

/* ------------------------------------------------
   Body offset for fixed navbar
   ------------------------------------------------ */
body {
    padding-top: var(--navbar-height);
}
