/*
    La NIRDvolution - Plateforme d'entraide et de sobriété numérique.
    Copyright (C) 2025 ESIROI

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/
:root {
    --primary-color: #007BFF;
    --primary-light: #E6F3FF;
    --text-color: #333;
    --light-gray: #f4f7f9;
    --border-color: #e0e0e0;
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    --input-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --nc-bg-1: #0f0f0f;
    --nc-bg-2: rgba(26, 26, 26, 0.6);
    --nc-bg-3: #2a2a2a;
    --nc-txt-1: #ffffff;
    --nc-txt-2: #d2d2d2;
    --nc-shadow-1: 0 4px 18px rgba(0, 0, 0, 0.35);
    --nc-shadow-2: 0 0 40px 8px rgba(255, 255, 255, 0.4);
    --accent-color: #ff6b6b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, sans-serif;
}

body {
    background: var(--nc-bg-1);
    color: var(--nc-txt-1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

header {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    position: relative;
}

header img {
    position: relative;
    width: 130px;
    left: auto;
    top: auto;
    transform: none;
}

header h1 {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
}

.typing-container {
    display: flex;
    justify-content: center;
    margin-top: 5vh;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    border-right: 4px solid #ffffff;
    width: fit-content;
    animation: blink 1.3s step-end infinite;
}

.typing-text {
    display: inline-block;
    animation: typing 6s steps(33, end) infinite alternate;
}

.highlight {
    color: var(--accent-color);
}

@keyframes typing {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes blink {
    0%, 50%, 100% { border-color: #ffffff; }
    25%, 75% { border-color: transparent; }
}

.content-wrapper {
    width: 100%;
    padding: 20px;
    text-align: center;
}

.faq-title {
    font-size: 2.2em;
    font-weight: 600;
    color: var(--nc-txt-1);
    margin-bottom: 15px;
    text-align: center;
}

.search-header-central {
    margin: auto;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-and-faq-container {
    position: relative;
    width: 100%;
    z-index: 10;
    margin-bottom: 2rem;
}

.search-container {
    width: 100%;
    display: flex;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}


.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 1em;
    outline: none;
}

.search-button {
    flex: 0 0 auto;
    background-color: white;
    color: var(--primary-color);
    border: none;
    padding: 0 15px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.search-button:hover {
    background-color: var(--primary-light);
}

.faq-dropdown-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 0 0 12px 12px;
    padding: 15px 0;
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out;
    text-align: left;
    border-top: 1px solid var(--border-color);
}

.faq-dropdown-container.is-active {
    max-height: 400px;
    opacity: 1;
    pointer-events: auto;
    padding: 25px;
}

.faq-dropdown-container h3 {
    color: var(--text-color);
    font-size: 1em;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}

.faq-link {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 5px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1em;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s;
    font-weight: 400;
}

.faq-link:hover {
    background-color: var(--primary-light);
}

.faq-answer {
    display: none;
}

.page-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 0 1rem;
    flex: 1;
    margin-top: 0;
}

.cards-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.cards-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.cards {
    background: var(--nc-bg-2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2rem 1.5rem;
    text-align: center;
    flex: 1 1 280px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--nc-shadow-1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.cards:hover {
    transform: scale(1.12);
    box-shadow: var(--nc-shadow-2);
}

.cards img {
    width: 140px;
    height: auto;
    margin-bottom: 1rem;
    object-fit: contain;
    filter: invert(1) brightness(1.1) contrast(1.1);
}

.cards h2 {
    margin-top: 0.8rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.info-panels {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    margin-top: 6rem;
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(255, 107, 107, 0.02) 100%);
    border-radius: 20px;
}

.info-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--nc-txt-1);
    text-align: center;
    margin-bottom: 3.5rem;
    letter-spacing: -0.5px;
}

.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    width: 100%;
    margin: 0 auto;
}

.info-panel {
    background: var(--nc-bg-2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 107, 107, 0.2);
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 280px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.info-panel:hover {
    transform: translateY(-12px);
    border-color: rgba(255, 107, 107, 0.5);
}

.info-panel h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.2rem;
    letter-spacing: -0.3px;
}

.info-panel p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--nc-txt-2);
    margin: 0;
    flex-grow: 1;
}

.info-panel a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.info-panel a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

@media (max-width: 768px) {
    header img {
        width: 100px;
    }
    .cards {
        flex: 1 1 100%;
        width: 92%;
        max-width: 420px;
    }
    .info-title {
        font-size: 1.8rem;
    }
    .panels-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .info-panel {
        min-height: auto;
        padding: 2rem 1.5rem;
    }
    .info-panels {
        margin-top: 4rem;
        padding: 2rem 1rem;
    }
}

@media (max-width: 420px) {
    .cards img {
        width: 110px;
    }
    header h1 {
        font-size: 1.8rem;
    }
    .typing-container {
        font-size: 2rem;
    }
    .faq-title {
        font-size: 1.2em;
    }
}

.btn-primary-container {
    width: 100%;
    max-width: 1200px;
    padding: 0 1rem;
    margin: 3rem auto 1rem auto;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;

}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--accent-color, #00bcd4);
    color: var(--nc-bg-1, #0f0f0f);
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--accent-color, #00bcd4);
}
/* --- Footer Licence AGPL --- */
.site-footer {
    width: 100%;
    text-align: center;
    padding: 30px 10px;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--nc-bg-1); /* Fond sombre */
    color: var(--nc-txt-2);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--accent-color); /* Utilise votre couleur d'accentuation */
    text-decoration: none;
    font-weight: 600;
}

.site-footer a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.source-link {
    display: inline-block;
    margin-top: 5px;
    opacity: 0.8;
}

