/* =====================================
   VARIABLES & PALETTES DE COULEURS
   ===================================== */
:root {
    /* Palette violette pale */
    --primary-light: #E8D4F8;
    --primary-medium: #D4B5F0;
    --primary-dark: #9B7ED8;
    --accent-purple: #9B7ED8;
    
    /* Tons neutres */
    --background-main: #FAFAF8;
    --text-dark: #3D3D47;
    --text-light: #6B6B7B;
    --text-muted: #A0A0B0;
    --border-light: #E8D4F8;
    --danger: #E85D5D;
    
    /* Polices */
    --font-family-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-family-heading: 'Didot', Georgia, serif;
    --font-size-base: 15px;
    --font-size-small: 13px;
}

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

html {
    line-height: 1.6;
    font-weight: 400;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-main);
    font-size: var(--font-size-base);
    background-color: var(--background-main);
    color: var(--text-dark);
}
/* =====================================
   Two-authentificator
   ===================================== */

.code-inputs {
    display: flex;
    justify-content: center;
    gap: 12px; /* espace entre les cases */
    margin-bottom: 24px;
}

.code-inputs input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.6em;
    font-weight: 600;

    border-radius: 10px;
    border: 2px solid var(--border-light);
    outline: none;

    background: var(--background-main);
    color: var(--text-dark);

    transition: 
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}

.code-inputs input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(128, 90, 213, 0.25);
    transform: scale(1.05);
}

.code-inputs input:not(:placeholder-shown) {
    border-color: var(--accent-purple);
}

/*
Menu
*/
.icon {
    width: 25px;
    height: 25px;
    width: 100%;
}

/* =====================================
   HOME ICON
   ===================================== */
