/* =============================================================
   STYLE.CSS — Les Ruches / Vision du Futur
   Fichier CSS consolidé — généré depuis l'audit du 15/03/2026
   
   SOMMAIRE
   ─────────────────────────────────────────────────────────────
   1.  Variables CSS (thème clair + thème sombre)
   2.  Reset & Base
   3.  Conteneur commun
   4.  Boutons partagés
   5.  Cartes partagées
   6.  Tags partagés
   7.  Champs de saisie
   8.  Alertes
   9.  Bouton Dark Mode (fixe)
   10. Liens de formulaire (footer-links)
   11. Navigation — menu.php
   12. Footer — footer.php
   13. PAGE : index.php (Hero, Grille, Recherche, PWA)
   14. PAGE : propositions.php (Liste paginée, Filtres)
   15. PAGES : ajouter.php / modifier.php (Formulaires)
   16. PAGE : detail.php (Proposition, Commentaires, Vote)
   17. PAGES : login.php / register.php (Authentification)
   18. PAGE : profil.php
   19. PAGE : edit_profile.php
   20. PAGE : admin_propositions.php (Modération)
   21. PAGE : admin_users.php (Gestion utilisateurs)
   22. PAGE : admin_messages.php (Messagerie admin)
   23. PAGE : admin_tags.php (Gestion tags)
   24. PAGE : admin_vitrine.php (Config vitrine)
   25. PAGE : contact.php
   ============================================================= */


/* ─────────────────────────────────────────────────────────────
   1. VARIABLES CSS
   ───────────────────────────────────────────────────────────── */
:root {
    /* Thème clair (par défaut) */
    --bg-color:             #ffffff;
    --text-main:            #0f172a;
    --text-secondary:       #64748b;
    --card-bg:              #ffffff;
    --card-border:          #e2e8f0;
    --card-shadow:          rgba(0, 0, 0, 0.05);
    --btn-bg:               #0f172a;
    --btn-text:             #ffffff;
    --btn-hover:            #334155;
    --input-bg:             #f8fafc;
    --input-border:         #cbd5e1;
    --link-color:           #2563eb;
    --accent-green:         #16a34a;
    --tag-bg:               #e2e8f0;
    --tag-text:             #475569;
    --alert-error-bg:       #fee2e2;
    --alert-error-text:     #b91c1c;
    --alert-success-bg:     #dcfce7;
    --alert-success-text:   #166534;
    --info-bg:              #e0f2fe;
    --info-text:            #0369a1;
    --badge-bg:             #f1f5f9;
    --badge-text:           #475569;
}

/* Thème sombre */
body.dark-mode {
    --bg-color:             #0f172a;
    --text-main:            #f1f5f9;
    --text-secondary:       #94a3b8;
    --card-bg:              #1e293b;
    --card-border:          #334155;
    --card-shadow:          rgba(0, 0, 0, 0.3);
    --btn-bg:               #f8fafc;
    --btn-text:             #0f172a;
    --btn-hover:            #e2e8f0;
    --input-bg:             #1e293b;
    --input-border:         #475569;
    --link-color:           #60a5fa;
    --accent-green:         #4ade80;
    --tag-bg:               #334155;
    --tag-text:             #cbd5e1;
    --alert-error-bg:       #7f1d1d;
    --alert-error-text:     #fecaca;
    --alert-success-bg:     #064e3b;
    --alert-success-text:   #ecfccb;
    --info-bg:              #0c4a6e;
    --info-text:            #bae6fd;
    --badge-bg:             #334155;
    --badge-text:           #e2e8f0;
}


/* ─────────────────────────────────────────────────────────────
   2. RESET & BASE
   ─────────────────────────────────────────────────────────────
   Sources : index.php L.94, propositions.php L.104
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}


/* ─────────────────────────────────────────────────────────────
   3. CONTENEUR COMMUN
   ─────────────────────────────────────────────────────────────
   Sources : index.php L.145, propositions.php L.151,
             ajouter.php L.219, detail.php L.302, profil.php L.119
   ───────────────────────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ─────────────────────────────────────────────────────────────
   4. BOUTONS PARTAGÉS
   ─────────────────────────────────────────────────────────────
   Sources : index.php L.189–201, propositions.php L.242–243
   ───────────────────────────────────────────────────────────── */
.btn-main {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.6rem;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    font-size: 0.95rem;
    line-height: normal;
}
.btn-main:hover {
    background: var(--btn-hover);
    transform: translateY(-2px);
}

/* Bouton générique .btn (propositions.php L.242) */
.btn {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: bold;
}
.btn:hover {
    background: var(--btn-hover);
}


