/*
Theme Name: LibertiChat Dark
Theme URI: https://libertichat.com/blog
Description: Thème enfant sombre aux couleurs de LibertiChat (blanc sur noir, accent rouge). Basé sur Twenty Twenty-Five.
Author: LibertiChat
Version: 1.0
Template: twentytwentyfive
Text Domain: libertichat-dark
*/

/* --- Fond dégradé identique au site principal --- */
body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%) !important;
    background-attachment: fixed !important;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
}

/* --- Titres en rouge, comme sur l'accueil --- */
h1, h2, h3,
.wp-block-post-title,
.wp-block-post-title a,
.wp-block-heading {
    color: #ff0000 !important;
    font-weight: 700;
}

h4, h5, h6 { color: #ffffff !important; }

/* --- Texte courant --- */
p, li, .wp-block-post-excerpt__excerpt, .wp-block-post-content {
    color: #cccccc;
}

/* --- Liens --- */
a { color: #ff0000; text-decoration: none; }
a:hover { color: #ff3333; text-decoration: underline; }
.wp-block-post-title a:hover { color: #ff3333 !important; }

/* --- En-tête et pied de page --- */
.wp-site-blocks > header,
.wp-block-template-part header,
footer.wp-block-template-part {
    background: rgba(0,0,0,0.35);
    border-bottom: 1px solid rgba(255,0,0,0.12);
}

footer.wp-block-template-part {
    border-bottom: none;
    border-top: 1px solid rgba(255,0,0,0.12);
    background: rgba(17,17,17,0.9);
}

/* --- Cartes d'articles --- */
.wp-block-post {
    background: rgba(15,15,15,0.95);
    border: 1px solid rgba(255,0,0,0.1);
    border-radius: 16px;
    padding: 1.8rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.wp-block-post:hover {
    transform: translateY(-4px);
    border-color: rgba(255,0,0,0.3);
}

/* --- Citations, encadrés, code --- */
blockquote, .wp-block-quote {
    border-left: 4px solid #ff0000;
    background: rgba(255,0,0,0.05);
    padding: 1rem 1.4rem;
    border-radius: 8px;
    color: #ddd;
}

code, pre, .wp-block-code {
    background: rgba(255,255,255,0.06);
    color: #ffb3b3;
    border-radius: 8px;
}

pre, .wp-block-code { padding: 1rem 1.2rem; overflow-x: auto; }

hr, .wp-block-separator { border-color: rgba(255,0,0,0.25); }

/* --- Tableaux --- */
table th { color: #fff; border-bottom: 1px solid rgba(255,0,0,0.25); }
table td { color: #ccc; border-bottom: 1px solid rgba(255,255,255,0.08); }

/* --- Formulaires (recherche, commentaires) --- */
input[type="text"], input[type="search"], input[type="email"],
input[type="url"], textarea, select {
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 16px; /* empêche le zoom automatique sur iOS */
}

input:focus, textarea:focus, select:focus {
    border-color: #ff0000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,0,0,0.2);
}

::placeholder { color: rgba(255,255,255,0.4); }

/* --- Boutons --- */
.wp-block-button__link,
button, input[type="submit"] {
    background: linear-gradient(135deg, #ff0000, #cc0000) !important;
    color: #fff !important;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wp-block-button__link:hover,
button:hover, input[type="submit"]:hover {
    background: linear-gradient(135deg, #ff1a1a, #e60000) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,0,0,0.3);
}

/* --- Accessibilité --- */
*:focus-visible { outline: 2px solid #ff0000; outline-offset: 2px; }

/* --- Mobile --- */
@media (max-width: 768px) {
    .wp-block-post { padding: 1.3rem; }
    p, li { font-size: 0.95rem; }
    /* Cibles tactiles : minimum 44px */
    footer.wp-block-template-part a,
    .wp-block-navigation a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}
