/*
    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/>.
*/

.intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--nc-txt-2);
    font-size: 1.1rem;
    font-style: italic;
}

/* Grille principale */
.mentality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 50px;
}

/* Carte de Mentalité */
.mentality-card {
    background: var(--nc-bg-2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
    cursor: pointer; /* Indique que c'est cliquable */
    position: relative;
}

.mentality-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--nc-shadow-2);
    border-color: var(--accent-color);
}

/* En-tête de la carte */
.card-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.card-header .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.card-header h2 {
    color: var(--nc-txt-1);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.card-header .subtitle {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.software-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.software-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    /* Important pour que le clic sur le lien soit prioritaire */
    position: relative;
    z-index: 2;
}

.software-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.sw-name {
    color: var(--nc-txt-1);
    font-weight: 700;
    font-size: 1.1rem;
}

.sw-alt {
    color: var(--nc-txt-2);
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.8;
}

/* --- Styles des Modales (Overlay) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    padding: 20px;
}

.modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Contenu de la Modale */
.modal-content {
    background: var(--nc-bg-3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.is-visible .modal-content {
    transform: scale(1);
}

/* Bouton Fermer */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--nc-txt-2);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--accent-color);
}

/* Header Modale */
.modal-header h2 {
    color: var(--accent-color);
    margin-bottom: 5px;
}

.modal-header p {
    color: var(--nc-txt-2);
    font-size: 0.95rem;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

/* Liste Modale */
.modal-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.modal-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-left: 3px solid var(--accent-color);
}

.modal-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: white;
    padding: 5px;
    border-radius: 8px;
}

.modal-item-text h3 {
    color: var(--nc-txt-1);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.modal-item-text p {
    color: var(--nc-txt-2);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .mentality-grid {
        grid-template-columns: 1fr;
    }
}
.home-button-container {
    width: 100%;
    max-width: 1200px;
    padding: 0 1rem 2rem 1rem;
    text-align: center;
    margin: 0 auto;
}

.home-button {
    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;
}

.home-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--accent-color, #00bcd4);
}

.home-button svg {
    width: 20px;
    height: 20px;
    stroke: var(--nc-bg-1, #0f0f0f);
    fill: none;
    stroke-width: 2;
}
/* --- 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;
}
