/* styles.css - Love Ink - Design élégant */

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

body {
    font-family: 'Baskerville', 'Times New Roman', serif;
    background: linear-gradient(135deg, #faf3f0 0%, #fae9e5 100%);
    color: #2c1810;
    line-height: 1.6;
}

/* Theme sombre global (active via html[data-theme="dark"]) */
html[data-theme="dark"] {
    color-scheme: dark;
    --rose-deep: #e2bcbc;
    --rose-mid: #d1a3a3;
    --rose-soft: #8e6767;
    --rose-pale: #3c2e2e;
    --rose-blush: #2e2323;
}

html[data-theme="dark"] body {
    background: linear-gradient(135deg, #1e1717 0%, #151010 100%);
    color: #f2e5e0;
}

html[data-theme="dark"] .navbar,
html[data-theme="dark"] .nav {
    background: rgba(37, 28, 28, 0.95);
    border-bottom-color: #473737;
}

html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .profile-header,
html[data-theme="dark"] .conversations-list,
html[data-theme="dark"] .chat-area {
    background: #241b1b;
    border-color: #4a3838;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .nav-links a,
html[data-theme="dark"] .profile-dropdown a,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .logo-text,
html[data-theme="dark"] .auth-card h1 {
    color: #efcfc8;
}

html[data-theme="dark"] .auth-card p,
html[data-theme="dark"] .conversation-preview,
html[data-theme="dark"] .stat-label {
    color: #baa2a2;
}

html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select,
html[data-theme="dark"] .form-group textarea,
html[data-theme="dark"] .chat-input input {
    background: #2a2020;
    color: #f2e5e0;
    border-color: #5a4545;
}

html[data-theme="dark"] .profile-dropdown {
    background: #251d1d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

html[data-theme="dark"] .profile-dropdown a:hover,
html[data-theme="dark"] .conversation-item:hover {
    background: #332727;
}

/* La messagerie utilise Century Gothic */
.messagerie, .messages-container, .chat-box, .conversation {
    font-family: 'Century Gothic', 'Gothic', sans-serif;
}

/* Navigation */
.navbar {
    background: rgba(255, 245, 240, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid #e6d5cc;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 2.2rem;
    font-weight: normal;
    color: #b76e6e;
    letter-spacing: 2px;
    text-decoration: none;
    font-family: 'Baskerville', serif;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #5c3e35;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #b76e6e;
}

/* Profil utilisateur dans la navbar */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    cursor: pointer;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e6d5cc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar i {
    font-size: 1.5rem;
    color: #b76e6e;
}

.online-indicator {
    width: 12px;
    height: 12px;
    background: #4caf50;
    border-radius: 50%;
    border: 2px solid white;
    position: absolute;
    bottom: 2px;
    right: 2px;
}

/* Menu déroulant du profil */
.profile-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    padding: 15px 0;
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.profile-dropdown.show {
    display: block;
}

.profile-dropdown a {
    display: block;
    padding: 10px 20px;
    color: #5c3e35;
    text-decoration: none;
    transition: background 0.3s;
}

.profile-dropdown a:hover {
    background: #faf3f0;
}

/* Page d'accueil avec diaporama */
.hero-slideshow {
    height: 80vh;
    position: relative;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    background: rgba(255, 255, 255, 0.85);
    padding: 50px;
    border-radius: 20px;
    max-width: 600px;
    backdrop-filter: blur(5px);
}

.slide-content h2 {
    font-family: 'Baskerville', serif;
    font-size: 3rem;
    color: #b76e6e;
    margin-bottom: 20px;
}

.slide-content p {
    font-size: 1.2rem;
    color: #5c3e35;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 35px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: normal;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #b76e6e;
    color: white;
}

.btn-primary:hover {
    background: #9e5a5a;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #b76e6e;
    border: 2px solid #b76e6e;
}

.btn-secondary:hover {
    background: #b76e6e;
    color: white;
}

/* Pages de connexion/inscription */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #faf3f0 0%, #fae9e5 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(183, 110, 110, 0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-card h1 {
    font-family: 'Baskerville', serif;
    font-size: 2.5rem;
    color: #b76e6e;
    margin-bottom: 10px;
}

.auth-card p {
    color: #5c3e35;
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.form-group {
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #5c3e35;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e6d5cc;
    border-radius: 10px;
    font-family: 'Baskerville', serif;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #b76e6e;
}

.auth-footer {
    margin-top: 20px;
    color: #5c3e35;
}

.auth-footer a {
    color: #b76e6e;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Page d'accueil connectée (feed) */
.categories-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-family: 'Baskerville', serif;
    font-size: 2.5rem;
    color: #b76e6e;
    margin-bottom: 40px;
    position: relative;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.category-card {
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(183, 110, 110, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid #e6d5cc;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: #b76e6e;
    box-shadow: 0 10px 30px rgba(183, 110, 110, 0.2);
}

.category-card i {
    font-size: 2.5rem;
    color: #b76e6e;
    margin-bottom: 15px;
}

.category-card h3 {
    color: #5c3e35;
    margin-bottom: 5px;
}

/* Profil auteur */
.profile-header {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin: 40px 0;
    display: flex;
    gap: 40px;
    align-items: center;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #e6d5cc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-avatar i {
    font-size: 4rem;
    color: #b76e6e;
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-family: 'Baskerville', serif;
    font-size: 2.5rem;
    color: #b76e6e;
    margin-bottom: 10px;
}

.profile-bio {
    color: #5c3e35;
    margin: 20px 0;
    line-height: 1.8;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #b76e6e;
}

.stat-label {
    color: #5c3e35;
    font-size: 0.9rem;
}

/* Messagerie */
.messagerie-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    height: calc(100vh - 200px);
    margin: 40px 0;
}

.conversations-list {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #e6d5cc;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    cursor: pointer;
    transition: background 0.3s;
    border-bottom: 1px solid #f0e4e0;
}

.conversation-item:hover {
    background: #faf3f0;
}

.conversation-item.active {
    background: #fae9e5;
}

.conversation-avatar {
    position: relative;
}

.conversation-info {
    flex: 1;
}

.conversation-name {
    font-weight: 600;
    color: #5c3e35;
    margin-bottom: 3px;
}

.conversation-preview {
    font-size: 0.9rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 0.8rem;
    color: #b76e6e;
}

.chat-area {
    background: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e6d5cc;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #e6d5cc;
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: 'Century Gothic', sans-serif;
}

.message {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
}

.message.received {
    background: #faf3f0;
    align-self: flex-start;
}

.message.sent {
    background: #b76e6e;
    color: white;
    align-self: flex-end;
}

.message-time {
    font-size: 0.7rem;
    margin-top: 5px;
    opacity: 0.7;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid #e6d5cc;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e6d5cc;
    border-radius: 25px;
    font-family: 'Century Gothic', sans-serif;
}

.chat-input button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #b76e6e;
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-input button:hover {
    transform: scale(1.1);
}

/* Diaporama - Slides spécifiques */
.slide1 { background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.unsplash.com/photo-1516585427167-9f4af9627e6c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80'); }
.slide2 { background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.unsplash.com/photo-1518199266791-5375a83190b7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80'); }
.slide3 { background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.unsplash.com/photo-1522673607200-164d1b6ce486?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80'); }

/* ===== NOUVEAU LOGO AJOUTÉ ===== */
.logo-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-heart {
    position: absolute;
    font-size: 2.5rem;
    color: #b76e6e;
    animation: battement 1.5s ease-in-out infinite;
}

.logo-hand {
    position: relative;
    font-size: 1.8rem;
    color: #f4d1b9;
    transform: rotate(-15deg);
    margin-top: 5px;
    z-index: 2;
}

.logo-pen {
    position: absolute;
    font-size: 1.2rem;
    color: #8b5a2b;
    transform: rotate(30deg);
    right: 8px;
    bottom: 8px;
    z-index: 3;
}

.logo-text {
    font-family: 'Baskerville', serif;
    font-size: 2rem;
    color: #b76e6e;
    letter-spacing: 2px;
}

@keyframes battement {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-slideshow {
        height: 100vh;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .messagerie-container {
        grid-template-columns: 1fr;
    }
    
    .conversations-list {
        height: 300px;
    }
/* ===== PAGINATION POUR HISTOIRES LONGUES ===== */
.story-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0 20px;
    padding: 20px;
    border-top: 2px solid #fae9e5;
    border-bottom: 2px solid #fae9e5;
}

.story-pagination-btn {
    background: white;
    border: 2px solid #b76e6e;
    color: #b76e6e;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.story-pagination-btn:hover:not(.disabled) {
    background: #b76e6e;
    color: white;
}

.story-pagination-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.story-page-indicator {
    font-size: 1.1rem;
    color: #5c3e35;
    font-weight: 600;
}

.story-page-indicator span {
    color: #b76e6e;
    font-size: 1.3rem;
    margin: 0 5px;
}

.page-content {
    line-height: 1.8;
    font-size: 1.1rem;
    min-height: 300px;
}

.reading-progress {
    width: 100%;
    height: 4px;
    background: #f0e4e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.reading-progress-bar {
    height: 4px;
    background: #b76e6e;
    width: 0%;
    transition: width 0.3s;
}

.word-count {
    text-align: right;
    color: #999;
    font-size: 0.85rem;
    margin-top: 10px;
    font-style: italic;
}

}

/* Signature studio (tous les pieds de page) : « by » en Pinyon Script. */
.li-made-by { margin-top: 12px; font-size: 0.8rem; letter-spacing: 0.04em; color: inherit; opacity: 0.8; }
.li-made-by em { font-family: 'Pinyon Script', cursive; font-style: normal; font-size: 1.9em; line-height: 0; color: #b76e6e; margin: 0 7px; position: relative; top: 3px; }
footer:not([class]) .li-made-by em { color: #e2bcbc; }
html[data-theme="dark"] .li-made-by em { color: #e2bcbc; }
.li-made-by a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.li-made-by a:hover { color: #b76e6e; }
