/*
 Theme Name: Club Jasmin
 Theme URI: https://clubjasmin.fr
 Description: A child theme of Twenty Twenty-Five for the Club Jasmin café associatif.
 Author: Misha Verhamme
 Author URI: https://clubjasmin.fr
 Template: twentytwentyfive
 Version: 2.0
 Text Domain: clubjasmin
*/

/* Import parent theme styles */
@import url("../twentytwentyfive/style.css");

/* ============================================
   CLUB JASMIN THEME - CULTURAL CAFÉ STYLING
   Responsive design for all screen sizes
   ============================================ */

/* --- CSS Variables for Easy Customization --- */
:root {
    --cj-dark: #1b1512;           /* Deep brownish black */
    --cj-darker: #120d0a;          /* Darker background */
    --cj-cream: #f5e3c8;           /* Warm cream text */
    --cj-gold: #d6a85b;            /* Soft gold */
    --cj-gold-light: #e2b76f;     /* Light gold */
    --cj-copper: #c57b57;          /* Warm copper-red accent */
    --cj-copper-light: #d89a7a;   /* Light copper */
    --cj-brown: #a58a6d;           /* Muted brown */
    --cj-border: rgba(214, 168, 91, 0.2);
    --cj-border-light: rgba(214, 168, 91, 0.1);
    --cj-shadow: rgba(0, 0, 0, 0.3);
    --cj-transition: all 0.3s ease;
    --wpforms-label-color: var(--cj-gold);
    --wpforms-label-sublabel-color: var(--cj-gold-light);
}

/* --- Base Styles --- */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--cj-dark);
    color: var(--cj-cream);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: "Playfair Display", "Cormorant Garamond", serif;
    color: var(--cj-gold);
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
}

h4, h5, h6 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: 1.5rem;
    font-size: clamp(1rem, 2vw, 1.125rem);
}

/* --- Post Title --- */
.wp-block-post-title {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

/* --- Links --- */
a {
    color: var(--cj-copper);
    text-decoration: none;
    transition: var(--cj-transition);
    border-bottom: 1px solid transparent;
}

a:hover,
a:focus {
    color: var(--cj-gold-light);
    border-bottom-color: var(--cj-gold-light);
}

a:active {
    color: var(--cj-gold);
}

/* --- Buttons --- */
.wp-element-button,
button,
.wp-block-button__link,
input[type="submit"],
input[type="button"] {
    background: linear-gradient(135deg, var(--cj-copper) 0%, var(--cj-copper-light) 100%);
    color: var(--cj-dark);
    border: none;
    border-radius: 8px;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--cj-transition);
    box-shadow: 0 4px 15px rgba(197, 123, 87, 0.3);
    display: inline-block;
    text-align: center;
    font-family: "Inter", sans-serif;
}

.wp-element-button:hover,
button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: linear-gradient(135deg, var(--cj-gold-light) 0%, var(--cj-gold) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 183, 111, 0.4);
    color: var(--cj-dark);
}

.wp-element-button:active,
button:active,
.wp-block-button__link:active {
    transform: translateY(0);
}

/* --- Header & Navigation --- */
.wp-block-site-title,
.site-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.wp-block-site-title a,
.site-title a {
    color: var(--cj-gold);
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--cj-transition);
}

.wp-block-site-title a:hover,
.site-title a:hover {
    color: var(--cj-gold-light);
}

/* --- Hero/Cover Blocks --- */
.wp-block-cover {
    background-color: var(--cj-darker);
    background-blend-mode: multiply;
    color: var(--cj-cream);
    text-align: center;
    padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2rem);
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-block-cover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(27, 21, 18, 0.7) 0%, rgba(18, 13, 10, 0.9) 100%);
    z-index: 1;
}

.wp-block-cover > * {
    position: relative;
    z-index: 2;
}

.wp-block-cover h1,
.wp-block-cover h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--cj-gold-light);
    text-shadow: 2px 2px 8px var(--cj-shadow);
    margin-bottom: 1.5rem;
}

