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

body {
    background-color: #000000;
    color: #ffffff;
    font-family: Arial, sans-serif;
}

/* ===== HEADER ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #111111;
    border-bottom: 1px solid #333;
}

header h1 {
    font-size: 28px;
    text-align: center;
    flex: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.header-buttons a {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}

.btn-login {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.btn-register {
    background-color: #ffffff;
    color: #000000;
}

.btn-login:hover { background-color: #333; }
.btn-register:hover { background-color: #cccccc; }

.btn-logout {
    background-color: transparent;
    color: #ff6666;
    border: 1px solid #ff6666;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s, color 0.2s;
}

.btn-logout:hover {
    background-color: #ff6666;
    color: #000000;
}

.header-nickname {
    font-size: 14px;
    color: #aaaaaa;
    display: flex;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    transition: color 0.2s;
}

.header-nickname:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ===== CONTENU PRINCIPAL ===== */
main {
    padding: 40px 20px;
}

/* ===== FLÈCHE FLOTTANTE RETOUR EN HAUT ===== */
#btn-float-top {
    position: fixed;
    left: 20px;
    bottom: 40px;
    font-size: 36px;
    line-height: 1;
    color: #aaaaaa;
    text-decoration: none;
    background-color: #111111;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 4px 12px;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, color 0.2s, background-color 0.2s, border-color 0.2s;
}

#btn-float-top.visible {
    opacity: 1;
    visibility: visible;
}

#btn-float-top:hover {
    color: #000000;
    background-color: #ffffff;
    border-color: #ffffff;
}

/* ===== BARRE ALPHABET ===== */
.alphabet-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 20px 20px 30px 20px;
}