/* ─────────────────────────────────────────────────────────────
   5. CARTES PARTAGÉES
   ─────────────────────────────────────────────────────────────
   Sources : index.php L.205–216, propositions.php L.160–170,
             register.php L.114–122, edit_profile.php L.115–121
   ───────────────────────────────────────────────────────────── */
.card {
    position: relative;
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 6px -1px var(--card-shadow);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px var(--card-shadow);
}

/* Overlay de lien sur les cartes (index.php L.238, propositions.php L.185) */
.card-link-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10;
    cursor: pointer;
}

/* Vignette en haut de carte (index.php L.220–228, propositions.php L.174–182) */
.card-thumbnail {
    width: calc(100% + 3rem);
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    height: 180px;
    object-fit: cover;
    border-radius: 0.75rem 0.75rem 0 0;
    background: var(--input-bg);
    border-bottom: 1px solid var(--card-border);
}

/* Corps de carte (index.php L.233–235) */
.card h2          { margin: 0 0 0.5rem; font-size: 1.3rem; color: var(--text-main); }
.card-meta        { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; }
.card-body        { color: var(--text-secondary); line-height: 1.5; flex-grow: 1; margin-bottom: 1rem; overflow: hidden; }
.card-footer      { border-top: 1px solid var(--card-border); padding-top: 0.75rem;
                    display: flex; justify-content: space-between; align-items: center;
                    font-weight: bold; font-size: 0.9rem; }


/* ─────────────────────────────────────────────────────────────
   6. TAGS PARTAGÉS
   ─────────────────────────────────────────────────────────────
   Sources : index.php L.241–245, propositions.php L.194–198,
             ajouter.php L.248–276, modifier.php L.271–274
   ───────────────────────────────────────────────────────────── */
.card-tags {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.mini-tag {
    background: var(--tag-bg);
    color: var(--tag-text);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Grille de checkboxes de tags (ajouter.php L.248–276, propositions.php L.245–254) */
.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.tag-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: 0.2s;
    user-select: none;
    font-weight: normal;
    margin: 0;
}
.tag-checkbox:hover {
    border-color: var(--link-color);
}
.tag-checkbox input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
    width: auto;
}


/* ─────────────────────────────────────────────────────────────
   7. CHAMPS DE SAISIE
   ─────────────────────────────────────────────────────────────
   Sources : login.php L.98–104, register.php L.127–134,
             ajouter.php L.234–245, contact.php L.103–111,
             detail.php L.388
   ───────────────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea {
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--input-border);
    border-radius: 0.5rem;
    font-family: inherit;
}

/* Taille complète dans les formulaires */
.form-card input[type="text"],
.form-card input[type="file"],
.form-card textarea,
.login-card input,
.card input[type="text"],
.card input[type="email"],
.card input[type="password"],
.card textarea {
    width: 100%;
    padding: 0.8rem;
    box-sizing: border-box;
}

/* Espacement vertical entre les champs du formulaire de connexion */
.login-card input {
    margin-bottom: 0.75rem;
}


/* ─────────────────────────────────────────────────────────────
   8. ALERTES
   ─────────────────────────────────────────────────────────────
   Sources : login.php L.115–121, register.php L.145–147,
             ajouter.php L.285–299, modifier.php L.288–290,
             contact.php L.122–124
   ───────────────────────────────────────────────────────────── */
.alert {
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    border-left: 4px solid;
}
.alert-error,
.error {
    background: var(--alert-error-bg);
    color: var(--alert-error-text);
    border-color: #ef4444;
}
.alert-success,
.success {
    background: var(--alert-success-bg);
    color: var(--alert-success-text);
    border-color: #22c55e;
}
.alert-info {
    background: var(--info-bg);
    color: var(--info-text);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
}


/* ─────────────────────────────────────────────────────────────
   9. BOUTON DARK MODE (FIXE BAS-DROITE)
   ─────────────────────────────────────────────────────────────
   Sources : index.php L.247–256, login.php L.127–136,
             register.php L.153–162, propositions.php L.256–265,
             ajouter.php L.302–311, modifier.php L.292–293,
             detail.php L.391–392, edit_profile.php L.151–160,
             admin_propositions.php L.208, admin_messages.php L.81–88,
             contact.php L.126–135
   ───────────────────────────────────────────────────────────── */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--btn-bg);
    color: var(--btn-text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: none;
    z-index: 9999;
    font-size: 1.5rem;
    transition: transform 0.2s;
}
.theme-toggle:hover {
    transform: scale(1.1);
}


