* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #116466;
    --primary-light: #1a8b8e;
    --primary-dark: #0d4d4f;
    --accent: #ffcb77;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --text: #333;
    --text-light: #666;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
}

/* Accessibility helpers */
.skip-link {
    position: absolute;
    left: -999px;
    top: -999px;
    background: #000;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    z-index: 1001;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* .logo i kept for backward compatibility if needed; no longer used */

/* Logo image support */
.logo img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    background: none;
    border: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,122.7C1248,107,1344,85,1392,74.7L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    color: white;
    z-index: 1;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero .tagline {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.4s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

/* Brand title composition: logo image + text */
.hero-title {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-logo {
    display: inline-block;
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin: 0;
}

/* Visually hidden but accessible text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.brand-tail {
    font-weight: 800;
    position: relative;
    top: -18px;
    left: -7px
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
}

/* Back-to-top button */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
}

.back-to-top i {
    font-size: 1.1rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity .3s ease, transform .3s ease, visibility 0s;
}

.back-to-top:hover {
    background: var(--primary-light);
}

.back-to-top:active {
    transform: translateY(0) scale(0.98);
}

.back-to-top:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none;
    }
}

/* Section Styles */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    position: relative;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(17, 100, 102, 0.2);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Compétences */
.competences {
    background: var(--light);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.skill-category h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 0.5rem 0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-list li::before {
    content: '✓';
    color: var(--primary);
    font-weight: bold;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(17, 100, 102, 0.2);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

/* Specific portfolio thumbnails */
.portfolio-image.placocompta {
    background: url('../img/placocompta.png') center / cover no-repeat;
}

.portfolio-image.usbuxy {
    background: url('../img/usbuxy/wallpaper.png') center / cover no-repeat;
}
.portfolio-image.mysteryvalley {
    background: url('../img/mysteryvalley/wallpaper.png') center / cover no-repeat;
}
.portfolio-image.createlier {
    background: url('../img/createlierdesbebes/wallpaper.png') center / cover no-repeat;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--accent);
    color: var(--dark);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.portfolio-item h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.portfolio-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Tarifs */
.tarifs {
    background: var(--light);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    border: 3px solid var(--primary);
    transform: scale(1.05);
}

.pricing-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(17, 100, 102, 0.2);
}

.pricing-card.featured:hover {
    transform: translateY(-10px) scale(1.07);
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pricing-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.pricing-price span {
    font-size: 1rem;
    color: var(--text-light);
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.8rem 0;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border-bottom: 1px solid #eee;
}

.pricing-features li i {
    color: var(--primary);
    margin-top: 0.2rem;
}

/* À propos */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h3 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.about-image {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(17, 100, 102, 0.2);
    border: 6px solid #fff;
    background: #eaeaea;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-caption {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    font-weight: 400;
    opacity: 0.65;
}

/* Contact */
.contact {
    background: var(--light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary);
}

.contact-item div h4 {
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Form status messages */
.form-status {
    margin-top: 1rem;
    font-size: 0.95rem;
}
.form-status.success {
    color: #1b8c3b; /* green */
}
.form-status.error {
    color: #b00020; /* red */
}

/* Disabled submit button feedback */
.btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Styled contact links */
.contact-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed rgba(17, 100, 102, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    padding: 0 0.1rem;
    border-radius: 4px;
}

.contact-link:hover {
    color: var(--primary-dark);
    background: rgba(255, 203, 119, 0.15);
    border-bottom-color: var(--primary);
    transform: translateY(-1px);
}

.contact-link:visited {
    color: var(--primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

/* Inline checkbox layout for consent */
.form-group.check-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.form-group.check-inline label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.form-group.check-inline input[type="checkbox"] {
    width: auto;
    padding: 0;
}

/* Ensure generic checkbox inputs don't get 100% width */
.form-group input[type="checkbox"] {
    width: auto;
}

.privacy-note {
    font-size: 0.9rem;
    color: var(--text-light);
}

.privacy-note a {
    color: var(--text-light);
    text-decoration: underline;
}

.privacy-note a:hover {
    color: var(--primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
}

/* Footer utility */
.footer-links {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.footer-links a {
    color: #fff;
    text-decoration: underline;
    opacity: 0.9;
}

.footer-links a:hover {
    color: var(--accent);
    opacity: 1;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-links.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .tagline {
        font-size: 1.3rem;
    }

    /* Hero logo: mobile-specific overrides can go here if needed */

    /* Visually hidden but accessible text */
    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .brand-tail {
        font-weight: 800;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .pricing-card.featured {
        transform: scale(1);
    }
}

/* Utilities extracted from inline styles */
.btn-block { width: 100%; }
.info-note { text-align: center; margin-top: 2rem; color: var(--text-light); }
.footer-subtext { font-size: 0.9rem; opacity: 0.8; margin-top: 0.5rem; }
.footer-micro { font-size: 0.85rem; opacity: 0.75; margin-top: 0.35rem; }
