/* ==========================================================================
   SYECO Pages System CSS - Thème "Minimaliste Nature & Recyclage Premium"
   ========================================================================== */

:root {
    --glass-surface: #ffffff; /* Cartes blanc pur */
    --glass-surface-hover: #fafcf9;
    --glass-border: #e2e8e0; /* Liseré vert de gris délicat */
    --glass-border-strong: #355240; /* Vert forêt profond */
    --accent-metal: #355240; /* Accent vert forêt */
    --accent-metal-dark: #23372b;
    --accent-metal-light: #4c725a;
    --text-primary: #1b241e; /* Anthracite */
    --text-secondary: #526056; /* Gris forêt */
    --text-tertiary: #7c8e82; /* Sauge estompé */
    --bg-dark: #f6f8f5; /* Fond lin/sauge clair */
    --header-bg: rgba(246, 248, 245, 0.85);
    --footer-bg: rgba(246, 248, 245, 0.85);
    --btn-text-color: #ffffff;
}

[data-theme="dark"] {
    --glass-surface: #121e17; /* Vert ardoise profond */
    --glass-surface-hover: #17271e;
    --glass-border: #1c3024; /* Bordures fines vert sombre */
    --glass-border-strong: #8fc0a9;
    --accent-metal: #8fc0a9; /* Vert sauge clair lumineux */
    --accent-metal-dark: #0a110d;
    --accent-metal-light: #a9d1c1;
    --text-primary: #eef5f1; /* Blanc d'écume doux */
    --text-secondary: #adc1b4; /* Gris sauge moyen */
    --text-tertiary: #7c8e82;
    --bg-dark: #0a110d; /* Noir charbon teinté de vert forêt */
    --header-bg: rgba(10, 17, 13, 0.85);
    --footer-bg: rgba(10, 17, 13, 0.85);
    --btn-text-color: #0a110d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    background: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--bg-dark);
    z-index: -2;
}

/* --- TOP ANNOUNCEMENT BAR (BORDEREAU SIMPLE PRO ECO) --- */
.top-announcement-bar {
    background: #23372b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 24px;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    font-family: 'JetBrains Mono', monospace;
}

.announcement-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 2px;
    margin-right: 10px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.announcement-badge::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #81c784;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

.announcement-text {
    letter-spacing: 0.2px;
}

@keyframes pulse-dot {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* --- HEADER NAVIGATION --- */
.main-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 24px;
    width: 100%;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* --- THEME TOGGLE BUTTON --- */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.theme-toggle-btn:hover {
    color: var(--accent-metal);
    border-color: var(--accent-metal-light);
    background: rgba(53, 82, 64, 0.04);
}

.theme-toggle-btn svg, .theme-toggle-btn i {
    width: 16px;
    height: 16px;
}

[data-theme="dark"] .theme-icon-light { display: block; }
[data-theme="dark"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: block; }
.theme-icon-light { display: none; }
.theme-icon-dark { display: block; }

.logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.logo-icon {
    color: var(--accent-metal);
    width: 18px;
    height: 18px;
}

.logo-text {
    color: var(--text-primary);
}

/* --- MENU SUPÉRIEUR PREMIUM PILULES --- */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
}

.nav-menu a:hover {
    color: var(--accent-metal);
    background: rgba(53, 82, 64, 0.04);
}

.nav-menu a.active-nav {
    color: var(--accent-metal);
    background: rgba(53, 82, 64, 0.06);
    border-color: rgba(53, 82, 64, 0.12);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}

/* --- MOBILE NAVIGATION --- */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 78px;
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 16px 24px;
    gap: 12px;
}

.mobile-nav.show { display: flex; }

.mobile-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 4px;
    border-bottom: 1px solid rgba(53, 82, 64, 0.02);
}

.mobile-nav a:hover { color: var(--accent-metal); background: rgba(53, 82, 64, 0.04); }

/* --- CONTENT WRAPPER --- */
.content-wrapper {
    max-width: 900px;
    width: 90%;
    margin: 40px auto 60px;
    flex-grow: 1;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PAGE COMPOSITIONAL STYLES --- */
.page-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 16px;
}