/* ─────────────────────────────────────────────────────────────
   10. LIENS DE PIED DE FORMULAIRE
   ─────────────────────────────────────────────────────────────
   Sources : login.php L.123–124, register.php L.149–150
   ───────────────────────────────────────────────────────────── */
.footer-links {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}
.footer-links a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: bold;
}


/* =============================================================
   11. NAVIGATION — menu.php
   ─────────────────────────────────────────────────────────────
   Source : menu.php L.4–91
   ============================================================= */
.site-nav {
    background: var(--btn-bg, #0f172a);
    color: var(--btn-text, white);
    padding: 1rem 0;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.nav-logo {
    color: inherit;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-logo img {
    height: 40px;
    width: auto;
    transition: filter 0.3s ease;
}
body.dark-mode .nav-logo img {
    filter: invert(1);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.nav-links a {
    color: inherit;
    opacity: 0.8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}
.nav-links a:hover {
    opacity: 1;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--btn-bg, #0f172a);
        padding: 1rem;
        gap: 1.2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links span {
        margin-left: 0 !important;
        display: block;
        padding: 5px 0;
    }
}


/* =============================================================
   12. FOOTER — footer.php
   ─────────────────────────────────────────────────────────────
   Source : footer.php L.2–20
   ============================================================= */
.site-footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
    margin-top: 4rem;
    background: var(--card-bg);
}
.site-footer a {
    color: var(--text-main);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}
.site-footer a:hover {
    color: var(--link-color);
    text-decoration: underline;
}


/* =============================================================
   13. PAGE : index.php
   ─────────────────────────────────────────────────────────────
   Source : index.php L.147–289
   ============================================================= */

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0;
}
.hero-text h1 {
    font-size: 3rem;
    margin: 0 0 1rem;
    color: var(--text-main);
    line-height: 1.1;
}
.hero-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.proposal-counter {
    display: inline-block;
    background: var(--tag-bg);
    color: var(--accent-green);
    padding: 0.75rem 1.5rem;
    border-radius: 0.6rem;
    font-weight: 700;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: normal;
}
.hero-img {
    width: 100%;
    display: flex;
    justify-content: center;
}
.hero-img img {
    width: 100%;
    max-width: 340px;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    display: block;
}

/* Zone de recherche (accueil) */
.search-area {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px var(--card-shadow);
    margin: -2rem 0 3rem;
    position: relative;
    z-index: 10;
    border: 1px solid var(--card-border);
}
.search-area form {
    display: flex;
    gap: 10px;
}
.search-area input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--input-border);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--text-main);
}

/* Grille de cartes (accueil) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Bouton PWA d'installation */
#pwa-install-btn {
    display: none;
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 25px;
    background: var(--link-color);
    color: #ffffff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Responsive accueil */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-img {
        order: -1;
        margin-bottom: 20px;
    }
    .hero-img img {
        max-width: 200px;
        margin: 0 auto;
    }
    .search-area {
        padding: 1.5rem;
        width: 100%;
    }
    .search-area form {
        flex-direction: column;
        gap: 10px;
    }
    .search-area input,
    .search-area button {
        width: 100%;
        margin: 0;
    }
}


/* =============================================================
   14. PAGE : propositions.php
   ─────────────────────────────────────────────────────────────
   Source : propositions.php L.153–275
   ============================================================= */

/* En-tête de section */
.header-section {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 2rem;
}
.header-section h1 { font-size: 2.5rem; margin: 0; color: var(--text-main); }
.header-section p  { color: var(--text-secondary); }

/* Grille de cartes */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.card-footer-link {
    color: var(--link-color);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}
.page-link {
    padding: 8px 16px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    text-decoration: none;
    color: var(--text-main);
    border-radius: 6px;
    transition: 0.2s;
}
.page-link.active {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-bg);
}
.page-link:hover:not(.active) {
    background: var(--input-bg);
}

/* Zone de recherche et filtres */
.search-wrapper {
    margin-bottom: 2rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    box-shadow: 0 2px 4px var(--card-shadow);
}
.search-mini {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.search-mini input[type="text"] {
    flex: 2;
    min-width: 200px;
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 1rem;
}

/* Responsive filtres */
@media (max-width: 768px) {
    .search-mini {
        flex-direction: column;
        gap: 10px;
    }
    .search-mini input[type="text"],
    .search-mini .btn {
        width: 100%;
        margin: 0;
        flex: none;
    }
}


/* =============================================================
   15. PAGES : ajouter.php / modifier.php
   ─────────────────────────────────────────────────────────────
   Sources : ajouter.php L.218–311, modifier.php L.245–293
   ============================================================= */
.form-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px var(--card-shadow);
    border: 1px solid var(--card-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.btn-submit {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    width: 100%;
    transition: background 0.2s, transform 0.2s;
    margin-top: 10px;
}
.btn-submit:hover {
    background: var(--btn-hover);
    transform: translateY(-2px);
}

/* Alertes spécifiques formulaires (ajouter.php L.285–299) */
.alert-error {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #ef4444;
}

/* Fichiers existants (modifier.php L.277–279) */
.file-list {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--input-bg);
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid var(--card-border);
}
.btn-delete-file {
    background: #ef4444;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
}


/* =============================================================
   16. PAGE : detail.php
   ─────────────────────────────────────────────────────────────
   Source : detail.php L.259–399
   ============================================================= */
.proposal-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px var(--card-shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--card-border);
}

