/* ===== RESET ET BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* New color scheme based on logo */
    --primary-orange: #FF8829;
    --primary-lime: #8ED02B;
    --darker-green: #5F9E31;
    --white: #FFFFFF;
    --dark-gray: #333333;
    --light-gray: #f8f9fa;
    --text-gray: #666666;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --overlay: rgba(0, 0, 0, 0.6);
    --tools-bg: #fefefe;
    --tool-category-bg: #f8fdf0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ===== TYPOGRAPHIE ===== */
h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    text-align: center;
    margin-bottom: 2rem;
    color: var(--darker-green);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-lime), var(--primary-orange));
    border-radius: 2px;
}

h3 {
    font-size: 1.4rem;
    color: var(--darker-green);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-gray);
}

/* ===== LAYOUT ET CONTENEUR ===== */
.container {
    width: min(100% - 2rem, 1200px);
    margin-inline: auto;
}

/* ===== EN-TÊTE ET NAVIGATION ===== */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: auto;
    border-bottom: 2px solid var(--primary-lime);
}

header .container {
    padding: 0 1rem;
}

/* Logo and navigation wrapper - FIXED FOR SINGLE LINE */
.logo-nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2rem;
    padding: 0.5rem 0;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

nav {
    flex-shrink: 1;
}

nav ul {
    display: flex;
    list-style: none;
    gap: clamp(1rem, 2vw, 1.5rem);
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

nav a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-lime), var(--primary-orange));
    transition: width 0.3s ease;
    border-radius: 2px;
}

nav a:hover::after,
nav a:focus::after {
    width: 100%;
}

nav a:hover {
    color: var(--darker-green);
}

/* ===== SECTION HERO ===== */
.hero {
    background-image: 
        linear-gradient(var(--overlay), var(--overlay)), 
        url('andre-motoculture-09.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    text-align: center;
    padding: clamp(4rem, 8vw, 8rem) 1rem;
    position: relative;
}

.hero h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero h2::after {
    background: linear-gradient(90deg, var(--white), var(--primary-orange));
    width: 80px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    margin-bottom: 2rem;
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ===== BOUTONS ===== */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    min-height: 44px;
}

.btn-primary {
    background-color: var(--primary-orange);
    color: var(--white);
    border-color: var(--primary-orange);
    box-shadow: 0 4px 15px rgba(255, 136, 41, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #e67a22;
    border-color: #e67a22;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 136, 41, 0.4);
}

.btn-secondary {
    background-color: var(--primary-lime);
    color: var(--dark-gray);
    border-color: var(--primary-lime);
    box-shadow: 0 4px 15px rgba(142, 208, 43, 0.3);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #7ebd26;
    border-color: #7ebd26;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(142, 208, 43, 0.4);
}

/* Button loading state */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.button-loading {
    font-style: italic;
}

/* ===== SECTIONS ===== */
section {
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.services,
.pricing {
    background-color: var(--light-gray);
}

.tools {
    background-color: var(--tools-bg);
}

/* ===== GRILLES ===== */
.services-grid,
.pricing-grid,
.contact-grid,
.tools-grid {
    display: grid;
    gap: 2rem;
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    max-width: 800px;
    margin-inline: auto;
}

.contact-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    max-width: 1000px;
    margin-inline: auto;
}

.tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* ===== CARTES ===== */
.service-card,
.pricing-card {
    background: var(--white);
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary-lime);
    position: relative;
    overflow: hidden;
}

.service-card::before,
.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-lime), var(--primary-orange));
}

.service-card:hover,
.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pricing-card {
    border: 2px solid var(--primary-lime);
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-orange);
    margin: 1rem 0;
}

.pricing-card ul {
    list-style: none;
    text-align: left;
}