.header-home-icon {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.home-icon {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.home-icon:hover {
    transform: scale(1.1);
}

.home-icon-pic {
    width: 50px;
    height: 50px;
    border-radius: 10%;
    border: 2px solid transparent;
}

/* =====================================
   HEADER & PROFIL
   ===================================== */
.header-profile {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.profile-link {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-link:hover {
    transform: scale(1.1);
}

.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFFFFF;
}

/* Pour personnale information */
.profile-pic-container {
    display: flex;
    justify-content: center; /* centre horizontalement */
    align-items: center;     /* centre verticalement */
    width: 200px;            /* même taille que l'image */
    height: 200px;
}

.profile-pic-big {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;      /* garde le ratio et crop si nécessaire */
    border: 2px solid #FFFFFF;
}


/* =====================================
   ALERTES
   ===================================== */
.alert {
    padding: 16px 20px;
    margin: 15px 0;
    border-radius: 4px;
    background-color: #F0E8F8;
    color: #6B5B95;
    border-left: 4px solid var(--primary-dark);
}

/* =====================================
   TYPOGRAPHIE
   ===================================== */
h1 {
    color: var(--primary-dark);
    font-family: var(--font-family-heading);
    font-size: 50px;
    text-align: center;
    margin: 30px 0 20px 0;
    font-weight: 600;
}

h2 {
    color: var(--text-dark);
    font-family: var(--font-family-heading);
    font-size: 40px;
    text-align: center;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

h3 {
    color: var(--text-dark);
    font-family: var(--font-family-heading);
    font-size: 30px;
    text-align: left;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

h4 {
    color: var(--primary-dark);
    font-family: var(--font-family-heading);
    font-size: 25px;
    text-align: left;
    margin: 15px 0 10px 0;
    font-weight: 600;
}

p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 15px;
}

/* =====================================
   INPUTS & FORMULAIRES
   ===================================== */
.input {
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: var(--font-size-base);
    background-color: #FFFFFF;
    color: var(--text-dark);
    font-family: var(--font-family-main);
    transition: border-color 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.input::placeholder {
    color: var(--text-muted);
}

.textarea {
    width: 100%;
    padding: 12px 16px;
    min-height: 150px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background-color: #FFFFFF;
    color: var(--text-dark);
    font-family: var(--font-family-main);
    font-size: var(--font-size-base);
    resize: vertical;
    transition: border-color 0.3s ease;
}

.textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
}

label {
    display: block;
    color: var(--text-dark);
    margin: 12px 0 6px 0;
    font-weight: 600;
    font-size: var(--font-size-base);
}

form {
    margin: 20px 0;
}

form p {
    text-align: center;
    margin: 15px 0;
    color: var(--text-light);
    font-size: var(--font-size-small);
}

/* =====================================
   BOUTONS
   ===================================== */
.button {
    padding: 12px 30px;
    margin-top: 10px;
    background-color: var(--primary-dark);
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.button:hover {
    background-color: #7A5DB0;
}

.button_red {
    background-color: #E85D5D;
    color: #FFFFFF;
    padding: 12px 30px;
    margin-top: 10px;
    border: none;
    border-radius: 4px;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.button_red:hover {
    background-color: #D43A3A;
}

.button_green {
    background-color: #5DE85D;
    color: #FFFFFF;
    padding: 12px 30px;
    margin-top: 10px;
    border: none;
    border-radius: 4px;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.button_green:hover {
    background-color: #3AD43A;
}

/* =====================================
   CONTENEURS
   ===================================== */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.little_post {
    background-color: #FFFFFF;
    color: var(--text-dark);
    width: 100%;
    max-width: 450px;
    margin: 30px auto;
    padding: 40px 30px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    transition: border-color 0.3s ease;
}

.little_post:hover {
    border-color: var(--primary-dark);
}

.post {
    background-color: #FFFFFF;
    color: var(--text-dark);
    width: 100%;
    margin: 20px auto;
    padding: 25px 30px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    transition: border-color 0.3s ease;
}

/*for chatroom my post*/
.my_post {
    background-color: var(--primary-light);
    color: var(--text-dark);
    width: 100%;
    margin: 20px auto;
    padding: 25px 30px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    transition: border-color 0.3s ease;
}

.post:hover {
    border-color: var(--primary-dark);
}

/* =====================================
   NAVIGATION & HEADER
   ===================================== */
header {
    background-color: #F5F3F9;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

header ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

header li {
    margin: 5px;
}

header a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: var(--font-size-base);
    padding: 10px 20px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

header a:hover {
    background-color: var(--primary-light);
}

header a.active {
    background-color: var(--primary-dark);
    color: #FFFFFF;
}

/* Navigation locale */
nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background-color: #F5F3F9;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

nav li {
    margin: 0;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

nav a:hover {
    background-color: var(--primary-light);
}

nav a.active {
    background-color: var(--primary-dark);
    color: #FFFFFF;
}

/* =====================================
   SECTIONS
   ===================================== */
section {
    margin: 40px 0;
    padding: 30px 20px;
}

section.mid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

section.mid > div {
    flex: 1;
    min-width: 250px;
}

#not-media,
#media {
    flex: 1;
    min-width: 280px;
}

#media img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

#intro {
    background-color: #F5F3F9;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

#first-row {
    background-color: transparent;
    border-radius: 4px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.finz {
    background-color: #FFFFFF;
    padding: 25px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    transition: border-color 0.3s ease;
}

.finz:hover {
    border-color: var(--primary-dark);
}

.finz form {
    margin: 0;
}

/* =====================================
   LIENS
   ===================================== */
a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-dark);
    text-decoration: underline;
}

/* =====================================
   SECTIONS SPÉCIALES
   ===================================== */

/* Section Hero - Page d'accueil */
section#hero {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--background-main);
}

section#hero h1 {
    margin-bottom: 15px;
}

section#hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 20px auto;
    color: var(--text-light);
}

section#hero .button {
    margin: 0 10px;
}

/* Section Services - Grille de cartes */
section#services {
    padding: 40px 20px;
}

section#services h2 {
    margin-bottom: 30px;
}

/* Section About - Layout flexbox */
section#about {
    padding: 40px 20px;
}

section#about h2 {
    margin-bottom: 20px;
}

section#about p {
    font-size: 16px;
    line-height: 1.8;
}

/* Section Features - Liste améliorée */
section#features {
    padding: 40px 20px;
}

section#features h2 {
    margin-bottom: 30px;
}

section#features ul {
    max-width: 600px;
    margin: 20px auto;
    font-size: 16px;
    color: var(--text-light);
    line-height: 2;
}

section#features li {
    margin: 8px 0;
}

/* =====================================
   FOOTER
   ===================================== */
footer {
    background-color: var(--primary-dark);
    color: #FFFFFF;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

footer h3 {
    color: #FFFFFF;
    font-size: 24px;
    margin-bottom: 10px;
}

footer p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

/* =====================================
   PAGES SPÉCIFIQUES - MOVIE
   ===================================== */

/* Affichage des détails du film */
.movie-poster {
    max-width: 250px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.movie-plot {
    margin: 20px 0;
    font-size: 18px;
    color: var(--text-light);
}

.movie-rating {
    background-color: #F5F3F9;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    border: 1px solid var(--border-light);
}

.movie-rating h4 {
    margin-bottom: 10px;
}

.movie-rating-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-dark);
}

.movie-details {
    background-color: #F5F3F9;
    margin-top: 40px;
    border: 1px solid var(--border-light);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    border-radius: 4px;
}