/* Vignette principale dans le détail */
.detail-thumbnail {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px var(--card-shadow);
    border: 1px solid var(--card-border);
    display: block;
    background: var(--input-bg);
}

@media (max-width: 768px) {
    .detail-thumbnail {
        max-height: 350px;
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

h1 { margin-top: 0; word-wrap: break-word; line-height: 1.2; color: var(--text-main); }

.meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tags-container {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-badge {
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

/* Contenu de la proposition */
.proposal-content {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: var(--text-main);
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.proposal-content img {
    max-width: 100%;
    height: auto !important;
    border-radius: 4px;
}

/* Embed vidéo responsive */
.video-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.video-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

/* Aperçu de lien */
.link-preview-card {
    display: flex;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    margin: 15px 0;
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--card-bg);
    max-width: 100%;
}
.link-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-color: var(--link-color);
}
.preview-img {
    width: 140px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    min-height: 100px;
    border-right: 1px solid var(--card-border);
}
.preview-content {
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    flex: 1;
}
.preview-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.3;
}
.preview-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.preview-url {
    font-size: 0.75rem;
    color: var(--link-color);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Pièces jointes */
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.attachment-item {
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: var(--card-bg);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.attachment-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    background: var(--input-bg);
}
.file-link {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--link-color);
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.3;
}

/* Boutons SSO */
.sso-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin: 20px 0 !important;
    width: 100% !important;
}

.btn-sso {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    border: 1.5px solid var(--card-border) !important;
    background: var(--card-bg) !important;
    color: var(--text-main) !important;
    width: 100% !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.btn-sso:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--card-shadow);
    filter: brightness(0.95);
}

.btn-sso img {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
}

.btn-sso.google:hover { border-color: #4285F4 !important; }
.btn-sso.discord:hover { border-color: #5865F2 !important; }

/* Suggestions (commentaires) */
.comment {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--card-border);
    scroll-margin-top: 100px;
}
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 10px;
}
.comment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-like {
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    font-weight: bold;
}
.btn-like:hover {
    border-color: var(--link-color);
}
.btn-like.liked {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}
body.dark-mode .btn-like.liked {
    background: #1e3a8a;
    color: #60a5fa;
    border-color: #1e3a8a;
}
.btn-del {
    background: #fee2e2;
    color: #b91c1c;
    border: none;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}
.btn-del:hover {
    background: #fca5a5;
}

/* Vote */
.vote-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
    flex-wrap: wrap;
}
.vote-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}
.vote-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--card-border);
    background: var(--card-bg);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.btn-up { color: #2563eb; }
.btn-up:hover { background: #eff6ff; border-color: #2563eb; transform: translateY(-3px); }
.score {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    min-width: 40px;
    text-align: center;
}

/* Partage */
.share-container { position: relative; display: inline-block; }
.btn-share {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
}
.btn-share:hover { background: var(--card-border); }
.share-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 10px;
    width: 200px;
    z-index: 100;
    margin-bottom: 10px;
}
.share-dropdown.active { display: block; }
.share-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.1s;
    font-size: 0.9rem;
}
.share-link:hover { background: var(--input-bg); }

/* Responsive detail */
@media (max-width: 500px) {
    .preview-img   { width: 90px; }
    .preview-title { font-size: 0.9rem; }
}
@media (max-width: 600px) {
    .container      { padding: 15px; }
    .proposal-card  { padding: 1.25rem; }
    h1              { font-size: 1.5rem; }
    .attachment-item { min-height: auto; }
    .vote-section   { flex-direction: column; align-items: flex-start; }
    .vote-actions   { width: 100%; justify-content: space-between; }
}


/* =============================================================
   17. PAGES : login.php / register.php
   ─────────────────────────────────────────────────────────────
   Sources : login.php L.85–136, register.php L.107–162
   ============================================================= */
.login-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--card-shadow);
    width: 100%;
    max-width: 400px;
    margin: 80px auto;
    border: 1px solid var(--card-border);
}

