/* ================================================================
   Ad Loca! — Main Stylesheet
   Design: turquoise / vert lime / gris foncé, police Lexend
   ================================================================ */

:root {
    --primary: #7bcff3;
    --primary-dark: #5ab8e0;
    --primary-light: #e9f9fc;
    --accent: #b0f56e;
    --accent-dark: #8fd44e;
    --red: #f53c3c;
    --red-dark: #d32f2f;
    --dark: #3c4a52;
    --dark-light: #5a6a72;
    --text-primary: #3c4a52;
    --text-secondary: #5a6a72;
    --text-muted: #8a959b;
    --bg-primary: #ffffff;
    --bg-secondary: #f1f1f1;
    --bg-alt: #fafafa;
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --success: #2e7d32;
    --success-bg: #e8f5e9;
    --error: #c62828;
    --error-bg: #ffebee;
    --warning: #f57f17;
    --warning-bg: #fff8e1;
    --info: #1565c0;
    --info-bg: #e3f2fd;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 5px;
    --radius-lg: 10px;
    --radius-xl: 50px;
    --font-family: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container-max: 1100px;
    --transition: 0.2s ease;

    /* Legacy aliases */
    --swiss-red: var(--red);
    --swiss-red-dark: var(--red-dark);
    --swiss-red-light: #ffe0e0;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Container ──────────────────────────────────────────── */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 800px; }
.container-xs { max-width: 480px; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    background: var(--bg-secondary);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--dark);
    text-decoration: none;
    line-height: 1.1;
}
.logo:hover { text-decoration: none; }
.logo-icon { display: none; }
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
}
.nav-link:hover { color: var(--primary-dark); text-decoration: none; }
.nav-user {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* ── Announcement banner ───────────────────────────────── */
.announcement-bar {
    background: var(--red);
    color: #fff;
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.announcement-bar a { color: #fff; text-decoration: underline; }
.announcement-bar .announcement-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary {
    background: var(--dark);
    color: #fff;
    border-color: var(--dark);
}
.btn-primary:hover {
    background: var(--dark-light);
    border-color: var(--dark-light);
}
.btn-accent {
    background: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
}
.btn-accent:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}
.btn-outline {
    background: transparent;
    color: var(--dark);
    border-color: var(--dark);
}
.btn-outline:hover {
    background: var(--dark);
    color: #fff;
}
.btn-sm { padding: 0.35rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-rounded { border-radius: var(--radius-xl); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
    background: var(--primary-light);
    color: var(--dark);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    left: -10%;
    bottom: -30%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(169,233,255,0.5) 0%, rgba(114,204,243,0.5) 57%);
    z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero h1 .highlight {
    background: linear-gradient(180deg, transparent 55%, var(--accent) 55%);
    padding: 0 4px;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 2rem;
    line-height: 1.5;
    font-weight: 300;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #d0efef;
    color: var(--dark);
    padding: 0.85rem 2rem;
    border-radius: var(--radius-xl);
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    transition: all var(--transition);
    border: 1px solid #d8f8f8;
    box-shadow: inset 0 2px 7px rgba(125,148,160,0.3), 0 0 4px rgba(125,148,160,0.3);
}
.hero-cta:hover {
    background: #bde5e5;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: inset 0 2px 7px rgba(125,148,160,0.3), 0 4px 12px rgba(0,0,0,0.1);
}
.hero-cta .cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
}
.hero .btn-primary {
    background: var(--primary);
    color: var(--dark);
    border-color: var(--primary);
    font-size: 1.1rem;
    padding: 0.8rem 2.5rem;
    border-radius: var(--radius-xl);
}
.hero .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ── Link cards (homepage) ─────────────────────────────── */
.link-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all var(--transition);
    min-height: 140px;
}
.link-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.link-card-green {
    background: var(--accent);
    color: var(--dark);
}
.link-card-dark {
    background: var(--dark);
    color: #fff;
}
.link-card-text {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    flex: 1;
}
.link-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: var(--radius);
    flex-shrink: 0;
    margin-left: 1rem;
}
.link-card-dark .link-card-arrow svg { color: var(--accent); }