.movie-detail-item h4 {
    margin-bottom: 10px;
}

/* Historique de recherche */
.search-history {
    margin-top: 40px;
}

.search-history-empty {
    text-align: center;
    color: var(--text-muted);
}

.search-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-history-item h4 {
    margin: 0;
}

.search-history-item a {
    color: var(--primary-dark);
}

/* =====================================
   PAGES SPÉCIFIQUES - CHATROOM
   ===================================== */

/* Affichage des posts */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-meta {
    color: var(--text-muted);
    font-size: 13px;
}

.post-meta strong {
    font-weight: 600;
}

.post-timestamp {
    color: var(--text-muted);
    font-size: 13px;
}

.post-actions {
    margin-top: 15px;
}

.post-actions a {
    color: var(--primary-dark);
}

.no-posts {
    text-align: center;
    color: var(--text-muted);
}

/* =====================================
   PAGES SPÉCIFIQUES - BANK
   ===================================== */

/* Balance display */
.bank-container {
    max-width: 600px;
    margin: 40px auto;
}

.balance-box {
    text-align: center;
    background-color: #F5F3F9;
    padding: 30px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.balance-label {
    margin-bottom: 15px;
}

.balance-value {
    font-size: 36px;
    font-weight: 600;
    color: var(--primary-dark);
}

.balance-subtitle {
    margin-top: 20px;
    color: var(--text-light);
}

/* Withdrawal form */
.withdrawal-container {
    max-width: 500px;
    margin: 40px auto;
}

.withdrawal-info {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Historique transfer */
.transfer-history {
    margin-top: 40px;
}

.transfer-history-empty {
    text-align: center;
    color: var(--text-muted);
}

.transfer-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =====================================
   PAGES SPÉCIFIQUES - FORMS
   ===================================== */

/* Formulaires avec actions */
.form-actions {
    margin-top: 20px;
}

.form-actions form {
    display: inline;
}

.delete-action {
    display: inline;
}

/* =====================================
   PAGES SPÉCIFIQUES - SETTINGS
   ===================================== */

/* Conditions et mentions légales */
.terms-list {
    margin: 15px 0 15px 20px;
    color: var(--text-light);
}

.terms-list li {
    margin-bottom: 8px;
}

.terms-title {
    margin-top: 30px;
}

.terms-footer {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* =====================================
   PAGES SPÉCIFIQUES - THANK YOU
   ===================================== */

/* Page de remerciement */
.credits-section {
    text-align: center;
    margin: 20px 0;
}

.credits-label {
    font-size: 18px;
    font-weight: 600;
}

.credits-subtitle {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
}

/* =====================================
   TABLEAUX
   ===================================== */
table {
    width: 100%;
    margin: 15px 0;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

table th {
    background-color: #F5F3F9;
    font-weight: 600;
    color: var(--text-dark);
}

table tr:hover {
    background-color: #FAFAF8;
}

.table_post {
    width: 100%;
    margin-top: 15px;
    border: none;
}

.table_post tr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    padding: 8px 0;
}

.table_post td {
    padding: 0;
    border: none;
}

.table_text_align_left {
    text-align: left;
}

.table_text_align_right {
    text-align: right;
    color: var(--text-muted);
    font-size: var(--font-size-small);
}

/* =====================================
   PRE & CODE
   ===================================== */
pre {
    background-color: #F5F3F9;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    color: var(--text-dark);
    border-left: 4px solid var(--primary-dark);
}

hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid var(--border-light);
}

/* =====================================
   RESPONSIVE
   ===================================== */
@media (max-width: 768px) {
    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 24px;
    }

    h4 {
        font-size: 20px;
    }

    .little_post {
        width: 100%;
        max-width: none;
        padding: 30px 20px;
    }

    .post {
        width: 100%;
    }

    header ul {
        flex-direction: column;
        gap: 5px;
    }

    header a {
        display: block;
        text-align: center;
        width: 100%;
    }

    nav ul {
        flex-direction: column;
    }

    section.mid {
        flex-direction: column;
        gap: 20px;
    }

    #first-row {
        grid-template-columns: 1fr;
    }

    .finz {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-base: 13px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 20px;
    }

    h4 {
        font-size: 18px;
    }

    .little_post,
    .post {
        padding: 20px 15px;
    }

    .button,
    .button_red {
        width: 100%;
        padding: 14px 20px;
    }

    .content {
        padding: 10px;
    }

    .table_post tr {
        flex-direction: column;
        align-items: flex-start;
    }

    .table_text_align_right {
        text-align: left;
        margin-top: 8px;
    }
}