/*
 Theme Name:   Robot Piscines
 Theme URI:    https://robot-piscines.com
 Description:  Theme enfant GeneratePress pour Robot Piscines
 Author:       Robot Piscines
 Author URI:   https://robot-piscines.com
 Template:     generatepress
 Version:      1.0.0
 Text Domain:  robot-piscines
*/

/* --- Variables & Base --- */
:root {
    --rp-primary: #0369A1;
    --rp-primary-dark: #075985;
    --rp-accent: #06B6D4;
    --rp-accent-hover: #0891B2;
    --rp-warm: #F59E0B;
    --rp-text: #0f172a;
    --rp-text-muted: #64748b;
    --rp-bg: #ffffff;
    --rp-bg-light: #f0f9ff;
    --rp-border: #e2e8f0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--rp-text);
    -webkit-font-smoothing: antialiased;
}

/* --- Header --- */
.rp-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rp-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rp-header-inner {
    max-width: 1152px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 1rem;
}

.rp-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.rp-logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--rp-primary), var(--rp-accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-logo-icon svg {
    width: 22px;
    height: 22px;
    color: white;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rp-logo-text {
    display: flex;
    flex-direction: column;
}

.rp-logo-text .name {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--rp-primary);
}

.rp-logo-text .sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--rp-text-muted);
}

.rp-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rp-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
}

.rp-nav a:hover {
    color: var(--rp-accent);
}

.rp-header-cta .rp-btn {
    padding: 8px 18px;
}

.rp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    gap: 6px;
}

.rp-btn-accent {
    background: linear-gradient(135deg, var(--rp-accent), var(--rp-primary));
    color: white;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.rp-btn-accent:hover {
    background: linear-gradient(135deg, var(--rp-accent-hover), var(--rp-primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
    transform: translateY(-1px);
}

.rp-btn-outline {
    background: transparent;
    border: 2px solid var(--rp-border);
    color: var(--rp-text);
}

.rp-btn-outline:hover {
    border-color: var(--rp-accent);
    color: var(--rp-accent);
    background: rgba(6, 182, 212, 0.05);
}

.rp-btn-white {
    background: white;
    color: var(--rp-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rp-btn-white:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    color: var(--rp-primary);
}

.rp-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.rp-nav-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--rp-text);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

@media (max-width: 768px) {
    .rp-nav, .rp-header-cta { display: none; }
    .rp-nav-toggle { display: block; }
    .rp-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        border-bottom: 1px solid var(--rp-border);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        gap: 0.75rem;
    }
}

/* --- Hero Section --- */
.rp-hero {
    background: linear-gradient(135deg, #0c4a6e 0%, #0369A1 50%, #0891B2 100%);
    padding: 5rem 1rem 4rem;
    position: relative;
    overflow: hidden;
}

.rp-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.rp-hero-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.rp-hero h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 1rem;
}

.rp-hero h1 span {
    color: var(--rp-accent);
}

.rp-hero-intro {
    color: rgba(255,255,255,0.8);
    font-size: 1.125rem;
    line-height: 1.7;
    margin: 0 0 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.rp-hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.rp-hero-trust {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.8125rem;
}

/* --- Features Grid --- */
.rp-features {
    padding: 5rem 1rem;
    background: var(--rp-bg-light);
}

.rp-features-inner {
    max-width: 1152px;
    margin: 0 auto;
}

.rp-features h2 {
    text-align: center;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--rp-primary);
    margin: 0 0 0.5rem;
}

.rp-features-sub {
    text-align: center;
    color: var(--rp-text-muted);
    margin: 0 0 3rem;
    font-size: 1.0625rem;
}

.rp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .rp-features-grid { grid-template-columns: 1fr; }
    .rp-hero h1 { font-size: 1.75rem; }
}

.rp-feature-card {
    background: white;
    border: 1px solid var(--rp-border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
}

.rp-feature-card:hover {
    border-color: var(--rp-accent);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.1);
    transform: translateY(-2px);
}

.rp-feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(6,182,212,0.1), rgba(3,105,161,0.1));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.rp-feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--rp-accent);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.rp-feature-card h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--rp-primary);
    margin: 0 0 0.5rem;
}

.rp-feature-card p {
    font-size: 0.875rem;
    color: var(--rp-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* --- CTA Banner --- */
.rp-cta {
    background: linear-gradient(135deg, var(--rp-primary) 0%, #0891B2 100%);
    text-align: center;
    padding: 5rem 1rem;
}

.rp-cta-inner {
    max-width: 700px;
    margin: 0 auto;
}

.rp-cta h2 {
    color: white;
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.rp-cta > .rp-cta-inner > p:first-of-type {
    color: rgba(255,255,255,0.7);
    font-size: 1.125rem;
    margin: 0 0 2rem;
}

.rp-cta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.rp-cta-sub {
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    margin: 0;
}

/* --- Footer --- */
.rp-footer {
    background: #0c4a6e;
    color: white;
}

.rp-footer-inner {
    max-width: 1152px;
    margin: 0 auto;
    padding: 4rem 1rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 768px) {
    .rp-footer-inner { grid-template-columns: 1fr; }
}

.rp-footer-brand p {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

.rp-footer-col h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.8);
    margin: 0 0 1rem;
}

.rp-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rp-footer-col ul li {
    margin-bottom: 0.75rem;
}

.rp-footer-col ul a {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.rp-footer-col ul a:hover {
    color: var(--rp-accent);
}

.rp-footer-bottom {
    max-width: 1152px;
    margin: 0 auto;
    padding: 2rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
}

.rp-footer-bottom p { margin: 0; }

@media (max-width: 640px) {
    .rp-footer-bottom { flex-direction: column; gap: 0.5rem; }
}

/* --- Content area --- */
.site-content {
    max-width: 1152px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* --- Contact form --- */
.rp-contact-form .form-group { margin-bottom: 1.25rem; }
.rp-contact-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.875rem; color: var(--rp-primary); }
.rp-contact-form input,
.rp-contact-form textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--rp-border); border-radius: 8px; font-size: 0.9375rem; transition: border-color 0.2s; box-sizing: border-box; }
.rp-contact-form input:focus,
.rp-contact-form textarea:focus { outline: none; border-color: var(--rp-accent); box-shadow: 0 0 0 3px rgba(6,182,212,0.1); }

/* --- Legal pages --- */
.legal-content h2 { margin-top: 2.5em; padding-bottom: 0.5em; border-bottom: 1px solid var(--rp-border); }
.legal-date { color: var(--rp-text-muted); font-size: 0.875rem; }

/* --- Blog --- */
.entry-title a { color: var(--rp-primary); text-decoration: none; font-weight: 700; }
.entry-title a:hover { color: var(--rp-accent); }
.entry-content a { color: var(--rp-accent); }
.entry-content a:hover { color: var(--rp-accent-hover); }

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 { color: var(--rp-primary); font-weight: 700; }

/* --- WP Buttons --- */
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
    background: linear-gradient(135deg, var(--rp-accent), var(--rp-primary)) !important;
    color: white !important;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.2s;
}

.wp-block-button__link:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    box-shadow: 0 4px 12px rgba(6,182,212,0.3);
    transform: translateY(-1px);
}

/* --- Hide GP default header/footer --- */
.site-header, .site-footer { display: none !important; }