.wp-block-cover p {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 4px var(--cj-shadow);
}

/* --- Section Styling --- */
.wp-block-group {
    padding: clamp(1rem, 3vw, 2rem) clamp(1.5rem, 4vw, 2rem);
    border-top: 1px solid var(--cj-border);
    position: relative;
}

.wp-block-group.has-background {
    border: none;
    border-radius: 12px;
    margin: 2rem 0;
}

.wp-block-group:first-child {
    border-top: none;
}

/* --- Columns & Layouts --- */
.wp-block-columns {
    gap: clamp(1.5rem, 4vw, 3rem);
    margin-bottom: 2rem;
}

.wp-block-column {
    padding: 1rem;
}

/* --- Images --- */
.wp-block-image img,
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--cj-shadow);
    transition: var(--cj-transition);
}

.wp-block-image:hover img,
img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px var(--cj-shadow);
}

/* --- Blog Post Images - Natural Aspect Ratio --- */
/* Images stretch to container width but maintain natural aspect ratio */
.wp-block-post-content .wp-block-image img,
.wp-block-post-content .wp-block-image figure img,
.wp-block-post-content img,
.wp-block-post-featured-image img,
.wp-block-post-featured-image figure img,
article .wp-block-image img,
article .wp-block-image figure img,
article img,
.single-post .wp-block-image img,
.single-post .wp-block-image figure img,
.single-post img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: unset !important;
    object-fit: unset !important;
    display: block;
}

/* Ensure figure containers don't constrain images */
.wp-block-post-content .wp-block-image,
.wp-block-post-content figure,
.wp-block-post-featured-image,
.wp-block-post-featured-image figure,
article .wp-block-image,
article figure {
    width: 100%;
    max-width: 100%;
    display: block;
    margin: 2rem 0;
    clear: both;
}

/* Featured image should also stretch to full width with natural aspect ratio */
.wp-block-post-featured-image {
    aspect-ratio: unset !important;
}

.wp-block-post-featured-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: unset !important;
    object-fit: unset !important;
}

/* --- Footer --- */
footer,
.wp-block-template-part[data-area="footer"] {
    display: none;
    background: linear-gradient(180deg, var(--cj-darker) 0%, var(--cj-dark) 100%);
    color: var(--cj-brown);
    text-align: center;
    padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 4vw, 2rem);
    font-size: clamp(0.875rem, 2vw, 1rem);
    border-top: 2px solid var(--cj-border);
    margin-top: 2rem;
}

footer a,
.wp-block-template-part[data-area="footer"] a {
    color: var(--cj-copper);
}

footer a:hover,
.wp-block-template-part[data-area="footer"] a:hover {
    color: var(--cj-gold-light);
}

/* --- Decorative Elements --- */
.clubjasmin-frame {
    border: 2px solid var(--cj-border);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    position: relative;
    border-radius: 8px;
    background: rgba(27, 21, 18, 0.5);
    margin: 2rem 0;
}

.clubjasmin-frame::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid var(--cj-border-light);
    border-radius: 4px;
    pointer-events: none;
}

/* --- Cards & Blocks --- */
.wp-block-card,
.wp-block-group.has-background {
    background: rgba(27, 21, 18, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--cj-border);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--cj-transition);
}

.wp-block-card:hover,
.wp-block-group.has-background:hover {
    border-color: var(--cj-gold);
    box-shadow: 0 8px 25px rgba(214, 168, 91, 0.2);
}

/* --- Lists --- */
ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

/* --- Quotes --- */
.wp-block-quote,
blockquote {
    border-left: 4px solid var(--cj-gold);
    padding-left: 2rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--cj-cream);
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
}

