/* Livrizi Theme — Custom styles */

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* ---- Highlighter inline format ---- */
.livrizi-highlight {
    background-color: #fff588;
    padding: 3px 8px;
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* ---- Step cards (Comment ça marche) ---- */
.livrizi-step-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.livrizi-step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Force equal-height columns for step cards */
.wp-block-columns:has(.livrizi-step-card) > .wp-block-column {
    align-self: stretch !important;
}

.wp-block-columns:has(.livrizi-step-card) > .wp-block-column > .livrizi-step-card {
    height: 100%;
}

/* ---- Comparison table (Pourquoi choisir) ---- */
.livrizi-comparison-table table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border-radius: 16px;
}

.livrizi-comparison-table th {
    padding: 20px 16px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9375rem;
    color: #3D3D3D;
    background: #FBF9F3;
    border-bottom: 2px solid #EDE8DA;
}

.livrizi-comparison-table th:first-child {
    border-top-left-radius: 16px;
}

.livrizi-comparison-table th:last-child {
    border-top-right-radius: 16px;
}

/* Livrizi column header — highlighted */
.livrizi-comparison-table th:nth-child(2) {
    background: #4D9E78;
    color: #ffffff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom-color: #3A7A5C;
}

.livrizi-comparison-table td {
    padding: 16px 16px;
    text-align: center;
    font-size: 0.9375rem;
    color: #777;
    border-bottom: 1px solid #EDE8DA;
}

.livrizi-comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.livrizi-comparison-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 16px;
}

.livrizi-comparison-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 16px;
}

.livrizi-comparison-table td:first-child {
    text-align: left;
    color: #3D3D3D;
    font-weight: 600;
}

/* Livrizi column values — green highlight */
.livrizi-comparison-table td:nth-child(2) {
    background: #E8FAF410;
    color: #4D9E78;
    font-weight: 700;
}

/* Subtle row hover */
.livrizi-comparison-table tbody tr {
    transition: background 0.15s;
}

.livrizi-comparison-table tbody tr:hover {
    background: #FBF9F3;
}

/* Fallback for general tables */
.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table th,
.wp-block-table td {
    padding: 12px 16px;
    text-align: center;
    font-size: 0.875rem;
    border-bottom: 1px solid #EDE8DA;
}

.wp-block-table th {
    font-weight: 600;
    color: #3D3D3D;
    background: #FBF9F3;
}

/* ---- Check list (Pourquoi choisir - USPs) ---- */
.livrizi-check-list {
    list-style: none;
    padding-left: 0;
}

.livrizi-check-list li {
    padding-left: 28px;
    position: relative;
}

.livrizi-check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4D9E78;
    font-weight: 700;
    font-size: 1rem;
}

/* ---- Exemples de livraison ---- */
/* Force inline colors to win over theme.json global text/heading styles */
.livrizi-exemples h2.has-text-color {
    color: #ffffff !important;
}

.livrizi-exemples p.has-text-color[style*="color:#FDFD03"] {
    color: #FDFD03 !important;
}

.livrizi-exemples p.has-text-color[style*="color:#ffffff"] {
    color: #ffffff !important;
}

/* Outline button override */
.livrizi-exemples .is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* Separators */
.livrizi-exemples .wp-block-separator {
    border: none;
    opacity: 1;
}

/* ---- Photo grid (Exemples de livraison) ---- */
.livrizi-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    border-radius: 16px;
    overflow: hidden;
}

.livrizi-photo-grid-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.livrizi-photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.livrizi-photo-grid-item:hover img {
    transform: scale(1.05);
}

/* Example cards hover */
.livrizi-example-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.livrizi-example-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Responsive: stack layout on mobile */
@media (max-width: 781px) {
    .livrizi-exemples .wp-block-columns {
        flex-direction: column !important;
    }

    .livrizi-photo-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 32px;
    }
}

/* ---- FAQ details styling ---- */
.wp-block-details {
    transition: box-shadow 0.2s;
}

.wp-block-details:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.wp-block-details summary {
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9375rem;
    color: #3D3D3D;
    list-style-type: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.wp-block-details summary::after {
    content: '+';
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 1.25rem;
    color: #4D9E78;
    font-weight: 400;
    border-radius: 50%;
    background: #E8FAF4;
    transition: transform 0.2s;
}

.wp-block-details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

.wp-block-details summary::-webkit-details-marker {
    display: none;
}

/* ---- Footer link styling ---- */
.wp-block-group[style*="background-color:#1A2E25"] a {
    color: #ffffffcc;
    text-decoration: none;
}

/* Footer brand: logo floated left next to slogan */
.livrizi-footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.livrizi-footer-logo {
    width: 70px;
    height: auto;
    flex-shrink: 0;
}

.livrizi-footer-brand p {
    color: #ffffffcc;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* Force footer text colors over theme.json global overrides */
.wp-block-group[style*="background-color:#1A2E25"] h3.has-text-color {
    color: #ffffff !important;
}

.wp-block-group[style*="background-color:#1A2E25"] p.has-text-color,
.wp-block-group[style*="background-color:#1A2E25"] ul.has-text-color {
    color: #ffffffcc !important;
}

.wp-block-group[style*="background-color:#1A2E25"] p.has-text-color[style*="color:#ffffff99"] {
    color: #ffffff99 !important;
}

.wp-block-group[style*="background-color:#1A2E25"] a:hover {
    color: #ffffff;
}

/* ---- Header CTA button hover ---- */
.wp-block-button__link {
    transition: opacity 0.2s, transform 0.15s;
}

.wp-block-button__link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ---- Devis instantane widget container ---- */
.wp-block-livrizi-booking-form {
    margin: 0 auto;
    max-width: 1100px;
}

/* Seamless white background: remove gap between hero and devis */
.wp-block-post-content > .wp-block-group.alignfull + .wp-block-group.alignfull {
    margin-top: 0 !important;
}

/* ---- Mobile adjustments ---- */
@media (max-width: 768px) {
    .wp-block-columns {
        flex-direction: column !important;
    }

    .livrizi-comparison-table {
        overflow-x: auto;
    }
}