.page-header h1 {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.page-meta {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-card {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 32px;
}

.article-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 24px 0 12px;
    color: var(--accent-metal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-card h2:first-of-type { margin-top: 0; }

.article-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 16px 0 8px;
    color: var(--text-primary);
}

.article-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
    font-size: 0.88rem;
}

.article-card ul, .article-card ol {
    margin-left: 20px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.88rem;
}

.article-card li {
    margin-bottom: 6px;
}

.article-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* --- FAQ ACCORDION --- */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.faq-item {
    background: rgba(53, 82, 64, 0.01);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.faq-question {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    user-select: none;
    transition: background 0.2s;
    color: var(--text-primary);
}

.faq-question:hover {
    background: rgba(53, 82, 64, 0.02);
}

.faq-question i {
    color: var(--accent-metal);
    transition: transform 0.2s;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out, padding 0.2s;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.88rem;
    border-top: 1px solid transparent;
}

.faq-item.active {
    border-color: var(--glass-border-strong);
}

.faq-item.active .faq-question {
    color: var(--accent-metal);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    padding: 14px 20px;
    max-height: 500px;
    border-top-color: var(--glass-border);
    background: rgba(53, 82, 64, 0.005);
}

/* --- TEAM GRID & CARDS --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.team-card {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 24px;
    text-align: center;
    transition: border-color 0.15s ease;
}

.team-card:hover {
    border-color: var(--accent-metal);
}

.team-avatar {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    background: rgba(53, 82, 64, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--accent-metal);
    border: 1px solid var(--glass-border);
}

.team-avatar i { width: 20px; height: 20px; }

.team-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.team-role {
    font-size: 0.65rem;
    color: var(--accent-metal);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 12px;
}

.team-bio {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- CONTACT FORM --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.form-input, .form-textarea {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.15s ease;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--accent-metal);
    background: var(--glass-surface-hover);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- BOUTON SIMPLE PRO --- */
.btn-submit {
    background: var(--accent-metal);
    color: var(--btn-text-color);
    border: 1px solid var(--accent-metal);
    padding: 12px 24px;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.btn-submit:hover {
    background: var(--accent-metal-light);
    border-color: var(--accent-metal-light);
}

/* --- TECHNICAL TABLE --- */
.tech-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--glass-surface);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.tech-table th, .tech-table td {
    padding: 12px 18px;
    text-align: left;
    font-size: 0.85rem;
}

.tech-table th {
    background: rgba(53, 82, 64, 0.03);
    color: var(--accent-metal);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
}

.tech-table td {
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.tech-table tr:last-child td { border-bottom: none; }
.tech-table tr:hover td { color: var(--text-primary); background: rgba(53, 82, 64, 0.01); }

/* --- SITEMAP LAYOUT --- */
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.sitemap-card {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 24px;
}

.sitemap-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent-metal);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.sitemap-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sitemap-card ul li {
    margin-bottom: 12px;
}

.sitemap-card ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.sitemap-card ul li a:hover {
    color: var(--accent-metal);
    transform: translateX(2px);
}

/* --- ALERTS IN DOCUMENTS --- */
.alert-box {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.alert-box.info {
    background: rgba(53, 82, 64, 0.03);
    border: 1px solid rgba(53, 82, 64, 0.1);
    color: #355240;
}
.alert-box.warning {
    background: rgba(249, 115, 22, 0.03);
    border: 1px solid rgba(249, 115, 22, 0.1);
    color: #c2410c;
}

.alert-box i {
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- FOOTER STYLING --- */
.main-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--glass-border);
    padding: 48px 24px 24px;
    margin-top: 60px;
    backdrop-filter: blur(20px);
}
.main-footer .footer-grid {
    max-width: 1200px;
    margin: 0 auto 36px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 36px;
}

.footer-col h4 {
    color: var(--accent-metal);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.78rem;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-col ul li a:hover {
    color: var(--accent-metal);
}

.main-footer .footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
}

.main-footer .footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
}

.main-footer .footer-logo i {
    color: var(--accent-metal);
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    padding: 12px 18px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(53,82,64,0.06);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show { transform: translateX(0); }
.toast.success { border-left: 3px solid var(--accent-metal); }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .menu-toggle { display: block; }
    .main-footer .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .main-footer .footer-bottom { flex-direction: column; text-align: center; }
    .page-header h1 { font-size: 1.6rem; }
    .article-card { padding: 24px; }
}

@media (max-width: 480px) {
    .main-footer .footer-grid { grid-template-columns: 1fr; }
}