/* h2 dans les pages card (login, register) */
.login-card h2,
.card h2 {
    margin-top: 0;
    color: var(--text-main);
    text-align: center;
}

/* Inputs de la page login — tous types confondus */
.login-card input[type="email"],
.login-card input[type="password"],
.login-card input[type="text"] {
    display: block;
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    box-sizing: border-box;
    background: var(--input-bg);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
}

/* Bouton submit dans le formulaire de connexion */
.login-card form button[type="submit"] {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.2s;
    font-family: inherit;
}
.login-card form button[type="submit"]:hover {
    background: var(--btn-hover);
}

/* Bouton générique sans classe dans .card (register, contact, admin_tags…) */
.card button:not([class]) {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.2s;
}
.card button:not([class]):hover {
    background: var(--btn-hover);
}


/* =============================================================
   18. PAGE : profil.php
   ─────────────────────────────────────────────────────────────
   Source : profil.php L.121–245
   ============================================================= */
.profile-header {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px var(--card-shadow);
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-border);
    margin-bottom: 1rem;
}
.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--btn-bg);
    color: var(--btn-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.role-badge {
    background: var(--badge-bg);
    color: var(--badge-text);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    vertical-align: middle;
    margin-left: 8px;
}
.bio-section {
    max-width: 600px;
    margin: 15px auto;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.6;
}
.location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 5px;
    font-weight: 500;
}

.btn-edit-profile {
    margin-top: 15px;
    display: inline-block;
    text-decoration: none;
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--input-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.2s;
}
.btn-edit-profile:hover { background: var(--card-border); }

/* Boutons réseaux sociaux (profil) */
.social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}
.social-btn {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s;
    border: 1px solid var(--card-border);
}
.social-btn:hover { transform: translateY(-2px); }
.social-fb { background: #3b5998; color: white; border-color: #3b5998; }
.social-wa { background: #25D366; color: white; border-color: #25D366; }
.social-ds { background: #5865F2; color: white; border-color: #5865F2; }

/* Barre de stats */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    width: 100%;
}
.stat-item strong {
    display: block;
    font-size: 1.5rem;
    color: var(--text-main);
}
.stat-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Cartes de proposition dans le profil */
.proposal-title { color: var(--text-main); margin: 0 0 5px; font-size: 1.1rem; }
.actions a, .actions button { font-size: 0.85rem; margin-left: 10px; text-decoration: none; }
.btn-archive { color: #f59e0b; background: none; border: none; cursor: pointer; font-weight: bold; }

/* Alert succès (profil) */
.alert-success {
    background: var(--alert-success-bg);
    color: var(--alert-success-text);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: bold;
}

/* Toggle switch dark mode (profil.php L.185–238) */
.theme-switch-wrapper {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background-color: var(--btn-bg); }
input:checked + .slider:before { transform: translateX(24px); }

/* Responsive profil */
@media (max-width: 600px) {
    .stats-bar { gap: 1.5rem; }
    .proposal-card { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .actions { width: 100%; display: flex; justify-content: space-between; margin-top: 0.5rem; }
    .actions a, .actions button { margin-left: 0; }
}


/* =============================================================
   19. PAGE : edit_profile.php
   ─────────────────────────────────────────────────────────────
   Source : edit_profile.php L.113–160
   ============================================================= */
.btn-save {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1.5rem;
    width: 100%;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.2s;
}
.btn-save:hover { background: var(--btn-hover); }

.current-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid var(--card-border);
}

.social-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
}
.social-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-main);
}


/* =============================================================
   20. PAGE : admin_propositions.php
   ─────────────────────────────────────────────────────────────
   Source : admin_propositions.php L.136–209
   ============================================================= */

/* Onglets de modération */
.mod-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--card-border);
}
.mod-tab-link {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.2s;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
}
.mod-tab-link:hover  { background: var(--input-bg); color: var(--text-main); }
.mod-tab-link.active { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }

/* Barre de recherche modération */
.mod-search-bar { display: flex; gap: 10px; margin: 20px 0; }
.mod-search-bar input {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-main);
}
.mod-search-bar button {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    background: var(--btn-bg);
    color: var(--btn-text);
    font-weight: bold;
    cursor: pointer;
}