.wp-block-quote cite,
blockquote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    color: var(--cj-gold);
    font-size: 0.9em;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(27, 21, 18, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

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

th {
    background: var(--cj-darker);
    color: var(--cj-gold);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.05em;
}

tr:hover {
    background: rgba(214, 168, 91, 0.1);
}

/* --- Forms --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: rgba(27, 21, 18, 0.7);
    border: 2px solid var(--cj-border);
    border-radius: 8px;
    color: var(--cj-cream);
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    transition: var(--cj-transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--cj-gold);
    background: rgba(27, 21, 18, 0.9);
    box-shadow: 0 0 0 3px rgba(214, 168, 91, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: var(--cj-brown);
    opacity: 0.7;
}

/* --- WPForms Styling --- */
.wpforms-field-label {
    color: var(--cj-gold);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    display: block;
}

.wpforms-field-container {
    color: var(--cj-cream);
}

/* --- Contact Form Styling --- */
.contact-form {
    color: var(--cj-cream);
}

/* --- Separators --- */
.wp-block-separator,
hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cj-gold), transparent);
    margin: 3rem 0;
}

/* --- Spacer Blocks --- */
.wp-block-spacer {
    margin: 0;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* --- Mobile Base (up to 480px) --- */
@media screen and (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .wp-block-cover {
        padding: 2rem 1rem;
        min-height: 50vh;
    }
    
    .wp-block-group {
        padding: 1rem;
    }
    
    .wp-block-columns {
        flex-direction: column;
    }
    
    .wp-block-column {
        padding: 0.5rem 0;
    }
    
    .wp-element-button,
    button,
    .wp-block-button__link {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        display: block;
        text-align: center;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
}

/* --- Small Tablets (481px to 768px) --- */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .wp-block-cover {
        padding: 2.5rem 1.5rem;
    }
    
    .wp-block-group {
        padding: 1.5rem 1.5rem;
    }
    
    .wp-block-columns {
        gap: 2rem;
    }
}

/* --- Tablets (769px to 1024px) --- */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .wp-block-cover {
        padding: 3rem 2rem;
    }
    
    .wp-block-group {
        padding: 2rem 2rem;
    }
}

/* --- Desktop (1025px and up) --- */
@media screen and (min-width: 1025px) {
    .wp-block-cover {
        padding: 3rem 2rem;
    }
    
    .wp-block-group {
        padding: 2rem 2rem;
    }
    
    /* Container max-width for readability */
    .wp-block-group:not(.alignfull) {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- Large Desktop (1440px and up) --- */
@media screen and (min-width: 1440px) {
    .wp-block-group:not(.alignfull) {
        max-width: 1400px;
    }
}

/* --- Landscape Mobile Optimization --- */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .wp-block-cover {
        min-height: 70vh;
        padding: 2rem 2rem;
    }
}

/* --- Print Styles --- */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .wp-element-button,
    button {
        display: none;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* --- Accessibility Improvements --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--cj-gold);
    outline-offset: 2px;
}

/* --- High Contrast Mode Support --- */
@media (prefers-contrast: high) {
    :root {
        --cj-border: rgba(214, 168, 91, 0.5);
        --cj-border-light: rgba(214, 168, 91, 0.3);
    }
    
    .wp-block-group {
        border-top-width: 2px;
    }
}

/* --- Dark Mode Support (if user prefers) --- */
@media (prefers-color-scheme: light) {
    /* Keep dark theme as default for café aesthetic */
    /* This can be customized if needed */
}

/* --- Smooth Scrolling --- */
html {
    scroll-behavior: smooth;
}

/* --- Loading States --- */
img {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* --- Utility Classes --- */
.clubjasmin-text-center {
    text-align: center;
}

.clubjasmin-text-gold {
    color: var(--cj-gold);
}

.clubjasmin-bg-dark {
    background-color: var(--cj-darker);
    padding: 2rem;
    border-radius: 8px;
}

/* --- Oriental/Cultural Accents --- */
.clubjasmin-ornament {
    position: relative;
    padding: 2rem 0;
}

.clubjasmin-ornament::before,
.clubjasmin-ornament::after {
    content: "✦";
    color: var(--cj-gold);
    font-size: 1.5rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.5;
}

.clubjasmin-ornament::before {
    top: 0;
}

.clubjasmin-ornament::after {
    bottom: 0;
}