.alpha-link {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.alpha-active {
    color: #ffffff;
    border: 1px solid #555;
    background-color: transparent;
}

.alpha-active:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.alpha-inactive {
    color: #444444;
    border: 1px solid #222;
    cursor: default;
}

/* Ancre de lettre — décalage pour compenser le header fixe si besoin */
.alpha-anchor {
    display: block;
    height: 0;
    visibility: hidden;
}

/* ===== FLÈCHE RETOUR EN HAUT ===== */
.back-to-top {
    display: flex;
    justify-content: center;
    padding: 30px 0 10px 0;
}

.btn-top {
    display: inline-block;
    font-size: 42px;
    line-height: 1;
    color: #aaaaaa;
    text-decoration: none;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 4px 16px;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.btn-top:hover {
    color: #000000;
    background-color: #ffffff;
    border-color: #ffffff;
}

/* ===== PAGE CARD_SEARCH ===== */
.cs-block {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 30px 24px;
    background-color: #111111;
    border: 1px solid #333;
    border-radius: 10px;
}

/* Bloc résultat encore plus large pour loger 9 cartes sur une ligne */
.cs-block-wide {
    max-width: 1340px;
}

.cs-block-title {
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    padding-bottom: 14px;
    margin-bottom: 10px;
    border-bottom: 2px solid #444;
}

.cs-block-subtitle {
    font-size: 13px;
    color: #777777;
    margin-bottom: 22px;
}

/* En-tête du bloc résultat avec titre + bouton effacer */
.cs-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
    border-bottom: 2px solid #444;
    padding-bottom: 14px;
}

.cs-result-header .cs-block-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Bouton Tout effacer */
.cs-clear-btn {
    background: none;
    border: 1px solid #555;
    border-radius: 4px;
    color: #aaaaaa;
    font-size: 12px;
    padding: 5px 12px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.cs-clear-btn:hover {
    background-color: #cc6666;
    border-color: #cc6666;
    color: #ffffff;
}

/* Nuage de tags pays/villes */
.cs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cs-tag {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.5px;
}

.cs-tag:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* Tag déjà sélectionné */
.cs-tag-active {
    box-shadow: 0 0 0 2px #ffffff;
    opacity: 1 !important;
}

/* Tag spécial "Voir toutes les cartes" */
.cs-tag-all {
    border-color: #ffffff !important;
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    font-style: italic;
}

/* Placeholder bloc 2 */
.cs-result-placeholder {
    font-size: 13px;
    color: #555555;
    font-style: italic;
    padding: 10px 0;
}

.cs-no-cards {
    font-size: 13px;
    color: #555555;
    font-style: italic;
}

/* Groupe de 9 cartes */
.cs-group {
    margin-bottom: 35px;
}

.cs-group-title {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid #333;
}

/* Grille : 9 cartes sur une ligne, taille 120x203 */
.cs-cards-grid {
    display: flex;
    flex-wrap: nowrap;       /* Pas de retour à la ligne — 9 cartes sur une seule ligne */
    gap: 12px;
    overflow-x: auto;        /* Ascenseur horizontal si l'écran est trop petit */
    padding-bottom: 6px;     /* Espace pour la scrollbar */
}

.cs-card-item {
    width: 120px;
    min-width: 120px;        /* Empêche la compression */
    height: 203px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #333;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    flex-shrink: 0;          /* Empêche le rétrécissement */
}

.cs-card-item:hover {
    transform: scale(1.05);
    border-color: #ffffff;
}

.cs-card-item img {
    width: 120px;
    height: 203px;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Lien retour accueil */
.cs-back-home {
    display: flex;
    justify-content: center;
    padding: 10px 20px 50px 20px;
}

.cs-home-btn {
    max-width: 280px;
    text-align: center;
    text-decoration: none;
}

/* ===== UTILISATEURS À PROXIMITÉ ===== */
.nearby-intro {
    font-size: 13px;
    color: #aaaaaa;
    margin-bottom: 16px;
    line-height: 1.5;
}

.nearby-status {
    padding: 10px 0;
}

.nearby-loading {
    font-size: 13px;
    color: #aaaaaa;
    font-style: italic;
}

.nearby-error {
    font-size: 13px;
    color: #cc6666;
}

.nearby-my-place {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
    font-size: 13px;
    color: #cccccc;
    margin-bottom: 20px;
}

.nearby-my-place-icon {
    font-size: 16px;
}

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

.nearby-empty {
    font-size: 13px;
    color: #555555;
    font-style: italic;
    padding: 10px 0;
}

.nearby-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    flex-wrap: wrap;
    transition: border-color 0.2s;
}

.nearby-item:hover {
    border-color: #555;
}

.nearby-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #444;
    flex-shrink: 0;
}

.nearby-avatar-default {
    background-color: #333;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    line-height: 44px;
    text-align: center;
    flex-shrink: 0;
}

.nearby-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.nearby-nick {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
}

.nearby-place {
    font-size: 12px;
    color: #777777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nearby-dist {
    font-size: 12px;
    color: #66cc66;
    font-weight: bold;
}

.nearby-chat-btn {
    text-decoration: none;
    color: #000000;
    background-color: #ffffff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.nearby-chat-btn:hover {
    background-color: #cccccc;
}

/* ===== IMAGE DE PROFIL ===== */
.profile-pic-preview {
    text-align: center;
    margin-bottom: 20px;
}

.profile-pic-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #444;
    display: block;
    margin: 0 auto 8px auto;
}

/* ===== CARTE UNIQUE TÉLÉCHARGEABLE ===== */
.donate-card-unique-text {
    font-size: 13px;
    color: #aaaaaa;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 14px 16px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
}

.donate-card-unique-wrap {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.donate-card-unique-thumb {
    text-align: center;
}

.donate-card-unique-thumb img {
    width: 120px;
    height: 203px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #66cc66;
    display: block;
    pointer-events: none;
}

.donate-card-serial {
    font-size: 11px;
    color: #666;
    margin-top: 6px;
    text-align: center;
}

.donate-card-unique-action {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 180px;
}

.donate-dl-btn {
    width: auto;
    padding: 12px 20px;
    font-size: 14px;
}

.donate-dl-done {
    background-color: #333;
    color: #666;
    cursor: not-allowed;
}

.donate-dl-done:hover {
    background-color: #333;
}

/* ===== PAGE CARD_DONATE ===== */
.cd-header-bar {
    text-align: center;
    padding: 30px 20px 20px 20px;
}

.cd-title {
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    margin-bottom: 10px;
}

.cd-subtitle {
    font-size: 13px;
    color: #777777;
}

.cd-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 20px;
    margin-bottom: 20px;
}

.cd-card-item {
    width: 120px;
    position: relative;
}

.cd-card-img-wrap {
    position: relative;
    width: 120px;
    height: 203px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}