/* Cartes de modération */
.mod-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.mod-card.archived      { opacity: 0.8; background: var(--input-bg); border-left: 4px solid #ef4444; }
.mod-card.active-status { border-left: 4px solid #16a34a; }

.mod-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
}
.mod-title     { font-size: 1.2rem; font-weight: bold; margin: 0 0 5px 0; }
.mod-info      { font-size: 0.9rem; color: var(--text-secondary); }
.mod-intention { font-style: italic; color: var(--text-secondary); background: var(--input-bg); padding: 10px; border-radius: 5px; }
.mod-actions   { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; align-items: center; }

/* Boutons d'action modération */
.btn-voir     { background: var(--btn-bg); color: var(--btn-text); text-decoration: none; padding: 8px 16px; border-radius: 4px; font-weight: bold; font-size: 0.9rem; border: none; cursor: pointer; }
.btn-valider  { background: #16a34a; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 0.9rem; transition: 0.2s; }
.btn-valider:hover  { background: #15803d; }
.btn-archiver { background: #ef4444; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 0.9rem; transition: 0.2s; }
.btn-archiver:hover { background: #dc2626; }
.btn-modifier { background: #f59e0b; color: white; text-decoration: none; padding: 8px 16px; border-radius: 4px; font-weight: bold; font-size: 0.9rem; border: none; cursor: pointer; transition: 0.2s; }
.btn-modifier:hover { background: #d97706; }

/* Tableau historique */
.history-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--card-shadow);
}
.history-table th,
.history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
}
.history-table th {
    background: var(--input-bg);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}


/* =============================================================
   21. PAGE : admin_users.php
   ─────────────────────────────────────────────────────────────
   Source : admin_users.php L.62–86
   Note   : page sans dark mode à l'origine — intégrée aux vars
   ============================================================= */
.admin-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px var(--card-shadow);
    overflow-x: auto;
}
.admin-card table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}
.admin-card th,
.admin-card td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--card-border);
}
.admin-card th {
    background: var(--input-bg);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Badges de rôle (admin_users) */
.role-badge        { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; display: inline-block; }
.role-admin        { background: #fef3c7; color: #92400e; }
.role-moderateur   { background: #e0e7ff; color: #1e40af; }
.role-user         { background: var(--input-bg); color: var(--text-secondary); }

/* Boutons d'action (admin_users) */
.btn-action        { padding: 6px 12px; border-radius: 4px; border: 1px solid var(--input-border); background: var(--card-bg); cursor: pointer; font-size: 0.8rem; transition: background 0.2s; }
.btn-action:hover  { background: var(--input-bg); }
.btn-delete        { color: #ef4444; border-color: #fca5a5; }
.btn-delete:hover  { background: #fef2f2; }
.role-select       { padding: 5px; border-radius: 4px; border: 1px solid var(--input-border); font-size: 0.85rem; background: var(--input-bg); color: var(--text-main); }


/* =============================================================
   22. PAGE : admin_messages.php
   ─────────────────────────────────────────────────────────────
   Source : admin_messages.php L.65–89
   ============================================================= */
.msg-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px var(--card-shadow);
}
.msg-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.msg-info { font-size: 0.9rem; color: var(--text-secondary); }
.msg-body { line-height: 1.6; white-space: pre-wrap; }
.btn-del  { background: #ef4444; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.btn-del:hover { background: #b91c1c; }



/* =============================================================
   23. PAGE : admin_tags.php
   ─────────────────────────────────────────────────────────────
   Source : admin_tags.php
   ============================================================= */

/* En-tête avec compteur */
.admin-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.admin-header h1 { margin: 0; }
.admin-badge {
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Formulaire d'ajout */
.tag-add-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.tag-add-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--input-border);
    border-radius: 0.5rem;
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 1rem;
}

/* Table des tags */
.tags-table {
    width: 100%;
    border-collapse: collapse;
}
.tags-table thead tr {
    background: var(--input-bg);
}
.tags-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--card-border);
}
.tags-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}
.tags-table tbody tr:hover {
    background: var(--input-bg);
}
.tags-table tbody tr:last-child td {
    border-bottom: none;
}
.tag-num {
    color: var(--text-secondary);
    font-size: 0.85rem;
    width: 40px;
}
.tag-edit-form {
    display: contents; /* Les éléments du form participent au layout de la table */
}
.tag-edit-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 0.9rem;
}
.tag-edit-input:focus {
    outline: none;
    border-color: var(--link-color);
    background: var(--card-bg);
}




/* =============================================================
   24. PAGE : admin_vitrine.php
   ─────────────────────────────────────────────────────────────
   Source : admin_vitrine.php L.63–73
   Note   : page sans dark mode à l'origine — intégrée aux vars
   ============================================================= */
.preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-top: 10px;
    border: 1px solid var(--card-border);
}


/* =============================================================
   25. PAGE : contact.php
   ─────────────────────────────────────────────────────────────
   Source : contact.php L.88–135
   ============================================================= */
