


/* Styles personnalisés pour La Forge du Livre */
:root {
    --bs-primary: #8B4513;      /* Marron foncé */
    --bs-secondary: #D2691E;    /* Orange foncé */
    --bs-success: #228B22;      /* Vert forêt */
    --bs-info: #4682B4;         /* Bleu acier */
    --bs-warning: #DAA520;      /* Or */
    --bs-danger: #8B0000;       /* Rouge foncé */
    --bs-dark: #2F4F4F;         /* Gris ardoise */
    --bs-light: #F5F5DC;        /* Beige clair */
}

body {
    background: linear-gradient(135deg, #2F4F4F 0%, #1a1a1a 100%);
    color: #F5F5DC;
    font-family: 'Georgia', serif;
    min-height: 100vh;
}

/* Ajustement pour la navbar fixe */
main {
    padding-top: 0; /* Pas de padding-top car la navbar n'est pas fixe */
}

/* Navbar personnalisée */
.navbar-custom {
    background: linear-gradient(90deg, #8B4513 0%, #D2691E 100%);
    border-bottom: 3px solid #DAA520;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Style pour la navbar de base */
.navbar-dark.bg-dark {
    background: linear-gradient(90deg, #8B4513 0%, #D2691E 100%) !important;
    border-bottom: 3px solid #DAA520;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.navbar-dark .navbar-brand {
    color: #DAA520 !important;
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.navbar-dark .navbar-nav .nav-link {
    color: #F5F5DC !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #DAA520 !important;
    transform: translateY(-2px);
}

.navbar-custom .navbar-brand {
    color: #DAA520 !important;
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.navbar-custom .navbar-nav .nav-link {
    color: #F5F5DC !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-custom .navbar-nav .nav-link:hover {
    color: #DAA520 !important;
    transform: translateY(-2px);
}

/* Hero section */
.hero-section {
    background: linear-gradient(rgba(47, 79, 79, 0.8), rgba(26, 26, 26, 0.9)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23DAA520" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23DAA520" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23DAA520" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    padding: 4rem 0;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    color: #DAA520;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #F5F5DC;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Cards personnalisées */
.card-custom {
    background: linear-gradient(145deg, #3a5a5a 0%, #2F4F4F 100%);
    border: 2px solid #DAA520;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.card-custom .card-header {
    background: linear-gradient(90deg, #8B4513 0%, #D2691E 100%);
    color: #F5F5DC;
    border-bottom: 2px solid #DAA520;
    border-radius: 13px 13px 0 0 !important;
    font-weight: bold;
}

.card-custom .card-body {
    color: #F5F5DC;
}

/* Boutons personnalisés */
.btn-custom {
    background: linear-gradient(45deg, #8B4513, #D2691E);
    border: 2px solid #DAA520;
    color: #F5F5DC;
    font-weight: bold;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-custom:hover {
    background: linear-gradient(45deg, #D2691E, #8B4513);
    color: #DAA520;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Section features */
.features-section {
    padding: 4rem 0;
    background: rgba(47, 79, 79, 0.3);
}

.feature-icon {
    font-size: 3rem;
    color: #DAA520;
    margin-bottom: 1rem;
}

/* Footer */
.footer-custom {
    background: linear-gradient(90deg, #2F4F4F 0%, #1a1a1a 100%);
    border-top: 3px solid #DAA520;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .navbar-custom .navbar-brand {
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Styles pour l'éditeur TinyMCE */
.tox-tinymce {
    border: 2px solid #DAA520 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.tox .tox-toolbar {
    background: linear-gradient(90deg, #8B4513 0%, #D2691E 100%) !important;
    border-bottom: 1px solid #DAA520 !important;
}

.tox .tox-tbtn {
    color: #F5F5DC !important;
}

.tox .tox-tbtn:hover {
    background-color: rgba(218, 165, 32, 0.3) !important;
}

.tox .tox-edit-area {
    background-color: #F5F5DC !important;
}

.tox .tox-edit-area__iframe {
    background-color: #F5F5DC !important;
}

/* Styles pour les paragraphes */
.paragraph-content {
    line-height: 1.6;
    color: #2F4F4F;
}

.paragraph-content h1, .paragraph-content h2, .paragraph-content h3,
.paragraph-content h4, .paragraph-content h5, .paragraph-content h6 {
    color: #8B4513;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.paragraph-content p {
    margin-bottom: 1rem;
}

.paragraph-content ul, .paragraph-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.paragraph-content blockquote {
    border-left: 4px solid #DAA520;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #666;
}

/* Styles pour les cartes de paragraphes */
.card .card-header .badge {
    font-size: 0.75rem;
}

.paragraph-preview {
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.paragraph-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, rgba(245, 245, 220, 0.9));
    pointer-events: none;
}

/* Styles pour les modales */
.modal-content {
    background: linear-gradient(145deg, #3a5a5a 0%, #2F4F4F 100%);
    border: 2px solid #DAA520;
    color: #F5F5DC;
}

.modal-header {
    background: linear-gradient(90deg, #8B4513 0%, #D2691E 100%);
    border-bottom: 1px solid #DAA520;
}

.modal-footer {
    border-top: 1px solid #DAA520;
}

/* Styles pour les listes de paragraphes */
.list-group-item {
    background: rgba(245, 245, 220, 0.1);
    border: 1px solid rgba(218, 165, 32, 0.3);
    color: #F5F5DC;
}

.list-group-item:hover {
    background: rgba(218, 165, 32, 0.1);
    border-color: #DAA520;
}

/* Styles pour les boutons d'action */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Styles pour l'arbre de l'histoire */
.story-tree {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tree-node {
    margin-bottom: 1rem;
}

.tree-start {
    margin-bottom: 2rem;
}

.tree-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.tree-paragraph {
    transition: all 0.3s ease;
}

.tree-paragraph:hover {
    background: rgba(218, 165, 32, 0.1);
    border-radius: 6px;
    padding: 0.5rem;
    margin: -0.5rem;
}

.tree-current {
    background: rgba(218, 165, 32, 0.2) !important;
    border: 2px solid #daa520 !important;
    border-radius: 8px;
    padding: 0.5rem;
    margin: -0.5rem;
}

.tree-paragraph-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.tree-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.tree-start-badge {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.tree-paragraph-id {
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.875rem;
}

.tree-paragraph-content {
    color: #2F4F4F;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    font-size: 0.9rem;
    font-weight: 500;
}

.tree-paragraph-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tree-branches {
    margin-left: 2rem;
    position: relative;
}

.tree-branches::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(218, 165, 32, 0.5), transparent);
}

.tree-branch {
    margin-bottom: 1.5rem;
    position: relative;
}

.tree-branch::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 1.5rem;
    width: 1rem;
    height: 2px;
    background: rgba(218, 165, 32, 0.5);
}

.tree-choice {
    background: rgba(218, 165, 32, 0.1);
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #2F4F4F;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tree-choice:hover {
    background: rgba(218, 165, 32, 0.2);
    border-color: rgba(218, 165, 32, 0.6);
}

.tree-choice i {
    color: #daa520;
    font-size: 0.75rem;
}

.tree-choice-text {
    font-style: italic;
    color: #2F4F4F;
    font-weight: 500;
}

/* Responsive pour l'arbre */
@media (max-width: 768px) {
    .tree-branches {
        margin-left: 1rem;
    }
    
    .tree-branches::before {
        left: -0.5rem;
    }
    
    .tree-branch::before {
        left: -0.5rem;
        width: 0.5rem;
    }
    
    .tree-paragraph-actions {
        flex-direction: column;
    }
    
    .tree-paragraph-actions .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
}
