/* ============================================
   portfolio790 — Styles personnalisés
   ============================================ */

/* --- Base typography --- */
body {
    font-family: 'Rajdhani', sans-serif;
    transition: background-color 0.5s ease, color 0.5s ease;
}

h1, h2, h3, .logo {
    font-family: 'Orbitron', sans-serif;
}

/* --- Glassmorphism --- */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid #D4C5B0;
    transition: all 0.3s ease;
}

.dark .glass {
    background: rgba(42, 33, 54, 0.7);
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 8px 32px rgba(64, 224, 208, 0.1);
}

/* --- Glow effects (dark mode) --- */
.dark .glow-text {
    text-shadow: 0 0 20px #FFD700, 0 0 40px #40E0D0;
}

.btn-glow {
    transition: all 0.3s ease;
}

.btn-glow:hover {
    transform: translateY(-2px);
}

.dark .btn-glow:hover {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), 0 0 50px rgba(64, 224, 208, 0.4);
}

/* --- Gradient animation --- */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animated {
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

/* --- Twinkling stars (dark mode) --- */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.dark body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 15% 80%, white, transparent),
        radial-gradient(2px 2px at 40% 20%, white, transparent);
    background-size: 200% 200%;
    animation: twinkle 4s ease-in-out infinite;
    opacity: 0.6;
    z-index: 1;
}

/* --- Card hover --- */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.25);
}

.dark .card-hover:hover {
    box-shadow: 0 20px 60px rgba(64, 224, 208, 0.35), 0 0 40px rgba(255, 215, 0, 0.25);
}

/* --- Navbar glass --- */
.navbar-glass {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid #D4C5B0;
    transition: all 0.3s ease;
}

.dark .navbar-glass {
    background: rgba(26, 22, 37, 0.90);
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 20px rgba(64, 224, 208, 0.1);
}

/* --- Dark mode headings glow --- */
.dark h1, .dark h2, .dark h3 {
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* --- Accent borders (dark mode) --- */
.dark .border-accent {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 10px rgba(64, 224, 208, 0.2);
}

/* --- RTL support --- */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .text-left {
    text-align: right !important;
}

[dir="rtl"] .text-right {
    text-align: left !important;
}

[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .ml-2 { margin-right: 0.5rem; margin-left: 0; }
[dir="rtl"] .mr-2 { margin-left: 0.5rem; margin-right: 0; }
[dir="rtl"] .pl-4 { padding-right: 1rem; padding-left: 0; }
[dir="rtl"] .pr-4 { padding-left: 1rem; padding-right: 0; }

/* ============================================
   Quill.js — Éditeur WYSIWYG
   ============================================ */

/* Toolbar — light mode */
.ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 2px solid #D4C5B0 !important;
    background: #F5F1E8;
    border-radius: 12px 12px 0 0;
}

/* Toolbar — dark mode */
.dark .ql-toolbar.ql-snow {
    background: #1a1625;
    border-bottom: 2px solid #3d3630 !important;
}

.dark .ql-toolbar .ql-stroke {
    stroke: #a8998c !important;
}

.dark .ql-toolbar .ql-fill {
    fill: #a8998c !important;
}

.dark .ql-toolbar .ql-picker-label {
    color: #a8998c !important;
}

.dark .ql-toolbar button:hover .ql-stroke,
.dark .ql-toolbar .ql-picker-label:hover .ql-stroke {
    stroke: #D4AF37 !important;
}

.dark .ql-toolbar button:hover .ql-fill {
    fill: #D4AF37 !important;
}

.dark .ql-toolbar .ql-picker-options {
    background: #1a1625 !important;
    border-color: #3d3630 !important;
}

.dark .ql-toolbar .ql-picker-item {
    color: #e8e0d5 !important;
}

/* Editor content area */
.ql-container.ql-snow {
    border: none !important;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    border-radius: 0 0 12px 12px;
}

.ql-editor {
    min-height: 180px;
    padding: 16px 20px;
    color: #3E2723;
    line-height: 1.7;
}

.dark .ql-editor {
    color: #e8e0d5;
}

.ql-editor.ql-blank::before {
    color: #b19a86 !important;
    font-style: normal !important;
}

.dark .ql-editor.ql-blank::before {
    color: #6B5D54 !important;
}

/* Headings inside editor */
.ql-editor h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5em;
    color: #D4AF37;
}

.ql-editor h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.4em;
}

.ql-editor h4 {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.3em;
}

/* Lists, blockquotes, code blocks */
.ql-editor blockquote {
    border-left: 4px solid #D4AF37;
    padding-left: 1em;
    color: #6B5D54;
    font-style: italic;
}

.dark .ql-editor blockquote {
    border-left-color: #8B7830;
    color: #a8998c;
}

.ql-editor pre.ql-syntax {
    background: #1a1625 !important;
    color: #e8e0d5;
    border-radius: 8px;
    padding: 1em;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}

/* ============================================
   Rendu du contenu riche (pages publiques)
   ============================================ */
.rich-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1.5em 0 0.5em;
    color: #D4AF37;
}

.rich-content h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 1.2em 0 0.4em;
}

.rich-content p {
    margin-bottom: 0.8em;
    line-height: 1.8;
}

.rich-content ul, .rich-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.rich-content li {
    margin-bottom: 0.3em;
}

.rich-content blockquote {
    border-left: 4px solid #D4AF37;
    padding-left: 1em;
    margin: 1em 0;
    font-style: italic;
    color: #6B5D54;
}

.dark .rich-content blockquote {
    border-left-color: #8B7830;
    color: #a8998c;
}

.rich-content pre {
    background: #1a1625;
    color: #e8e0d5;
    border-radius: 8px;
    padding: 1em;
    overflow-x: auto;
    margin: 1em 0;
}

.rich-content a {
    color: #D4AF37;
    text-decoration: underline;
    transition: color 0.2s;
}

.rich-content a:hover {
    color: #C1694F;
}

.rich-content strong {
    font-weight: 700;
}