.cd-card-img {
    width: 120px;
    height: 203px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    transition: transform 0.2s;
    pointer-events: none;
}

.cd-card-available .cd-card-img-wrap:hover .cd-card-img {
    transform: scale(1.04);
}

/* Carte disponible : bordure verte */
.cd-card-available .cd-card-img-wrap {
    border: 2px solid #2d6a2d;
}

/* Badge disponible */
.cd-available-badge {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(45, 106, 45, 0.85);
    color: #66cc66;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Carte possédée : image floue */
.cd-card-owned .cd-card-img-wrap {
    border: 2px solid #333;
    cursor: default;
}

.cd-card-img-blurred {
    filter: blur(3px) brightness(0.4);
}

/* Overlay propriétaire */
.cd-owner-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    text-align: center;
}

.cd-owner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    display: block;
}

.cd-owner-avatar-default {
    background-color: #444;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    line-height: 40px;
    text-align: center;
}

.cd-owner-text {
    font-size: 9px;
    color: #aaaaaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cd-owner-nick {
    font-size: 11px;
    font-weight: bold;
    color: #ffffff;
    word-break: break-word;
}

.cd-owner-price {
    font-size: 11px;
    font-weight: bold;
    color: #66cc66;
}

/* ===== PAGE DONATION ===== */
.donate-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0 60px 0;
}

.donate-title {
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    text-align: center;
    padding-bottom: 15px;
    margin-bottom: 30px;
    border-bottom: 2px solid #444;
}

.donate-intro {
    background-color: #111111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 22px 26px;
    margin-bottom: 30px;
    font-size: 14px;
    color: #cccccc;
    line-height: 1.7;
}

.donate-label {
    font-size: 13px;
    color: #aaaaaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* Grille des 5 cartes à choisir */
.donate-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
}

.donate-card-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid #333;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}