/* ── Sections ───────────────────────────────────────────── */
.section { padding: 3rem 0; }
.section-alt { background: var(--bg-secondary); }
.section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-primary);
}
.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.page-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    font-weight: 300;
}

/* ── Steps grid (homepage) ──────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: box-shadow var(--transition);
}
.step-card:hover { box-shadow: var(--shadow-md); }
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--dark);
    font-size: 1.3rem;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 1rem;
}
.step-card h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.step-card p { color: var(--text-secondary); font-size: 0.95rem; font-weight: 300; }

/* ── Pricing ────────────────────────────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.pricing-grid-two {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    margin: 0 auto;
    align-items: stretch;
}
.pricing-grid-two .pricing-card {
    display: flex;
    flex-direction: column;
}
.pricing-grid-two .pricing-card ul {
    flex: 1;
}
.pricing-grid-two .pricing-card .btn {
    margin-top: auto;
}
.pricing-ttc { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.pricing-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: box-shadow var(--transition);
}
.pricing-card:hover { box-shadow: var(--shadow-md); }
.pricing-card-featured {
    border-color: var(--primary);
    border-width: 2px;
    position: relative;
}
.pricing-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.pricing-price { font-size: 2rem; font-weight: 800; color: var(--primary-dark); }
.pricing-desc { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.9rem; font-weight: 300; }
.pricing-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}
.pricing-card li {
    padding: 0.4rem 0;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-light);
}
.pricing-card li::before {
    content: '\2713';
    color: var(--success);
    margin-right: 0.5rem;
    font-weight: bold;
}

/* ── Enterprise CTA ────────────────────────────────────── */
.pricing-enterprise {
    margin-top: 2rem;
}
.pricing-enterprise-card {
    text-align: center;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}
.pricing-enterprise-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}
.pricing-enterprise-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}
.pricing-enterprise-card .btn {
    margin-top: 0.5rem;
}

/* ── Disclaimer / Info boxes ────────────────────────────── */
.disclaimer-box {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning);
    padding: 1.5rem;
    border-radius: var(--radius);
}
.disclaimer-box h3 { margin-bottom: 0.5rem; }
.disclaimer-box p { font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--text-secondary); font-weight: 300; }
.disclaimer-box p:last-child { margin-bottom: 0; }

.info-box {
    background: var(--info-bg);
    border-left: 4px solid var(--info);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.info-box-highlight {
    background: #ffe0e0;
    border-left-color: var(--red);
}
.info-box p { font-size: 0.95rem; margin-bottom: 0.25rem; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.alert-error { background: var(--error-bg); color: var(--error); border-left: 4px solid var(--error); }
.alert-success { background: var(--success-bg); color: var(--success); border-left: 4px solid var(--success); }

/* ── Result page ────────────────────────────────────────── */
.result-card {
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.result-eligible {
    background: #eafafd;
    border: 1px solid #d0efef;
}
.result-not-eligible {
    background: #ffebee;
    border: 2px solid var(--error);
}
.result-icon { font-size: 3rem; margin-bottom: 1rem; }
.result-eligible .result-icon { color: var(--success); }
.result-not-eligible .result-icon { color: var(--error); }
.result-card h2 { margin-bottom: 0.5rem; font-size: 1.4rem; }
.result-subtitle { color: var(--text-secondary); margin-bottom: 2rem; font-weight: 300; }

.result-details {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}
.result-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}
.result-row.result-separator {
    border-bottom: 1px solid var(--border-color);
    margin: 0.25rem 0;
    padding: 0;
}
.result-row.result-base {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-bottom: 0.25rem;
}
.result-row.result-base .result-value {
    font-weight: 500;
    font-style: italic;
}
.result-row.result-total {
    font-weight: 700;
    font-size: 1.05rem;
    padding-top: 0.75rem;
}
.result-row.result-highlight {
    font-weight: 700;
    color: var(--success);
    font-size: 1.1rem;
}
.result-row.result-highlight-secondary {
    font-weight: 600;
    color: var(--success);
    font-size: 0.95rem;
    padding-top: 0.25rem;
}
.result-row.result-highlight-warning {
    font-weight: 700;
    color: var(--warning);
    font-size: 1.1rem;
}
.result-row.result-highlight-warning-secondary {
    font-weight: 600;
    color: var(--warning);
    font-size: 0.95rem;
    padding-top: 0.25rem;
}
.result-label { color: var(--text-secondary); }
.result-value { font-weight: 600; }

.result-amount-box {
    max-width: 500px;
    margin: 1.5rem auto 0;
    text-align: left;
    background: #fff;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}
.result-amount-increase {
    border-color: var(--warning);
    background: var(--warning-bg);
}

.result-cta-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    text-align: center;
}

/* ── Warnings TH/IPC ──────────────────────────────────── */
.result-warning {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.4;
}
.result-warning p { margin: 0; }
.warning-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.2; }
.warning-medium {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning);
    color: #5d4037;
}
.warning-high {
    background: #fff3e0;
    border-left: 4px solid #e65100;
    color: #bf360c;
}