p.intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ─────────────────────────────────────────────────────────────
   26. DISCORD PROFILE CARD (.discord-card)
   ───────────────────────────────────────────────────────────── */
.discord-card {
    background: #232428;
    color: #f2f3f5;
    border-radius: 12px;
    width: 320px;
    overflow: hidden;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 1.5rem auto; /* Centered in profile-header */
    user-select: none;
    border: 1px solid rgba(255,255,255,0.05);
    text-align: left;
    display: block; /* Ensure it's not inline */
}

.discord-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.discord-card-banner {
    height: 70px;
    background-color: #5865f2; /* Default Discord Blurple */
}

.discord-card-content {
    padding: 16px;
    position: relative;
    padding-top: 45px;
}

.discord-card-avatar-wrapper {
    position: absolute;
    top: -50px;
    left: 16px;
    width: 90px;
    height: 90px;
    background: #232428;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
}

.discord-card-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #313338;
}

.discord-card-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.discord-status-indicator {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: #23a559; /* Online Green */
    border: 4px solid #232428;
    border-radius: 50%;
}

.discord-card-info {
    margin-top: 5px;
}

.discord-card-username {
    font-size: 22px;
    font-weight: 700;
    line-height: 28px;
    color: #ffffff;
}

/* --- DETAILS PAGE --- */
.pwa-details-content {
    padding: 60px 20px 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* No vertical scroll */
    background: #fff;
}