.donate-card-item img {
    width: 150px;
    height: 254px;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.donate-card-item:hover {
    border-color: #aaaaaa;
    transform: scale(1.03);
}

.donate-card-item.selected {
    border-color: #66cc66;
    box-shadow: 0 0 12px rgba(102, 204, 102, 0.4);
}

/* Coche de sélection */
.donate-card-check {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: #66cc66;
    color: #000000;
    font-size: 14px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
}

.donate-card-item.selected .donate-card-check {
    display: block;
}

/* Champ montant */
.donate-amount-group {
    max-width: 300px;
}

/* Récapitulatif avant PayPal */
.donate-recap {
    background-color: #111111;
    border: 1px solid #2d6a2d;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #cccccc;
    line-height: 1.6;
}

/* Bouton PayPal centré */
.donate-paypal {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

/* Carte gagnée sur la page de confirmation */
.donate-confirm-card {
    text-align: center;
    margin: 25px 0;
}

.donate-card-won {
    display: inline-block;
    border: 2px solid #66cc66;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(102, 204, 102, 0.3);
}

.donate-card-won img {
    width: 200px;
    height: 338px;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.donate-card-value {
    padding: 10px;
    background-color: #111111;
    font-size: 14px;
    font-weight: bold;
    color: #66cc66;
    letter-spacing: 1px;
}

/* ===== PAGES LÉGALES (mentions, CGU) ===== */
.legal-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 0 60px 0;
}

.legal-title {
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    text-align: center;
    padding-bottom: 15px;
    margin-bottom: 35px;
    border-bottom: 2px solid #444;
}

.legal-intro {
    font-size: 14px;
    color: #cccccc;
    line-height: 1.7;
    margin-bottom: 30px;
    padding: 16px 20px;
    background-color: #111111;
    border: 1px solid #333;
    border-radius: 6px;
}

.legal-section {
    margin-bottom: 30px;
    padding: 24px 28px;
    background-color: #111111;
    border: 1px solid #333;
    border-radius: 8px;
}

.legal-subtitle {
    font-size: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.legal-text {
    font-size: 14px;
    color: #cccccc;
    line-height: 1.7;
}

.legal-list {
    margin: 12px 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legal-list li {
    font-size: 14px;
    color: #cccccc;
    line-height: 1.6;
}

.legal-link {
    color: #aaaaaa;
    text-decoration: underline;
    transition: color 0.2s;
}

.legal-link:hover {
    color: #ffffff;
}

.legal-back {
    display: block;
    max-width: 280px;
    margin: 40px auto 0 auto;
    text-align: center;
}

/* ===== PAGE CONTACT ===== */
.contact-textarea {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #ffffff;
    font-size: 14px;
    font-family: Arial, sans-serif;
    padding: 10px 14px;
    outline: none;
    resize: vertical;
    min-height: 100px;
    max-height: 200px;
    transition: border-color 0.2s;
    line-height: 1.5;
}

/* Textarea pleine largeur alignée sur le bouton de soumission */
.contact-textarea-full {
    width: 100%;
    box-sizing: border-box;
    min-height: 120px;
}

.contact-textarea:focus {
    border-color: #ffffff;
}

.contact-counter {
    display: block;
    text-align: right;
    margin-top: 5px;
}

/* Select du formulaire de contact */
.form-group select {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #ffffff;
    font-size: 14px;
    padding: 10px 14px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.form-group select:focus {
    border-color: #ffffff;
}

.form-group select option {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* ===== PAGE D'ACCUEIL ===== */
.home-welcome {
    text-align: center;
    padding: 50px 20px 30px 20px;
}

.home-title {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff;
}

.home-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 30px 20px;
}

.home-card-item img {
    width: 220px;
    height: 372px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #333;
    display: block;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.home-card-item img:hover {
    transform: scale(1.04);
    border-color: #ffffff;
}

.home-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px 20px 50px 20px;
}

.home-links .btn-submit {
    max-width: 360px;
}

.home-links .btn-back {
    font-size: 14px;
}

/* ===== NOM DE LA FAMILLE ===== */
.family-title {
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #444;
    color: #ffffff;
    text-align: center;
}

/* ===== GRILLE DES ÉLÉMENTS ===== */
.family-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

/* ===== CARTES ===== */
.card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 180px;
}

.card-item img {
    width: 180px;
    height: 304px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #333;
    display: block;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.card-item img:hover {
    transform: scale(1.03);
    border-color: #ffffff;
}

.card-item .card-label {
    margin-top: 8px;
    font-size: 12px;
    color: #cccccc;
    text-align: center;
}

.card-item .btn-voir {
    margin-top: 8px;
    text-decoration: none;
    color: #000000;
    background-color: #ffffff;
    padding: 5px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.card-item .btn-voir:hover {
    background-color: #cccccc;
}

/* ===== FORMULAIRE ===== */
.form-container {
    background-color: #111111;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 40px 50px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.form-container h2 {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-align: center;
    color: #ffffff;
    border-bottom: 2px solid #444;
    padding-bottom: 15px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #aaaaaa;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"] {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #ffffff;
    font-size: 14px;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    border-color: #ffffff;
}

.form-group input[type="file"] {
    padding: 8px 14px;
    cursor: pointer;
    color: #aaaaaa;
}

.form-group input[type="file"]::-webkit-file-upload-button {
    background-color: #333;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 10px;
}

.form-group input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #555;
}

.form-group .hint {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    display: block;
}

/* ===== SÉLECTEURS DATE DE NAISSANCE ===== */
.date-selects {
    display: flex;
    gap: 10px;
}

.date-selects select {
    flex: 1;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #ffffff;
    font-size: 14px;
    padding: 10px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.date-selects select:focus {
    border-color: #ffffff;
}

.date-selects select option {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* ===== CHAMP CODE DE VÉRIFICATION ===== */
.input-code {
    letter-spacing: 6px;
    font-size: 20px;
    text-align: center;
}

/* ===== TEXTE INFORMATIF (étape vérification) ===== */
.verify-info {
    color: #aaaaaa;
    text-align: center;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.6;
}

.verify-info strong {
    color: #ffffff;
}

/* Bouton d'envoi */
.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: #ffffff;
    color: #000000;
    font-size: 15px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.2s;
    margin-top: 10px;
    display: block;
    text-align: center;
    text-decoration: none;
}

.btn-submit:hover {
    background-color: #cccccc;
}

/* Lien retour */
.btn-back {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #aaaaaa;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.btn-back:hover {
    color: #ffffff;
}

/* ===== MESSAGES DE RETOUR ===== */
.alert {
    padding: 14px 18px;
    border-radius: 5px;
    margin-bottom: 25px;
    font-size: 14px;
    text-align: center;
}

.alert-success {
    background-color: #1a3a1a;
    border: 1px solid #2d6a2d;
    color: #66cc66;
}

.alert-error {
    background-color: #3a1a1a;
    border: 1px solid #6a2d2d;
    color: #cc6666;
}

/* ===== SECTION MOT DE PASSE OUBLIÉ ===== */
.forgot-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #333;
}

.forgot-toggle {
    display: block;
    text-align: center;
    color: #aaaaaa;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    width: 100%;
    transition: color 0.2s;
}

.forgot-toggle:hover {
    color: #ffffff;
}

.forgot-form {
    display: none;
    margin-top: 20px;
}

.forgot-form.active {
    display: block;
}

.forgot-form .form-group {
    margin-top: 15px;
}

/* ===== MODALE ===== */
#modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#modal-overlay.active {
    display: flex;
}

#modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#modal-img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.15);
    display: block;
}

#modal-close {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #ffffff;
    cursor: pointer;
    line-height: 1;
    z-index: 1010;
    background: none;
    border: none;
    transition: color 0.2s, transform 0.2s;
}

#modal-close:hover {
    color: #cccccc;
    transform: scale(1.2);
}

/* ===== FOOTER ===== */
footer {
    background-color: #111111;
    border-top: 1px solid #333;
    padding: 30px 40px;
    text-align: center;
    color: #777777;
    font-size: 13px;
    margin-top: 60px;
}

footer a {
    color: #aaaaaa;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover { color: #ffffff; }

/* Séparateur entre les blocs du menu latéral */
.space-menu-title-sep {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #333;
    border-bottom: 2px solid #444;
}

/* ===== FORUM ===== */
.forum-main {
    padding: 40px 20px;
    height: calc(100vh - 160px); /* header + footer */
    display: flex;
    flex-direction: column;
}

.forum-layout {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

/* Colonne gauche (1/4) */
.forum-sidebar {
    width: 25%;
    flex-shrink: 0;
    background-color: #111111;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.forum-sidebar-title {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #aaaaaa;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 2px solid #444;
    flex-shrink: 0;
}

/* Liste avec ascenseur si débordement */
.forum-online-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex: 1;
}

.forum-online-item {
    font-size: 13px;
    color: #cccccc;
    padding: 7px 10px;
    background-color: #1a1a1a;
    border-radius: 4px;
    border-left: 3px solid #66cc66;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.forum-online-empty {
    color: #555555;
    border-left-color: #333;
    justify-content: flex-start;
}

/* Nom de l'utilisateur dans la liste */
.forum-online-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Icône chat privé */
.forum-pm-btn {
    background: none;
    border: 1px solid #444;
    border-radius: 4px;
    color: #aaaaaa;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 3px 6px;
    flex-shrink: 0;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.forum-pm-btn:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* Clignotement doux : PM non lu reçu de cet utilisateur */
@keyframes pm-unread-pulse {
    0%   { background-color: transparent; border-color: #444;    color: #aaaaaa; }
    50%  { background-color: #2d6a2d;    border-color: #66cc66;  color: #ffffff; }
    100% { background-color: transparent; border-color: #444;    color: #aaaaaa; }
}

.forum-pm-btn.pm-btn-unread {
    animation: pm-unread-pulse 1.8s ease-in-out infinite;
}

/* ===== MODALE CHAT PRIVÉ ===== */
#pm-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.80);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#pm-overlay.active {
    display: flex;
}

#pm-box {
    background-color: #111111;
    border: 1px solid #333;
    border-radius: 10px;
    width: 560px;
    max-width: 95vw;
    height: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#pm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
    background-color: #0d0d0d;
    flex-shrink: 0;
}

#pm-title {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
}

#pm-close {
    background: none;
    border: none;
    color: #aaaaaa;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

#pm-close:hover {
    color: #ffffff;
    transform: scale(1.2);
}

#pm-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Messages privés : même logique que forum public */
.pm-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pm-msg-other {
    align-self: flex-start;
    background-color: #1a1a1a;
    border: 1px solid #333;
}

.pm-msg-own {
    align-self: flex-end;
    background-color: #1e2e1e;
    border: 1px solid #2d6a2d;
}

.pm-msg-nick {
    font-size: 11px;
    font-weight: bold;
    color: #aaaaaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pm-msg-own .pm-msg-nick {
    color: #66cc66;
    text-align: right;
}

.pm-msg-time {
    font-size: 10px;
    color: #555555;
}

.pm-msg-own .pm-msg-time {
    text-align: right;
}

.pm-msg-text {
    font-size: 13px;
    color: #ffffff;
    line-height: 1.4;
    word-break: break-word;
}

#pm-input-bar {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid #333;
    background-color: #0d0d0d;
    align-items: flex-end;
    flex-shrink: 0;
}

#pm-input {
    flex: 1;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #ffffff;
    font-size: 13px;
    font-family: Arial, sans-serif;
    padding: 8px 12px;
    outline: none;
    resize: none;
    transition: border-color 0.2s;
    line-height: 1.4;
}