/* ── Deadlines / Échéancier ────────────────────────────── */
.deadlines-section {
    margin-top: 2rem;
    text-align: left;
}
.deadlines-section h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}
.deadlines-intro {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 300;
}
.deadlines-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.deadline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.deadline-item.deadline-past {
    opacity: 0.5;
    text-decoration: line-through;
}
.deadline-item.deadline-active {
    border: 2px solid var(--primary);
    background: var(--primary-light);
}
.deadline-term {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}
.deadline-badge {
    background: var(--primary);
    color: var(--dark);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.deadline-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.deadline-adjusted {
    font-size: 0.8rem;
    color: var(--warning);
    font-style: italic;
}
.deadline-countdown { font-weight: 600; white-space: nowrap; }
.countdown-past { color: var(--text-muted); }
.countdown-critical { color: var(--error); font-weight: 700; }
.countdown-urgent { color: #e65100; }
.countdown-soon { color: var(--warning); }
.countdown-ok { color: var(--success); }

.deadlines-holidays {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.deadlines-holidays summary {
    cursor: pointer;
    font-weight: 500;
}
.deadlines-holidays ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    list-style: disc;
}
.deadlines-holidays li { padding: 0.15rem 0; }

.result-cta-box p { margin-bottom: 1rem; }

/* ── Legal content ──────────────────────────────────────── */
.legal-content h2 { font-size: 1.2rem; margin: 2rem 0 0.5rem; color: var(--text-primary); }
.legal-content h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.legal-content p { margin-bottom: 0.75rem; color: var(--text-secondary); font-weight: 300; }
.legal-content ul { margin: 0.5rem 0 1rem 1.5rem; color: var(--text-secondary); }
.legal-content li { margin-bottom: 0.25rem; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 3rem 0 0;
    margin-top: auto;
}
.footer-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
}
.footer-col h4 { color: var(--dark); margin-bottom: 0.75rem; font-size: 1rem; font-weight: 700; }
.footer-col a { display: block; color: var(--text-secondary); padding: 0.2rem 0; font-size: 0.9rem; }
.footer-col a:hover { color: var(--dark); }
.footer-brand { color: var(--dark); font-weight: 900; font-size: 1.1rem; margin-bottom: 0.5rem; }
.footer-text { font-size: 0.85rem; line-height: 1.5; font-weight: 300; }
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.85rem;
}
.footer-socials {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    color: var(--dark);
    transition: all var(--transition);
}
.footer-social-icon:hover {
    background: var(--primary);
    color: #fff;
}

/* ── Loading ────────────────────────────────────────────── */
.loading-overlay {
    text-align: center;
    padding: 3rem;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utilities ──────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.5rem; }
    .hero { padding: 2.5rem 0; }
    .steps-grid, .pricing-grid, .footer-inner {
        grid-template-columns: 1fr;
    }
    .link-cards { grid-template-columns: 1fr; }
    .main-nav { display: none; }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 1rem 1.5rem;
        border-bottom: 2px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
    .mobile-menu-toggle { display: block; }
    .section-title { font-size: 1.4rem; }
}