.pricing-card li {
    padding: 0.3rem 0;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-card li::before {
    content: "✓";
    color: var(--primary-lime);
    font-weight: bold;
    flex-shrink: 0;
}

.pricing-note {
    text-align: center;
    font-style: italic;
    margin-top: 2rem;
    color: var(--text-gray);
    padding: 1rem;
    background: rgba(255, 136, 41, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--primary-orange);
}

/* ===== SECTION ABOUT ===== */
.travel-fee {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(142, 208, 43, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--primary-lime);
    font-size: 1.1rem;
}

/* ===== SECTION OUTILS ===== */
.tools-intro {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin-inline: auto;
    margin-bottom: 2rem;
}

.tool-category {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--primary-orange);
    position: relative;
    overflow: hidden;
}

.tool-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-lime), var(--primary-orange));
}

.tool-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.tool-category h3 {
    margin-bottom: 1rem;
    color: var(--darker-green);
    font-size: 1.2rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.tool-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.tool-item {
    background: var(--tool-category-bg);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--dark-gray);
    border: 1px solid #e8f5d6;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tool-item:hover {
    background: linear-gradient(135deg, var(--primary-lime), var(--darker-green));
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(142, 208, 43, 0.3);
}

.tools-note {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-lime);
}

.tools-note p {
    margin-bottom: 0;
    font-weight: 500;
}

/* ===== SECTION CONTACT ===== */
.contact-info address p {
    margin-bottom: 1.5rem;
}

/* ===== CLICKABLE ADDRESS STYLING ===== */
.address-link {
    color: var(--darker-green);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.3rem 0;
    border-radius: 4px;
    position: relative;
}

.address-link::after {
    content: '🗺️';
    margin-left: 0.5rem;
    font-size: 0.9em;
}

.address-link:hover,
.address-link:focus {
    color: var(--primary-orange);
    text-decoration: underline;
    background-color: rgba(142, 208, 43, 0.1);
    padding: 0.3rem 0.5rem;
    transform: translateY(-1px);
}

.address-link:active {
    transform: translateY(0);
}

.contact-info a {
    color: var(--darker-green);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.contact-info a:hover,
.contact-info a:focus {
    color: var(--primary-orange);
    text-decoration: underline;
}

.opening-hours ul {
    list-style: none;
}

.opening-hours li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    gap: 1rem;
}

/* ===== CONTACT FORM STYLES ===== */
.contact-form-container {
    background: var(--white);
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-orange);
    position: relative;
    overflow: hidden;
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-lime), var(--primary-orange));
}

.contact-form-container h3 {
    margin-top: 0;
    color: var(--darker-green);
    font-size: 1.4rem;
}

.contact-form-container p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-lime);
    box-shadow: 0 0 0 2px rgba(142, 208, 43, 0.2);
    background-color: var(--white);
}

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

.form-group button {
    align-self: flex-start;
    margin-top: 0.5rem;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
}

.form-note {
    font-size: 0.85rem;
    color: var(--text-gray);
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Success/error states for form validation */
.form-group input:invalid:not(:focus):not(:placeholder-shown),
.form-group select:invalid:not(:focus),
.form-group textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.05);
}

.form-group input:valid:not(:focus):not(:placeholder-shown),
.form-group select:valid:not(:focus),
.form-group textarea:valid:not(:focus):not(:placeholder-shown) {
    border-color: var(--primary-lime);
}

/* ===== FORM SUCCESS MESSAGE ===== */
.form-success-message {
    background: var(--white);
    padding: clamp(2rem, 4vw, 3rem);
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border-left: 4px solid var(--primary-lime);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.form-success-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-lime), var(--primary-orange));
}

.success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-lime), var(--darker-green));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
    animation: bounceIn 0.6s ease-out;
}

.form-success-message h4 {
    color: var(--darker-green);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.form-success-message p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-gray);
}

/* Form transition */
#contact-form {
    transition: opacity 0.3s ease;
}