.pwa-details-header {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.pwa-rich-content {
    flex: 1;
    overflow: hidden; /* Absolute no-scroll */
    font-size: 1.05rem;
    line-height: 1.6;
    color: #333;
}

.discord-card-subtext {
    font-size: 13px;
    color: #b5bac1;
    margin-top: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

body.dark-mode .discord-card {
    border-color: rgba(255,255,255,0.1);
}

/* ─────────────────────────────────────────────────────────────
   27. CONTEXTUAL OVERRIDES
   ───────────────────────────────────────────────────────────── */
body.home-page .theme-toggle {
    display: none !important;
}

/* ─────────────────────────────────────────────────────────────
   28. TOGGLE SWITCH (.switch)
   ───────────────────────────────────────────────────────────── */
.theme-switch-wrapper {
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius: 50px;
    border: 1px solid var(--card-border);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input { 
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
  z-index: 2;
}

.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
  z-index: 1;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #5865f2; /* Accordance with Discord theme */
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* --- PWA MOBILE LAYOUT (TikTok Style) --- */
@media (max-width: 768px) {
    /* Hide desktop container */
    .container {
        display: none !important;
    }
    
    /* Disable body scroll to let the PWA container handle it */
    body, html {
        margin: 0;
        padding: 0;
        height: 100%;
        overflow: hidden;
    }

    .pwa-mobile-container {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        background-color: #000;
        z-index: 9999;
    }

    .pwa-card {
        width: 100%;
        height: 100vh;
        scroll-snap-align: start;
        position: relative;
        overflow: hidden;
    }

    .pwa-card-pages {
        display: flex;
        width: 100%;
        height: 100%;
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .pwa-card-pages::-webkit-scrollbar {
        display: none;
    }

    .pwa-page {
        flex: 0 0 100%;
        width: 100%;
        height: 100%;
        scroll-snap-align: start;
        position: relative;
    }

    /* --- HERO PAGE --- */
    .hero-page {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        color: #fff;
    }

    .pwa-hero-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        z-index: 1;
    }

    .pwa-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
        z-index: 2;
    }

    .pwa-info {
        position: relative;
        z-index: 10;
        padding: 20px;
        padding-right: 80px; /* Space for action buttons */
        padding-bottom: 60px;
    }

    .pwa-info h2 {
        font-size: 1.4rem;
        margin-bottom: 8px;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
        color: #fff;
    }

    .pwa-intention {
        font-size: 0.9rem;
        opacity: 0.9;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 15px;
        line-height: 1.4;
        color: #fff;
    }

    .pwa-counts {
        display: flex;
        gap: 15px;
        font-weight: bold;
    }

    .pwa-count-item {
        background: rgba(255,255,255,0.15);
        padding: 4px 12px;
        border-radius: 20px;
        backdrop-filter: blur(5px);
        font-size: 0.85rem;
    }

    /* --- SIDE ACTIONS --- */
    .pwa-side-actions {
        position: absolute;
        bottom: 120px;
        right: 15px;
        z-index: 20;
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .pwa-action-btn {
        background: rgba(255,255,255,0.2);
        border: none;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.4rem;
        cursor: pointer;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        transition: transform 0.2s;
    }

    .pwa-action-btn:active {
        transform: scale(0.9);
    }

    .pwa-hint {
        position: absolute;
        bottom: 20px;
        left: 0;
        width: 100%;
        text-align: center;
        font-size: 0.85rem;
        opacity: 0.7;
        z-index: 10;
        color: #fff;
        animation: hintBounce 2.5s infinite;
    }

    @keyframes hintBounce {
        0%, 100% { transform: translateY(0); opacity: 0.5; }
        50% { transform: translateY(-5px); opacity: 0.9; }
    }

    /* --- DETAILS PAGE --- */
    .details-page {
        background: #ffffff !important;
        color: #000000 !important;
        overflow: hidden; /* No vertical scroll on the page itself */
    }

    .pwa-details-content {
        padding: 40px 20px 20px;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #ffffff !important;
    }

    .pwa-details-content h1,
    .pwa-details-content p,
    .pwa-details-content div:not(.amender-link),
    .pwa-rich-content {
        color: #000000 !important;
    }

    body.dark-mode .details-page,
    body.dark-mode .pwa-details-content {
        background: #121212 !important;
    }

    body.dark-mode .pwa-details-content h1,
    body.dark-mode .pwa-details-content p,
    body.dark-mode .pwa-details-content div:not(.amender-link),
    body.dark-mode .pwa-rich-content {
        color: #f0f0f0 !important;
    }

    .pwa-full-link {
        display: inline-block;
        padding: 12px 24px;
        background: var(--link-color);
        color: #fff !important;
        text-decoration: none;
        border-radius: 30px;
        font-weight: bold;
        box-shadow: 0 4px 10px var(--card-shadow);
    }

    /* Handle dark mode specifically for PWA details */
    body.dark-mode .details-page {
        background: #121212;
        color: #f0f0f0;
    }

    /* --- DOTS --- */
    .pwa-dots {
        position: absolute;
        bottom: 10px;
        left: 0;
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 6px;
        z-index: 30;
        pointer-events: none;
    }

    .pwa-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgba(234, 179, 8, 0.4); /* Honey Gold translucent */
        transition: background 0.3s, transform 0.3s;
        border: 1px solid rgba(0,0,0,0.1);
    }

    .pwa-dot.active {
        background: #eab308; /* Honey Gold active */
        transform: scale(1.3);
        box-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
    }

    /* --- COMMENTS MODAL --- */
    .pwa-comments-modal {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 75vh;
        background: #fff;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        z-index: 10001;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        color: #000;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
    }

    .pwa-comments-modal.active {
        transform: translateY(0);
    }

    .pwa-comments-handle {
        width: 40px;
        height: 4px;
        background: #ccc;
        border-radius: 2px;
        margin: 10px auto;
        flex-shrink: 0;
    }

    .pwa-comments-header {
        padding: 0 20px 15px;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
    }

    .pwa-comments-header h3 {
        margin: 0;
        font-size: 1rem;
        color: #000 !important;
    }

    .pwa-close-x {
        background: none;
        border: none;
        font-size: 1.2rem;
        cursor: pointer;
        color: #999;
    }

    .pwa-comments-list {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 30px;
    }

    /* --- AGAINST/DISCARD OVERLAY --- */
    .pwa-discard-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 50;
        pointer-events: none;
        opacity: 0;
        background: rgba(255,0,0,0.15);
        transition: opacity 0.2s;
    }

    .pwa-discard-icon {
        font-size: 7rem;
        filter: drop-shadow(0 0 15px rgba(0,0,0,0.5));
        transform: scale(0.5);
        transition: transform 0.2s;
    }

    /* Hide Add button for PWA/Mobile */
    .site-nav a[href="ajouter.php"],
    .site-nav a[href="ajouter_fixed.php"] {
        display: none !important;
    }
}

/* --- HIGHLIGHTS FOR SUMMARY SOURCES --- */
.pwa-summary-source {
    background-color: rgba(255, 215, 0, 0.25);
    border-bottom: 1px dashed #eab308;
    cursor: help;
    transition: background 0.3s;
}

.pwa-summary-source:hover {
    background-color: rgba(255, 215, 0, 0.4);
}

.pwa-double-tap-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    font-size: 6rem;
    z-index: 10000;
    pointer-events: none;
    user-select: none;
    animation: pwaThumbPop 0.8s ease-out forwards;
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.9));
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pwaThumbPop {
    0% { transform: scale(0.3) rotate(-20deg); opacity: 0; }
    30% { transform: scale(1.6) rotate(0deg); opacity: 1; }
    80% { transform: scale(1.4); opacity: 0.8; }
    100% { transform: scale(1.1) translateY(-100px); opacity: 0; }
}