#pm-input:focus {
    border-color: #ffffff;
}

#pm-send {
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 5px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

#pm-send:hover {
    background-color: #cccccc;
}

/* Colonne droite (3/4) */
.forum-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background-color: #111111;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
}

/* Zone des messages */
.forum-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Bloc message générique */
.forum-msg {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Message d'un autre utilisateur (gauche) */
.forum-msg-other {
    align-self: flex-start;
    background-color: #1a1a1a;
    border: 1px solid #333;
}

/* Message de l'utilisateur courant (droite) */
.forum-msg-own {
    align-self: flex-end;
    background-color: #1e2e1e;
    border: 1px solid #2d6a2d;
}

.forum-msg-nick {
    font-size: 12px;
    font-weight: bold;
    color: #aaaaaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.forum-msg-own .forum-msg-nick {
    color: #66cc66;
    text-align: right;
}

.forum-msg-time {
    font-size: 11px;
    color: #555555;
}

.forum-msg-own .forum-msg-time {
    text-align: right;
}

.forum-msg-text {
    font-size: 14px;
    color: #ffffff;
    line-height: 1.5;
    word-break: break-word;
}

/* Zone de saisie */
.forum-input-bar {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid #333;
    background-color: #0d0d0d;
    align-items: flex-end;
}

.forum-textarea {
    flex: 1;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #ffffff;
    font-size: 14px;
    font-family: Arial, sans-serif;
    padding: 10px 14px;
    outline: none;
    resize: none;
    transition: border-color 0.2s;
    line-height: 1.4;
}

.forum-textarea:focus {
    border-color: #ffffff;
}

.forum-send-btn {
    width: auto;
    padding: 10px 24px;
    margin-top: 0;
    white-space: nowrap;
}

/* ===== ESPACE PERSONNEL - MISE EN PAGE ===== */
.space-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== MENU LATÉRAL GAUCHE (1/4) ===== */
.space-menu {
    width: 25%;
    flex-shrink: 0;
    background-color: #111111;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 30px 25px;
    position: sticky;
    top: 30px;
}

.space-menu-title {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #aaaaaa;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid #444;
}

.space-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.space-menu-link {
    display: block;
    padding: 10px 14px;
    color: #cccccc;
    text-decoration: none;
    font-size: 14px;
    border-radius: 5px;
    border-left: 3px solid transparent;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.space-menu-link:hover,
.space-menu-link.active {
    color: #ffffff;
    background-color: #1a1a1a;
    border-left-color: #ffffff;
}

/* ===== CONTENU DROIT (3/4) ===== */
.space-content {
    flex: 1;
    min-width: 0;
}

/* ===== SECTION DE CONTENU ===== */
.space-section {
    margin-bottom: 40px;
}

/* Surcharge form-container dans l'espace personnel :
   pas de max-width ni de margin auto, il prend toute la largeur disponible */
.space-content .form-container {
    max-width: 100%;
    margin: 0;
}

/* Valeur actuelle affichée au-dessus d'un formulaire de modification */
.space-current-value {
    font-size: 13px;
    color: #aaaaaa;
    margin-bottom: 22px;
    padding: 10px 14px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
}

.space-current-value strong {
    color: #ffffff;
}

/* ===== VALEUR ACTUELLE (pseudonyme, email, etc.) ===== */
.space-current-value {
    font-size: 13px;
    color: #aaaaaa;
    margin-bottom: 22px;
    padding: 10px 14px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
}

.space-current-value strong {
    color: #ffffff;
}