/* ===== SECTION LOGO DU BAS ===== */
.bottom-logo-section {
    background: linear-gradient(135deg, var(--primary-lime), var(--darker-green));
    padding: clamp(2rem, 4vw, 3rem) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bottom-logo-section::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 100 100" width="100" height="100" opacity="0.1"><path d="M30,30 L70,30 L70,70 L30,70 Z" fill="white"/></svg>') repeat;
}

.bottom-logo {
    height: clamp(80px, 15vw, 150px);
    width: auto;
    max-width: min(400px, 90vw);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.bottom-logo:hover {
    transform: scale(1.05);
}

/* ===== PIED DE PAGE ===== */
footer {
    background: linear-gradient(135deg, var(--darker-green), #4a7a28);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

footer p {
    color: var(--white);
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* ===== WEBSITE CREDIT STYLES ===== */
.website-credit {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    margin-bottom: 0;
    text-align: center;
}

.website-credit a {
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.website-credit a:hover,
.website-credit a:focus {
    color: var(--primary-lime);
    text-decoration: underline;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== DESIGN RESPONSIVE ===== */

/* Mobile First Approach */
@media (max-width: 768px) {
    .logo-nav-wrapper {
        gap: 1rem;
        padding: 0.25rem 0;
    }

    .logo img {
        height: 40px;
    }

    nav ul {
        gap: 0.8rem;
    }

    nav a {
        font-size: 0.85rem;
        padding: 0.3rem 0.2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: min(100%, 250px);
    }
    
    .bottom-logo {
        width: 90%;
        max-width: 400px;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    .tool-items {
        gap: 0.5rem;
    }

    .tool-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    /* Contact form responsive */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form-container {
        order: -1; /* Put form first on mobile */
    }

    /* Success message responsive */
    .form-success-message {
        padding: 1.5rem;
    }
    
    .success-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .form-success-message h4 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .logo-nav-wrapper {
        gap: 0.5rem;
    }

    .logo img {
        height: 35px;
    }

    nav ul {
        gap: 0.6rem;
    }

    nav a {
        font-size: 0.8rem;
    }

    .service-card,
    .pricing-card {
        padding: 1.25rem;
    }

    .tool-category {
        padding: 1rem;
    }

    .contact-form-container {
        padding: 1.25rem;
    }

    .form-success-message {
        padding: 1.25rem;
    }
}

/* Very small screen adjustment */
@media (max-width: 360px) {
    .logo img {
        height: 30px;
    }
    
    nav a {
        font-size: 0.75rem;
        padding: 0.2rem;
    }
    
    nav ul {
        gap: 0.3rem;
    }

    .form-success-message {
        padding: 1rem;
    }

    .success-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Desktop Enhancements */
@media (min-width: 769px) {
    header {
        min-height: 100px;
    }

    .logo img {
        height: 80px;
    }

    .hero {
        background-attachment: fixed;
    }
}

@media (min-width: 1200px) {
    header {
        min-height: 120px;
    }

    .logo img {
        height: 100px;
    }
}

/* ===== ACCESSIBILITÉ ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .logo img:hover,
    .bottom-logo:hover {
        transform: none;
    }

    .hero {
        background-attachment: scroll;
    }

    .form-success-message,
    .success-icon {
        animation: none;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* Mode sombre respectueux */
@media (prefers-color-scheme: dark) {
    .service-card,
    .pricing-card {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    .service-card p,
    .pricing-card p,
    .pricing-card li {
        color: #e0e0e0;
    }

    .tools {
        background: #1a1a1a;
    }

    .tool-category {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .tool-item {
        background: #333;
        color: #e0e0e0;
    }

    .contact-form-container {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .form-group label {
        color: #e0e0e0;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        background-color: #333;
        color: #e0e0e0;
        border-color: #555;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        background-color: #3a3a3a;
    }

    .form-success-message {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .form-success-message h4 {
        color: #e0e0e0;
    }

    .form-success-message p {
        color: #cccccc;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    :root {
        --primary-orange: #cc5500;
        --primary-lime: #66aa00;
        --darker-green: #226600;
        --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
}
