
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --blue-mechanic: #2C99C6;
    --red-garage: #C1403D;
    --cream-vintage: #F5EDE1;
    --black-lettering: #1A1A1A;
    --gray-workshop: #6E6E6E;
    --gray-light: #E8E8E8;
}

/* Empêcher le scroll horizontal sur mobile */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

html {
    scroll-behavior: smooth;
    /* Empêcher le scroll horizontal sur iOS */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--black-lettering);
    background-color: #fff;
    /* Empêcher le scroll horizontal */
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    /* Empêcher le scroll horizontal sur iOS */
    touch-action: pan-y;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Anton', sans-serif;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* H2 optimisés pour lisibilité */
h2.section-title,
.section-title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.5px;
    margin-top: 60px;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    position: relative;
    max-width: 100%;
    word-wrap: break-word;
}

/* Barre décorative sous les H2 */
h2.section-title::after,
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #C1403D;
    margin: 16px auto 0 auto;
    border-radius: 2px;
}

/* H2 sur fond clair */
h2.section-title-light,
.section-title-light {
    color: #1A1A1A;
    text-shadow: none;
}

h2.section-title-light::after,
.section-title-light::after {
    background: #C1403D;
}

/* H2 sur fond sombre */
h2.section-title-dark,
.section-title-dark {
    color: #FFFFFF;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

h2.section-title-dark::after,
.section-title-dark::after {
    background: #C1403D;
}

/* H2 sur fond crème */
h2.section-title-cream,
.section-title-cream {
    color: #F5EDE1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

h2.section-title-cream::after,
.section-title-cream::after {
    background: #C1403D;
}

/* H2 alignés à gauche (pour atelier) */
h2.section-title[style*="text-align: left"]::after {
    margin-left: 0;
    margin-right: auto;
}

/* Responsive H2 */
@media (max-width: 768px) {
    h2.section-title,
    .section-title {
        font-size: 2rem;
        line-height: 1.15;
        margin-top: 40px;
        margin-bottom: 20px;
    }
    
    h2.section-title::after,
    .section-title::after {
        width: 50px;
        height: 3px;
        margin-top: 12px;
    }
}
/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--blue-mechanic);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red-garage);
}
/* CTA Styles */
.cta-primary {
    background-color: var(--red-garage);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cta-primary:hover {
    background-color: var(--blue-mechanic);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cta-secondary {
    border: 2px solid var(--blue-mechanic);
    color: var(--blue-mechanic);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background-color: var(--blue-mechanic);
    color: white;
}

/* Section backgrounds */
.section-cream {
    background-color: var(--cream-vintage);
}

.section-dark {
    background-color: var(--black-lettering);
    color: white;
}
/* Service cards */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid var(--gray-light);
    background: white;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--blue-mechanic);
}
/* Team member images */
.team-member-img {
    transition: all 0.5s ease;
    filter: grayscale(10%) brightness(1.05);
    object-fit: cover;
}

/* Cadrage spécifique pour Hugo - centrer sur la tête */
.team-member-card:first-child .team-member-img {
    object-position: center 15%;
    transform: scale(1.1);
}

/* Cadrage spécifique pour Constencio - centrer sur la tête */
.team-member-img-constencio {
    object-position: center 18% !important;
    transform: scale(1.25);
}

.team-member-card:last-child:hover .team-member-img-constencio {
    transform: scale(1.35);
}

.team-member-card:hover .team-member-img {
    filter: grayscale(0%) brightness(1.1);
    transform: scale(1.2);
}

/* Team member cards */
.team-member-card {
    position: relative;
    overflow: visible;
}

.team-member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(135deg, rgba(44, 153, 198, 0.3), rgba(193, 64, 61, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-member-card:hover::before {
    opacity: 1;
}

/* Horizontal rules */
.hr-stripes {
    height: 10px;
    background: linear-gradient(
        to right,
        var(--blue-mechanic) 33%,
        var(--cream-vintage) 33%,
        var(--cream-vintage) 66%,
        var(--red-garage) 66%
    );
    border: none;
    margin: 2rem 0;
}

/* Tool icons */
.tool-icon {
    color: var(--blue-mechanic);
    stroke-width: 2px;
}
/* Empêcher le dépassement horizontal sur tous les éléments */
* {
    box-sizing: border-box;
}

/* S'assurer que tous les conteneurs ne dépassent pas */
.container,
section,
div,
img,
iframe,
video,
embed,
object {
    max-width: 100%;
}

img,
iframe,
video,
embed,
object {
    height: auto;
    max-width: 100%;
}

/* Empêcher le scroll horizontal sur les sections */
section {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* S'assurer que les iframes ne causent pas de scroll horizontal */
iframe {
    width: 100%;
    max-width: 100%;
    border: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-content {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }

    .service-card {
        margin-bottom: 1.5rem;
    }

    .hero-garage {
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .opening-hours-card {
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Empêcher le scroll horizontal sur mobile */
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative;
    }
    
    /* S'assurer que tous les éléments respectent la largeur */
    * {
        max-width: 100%;
    }
    
    /* Empêcher le dépassement des images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Empêcher le dépassement des tableaux */
    table {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        display: block;
    }
}

/* Metal background pattern */
.metal-pattern {
    background-image: 
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* Hero plein écran atelier */
.hero-garage {
    position: relative;
    color: #fff;
    background-image:
        linear-gradient(115deg, rgba(0,0,0,0.88), rgba(0,0,0,0.45)),
        url('images/2024-11-06.webp');
    background-size: cover;
    background-position: center;
}

/* Cartes valeurs */
.value-card {
    border-radius: 18px;
    border: 1px solid rgba(26,26,26,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* Section avis */
.testimonials-cream {
    background-color: var(--cream-vintage);
    padding: 100px 0;
}

@media (max-width: 768px) {
    .testimonials-cream {
        padding: 60px 0;
    }
}

/* Sections noires avec plus d'espace */
.section-dark {
    padding: 100px 0;
}

@media (max-width: 768px) {
    .section-dark {
        padding: 60px 0;
    }
}

/* Avatar simple pour avis (évite les photos hors sujet) */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background-color: var(--blue-mechanic);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Section Spiroux Racing Team */
.section-racing {
    background:
        radial-gradient(circle at top left, rgba(44,153,198,0.25), transparent 55%),
        radial-gradient(circle at bottom right, rgba(193,64,61,0.25), transparent 55%),
        #111111;
    color: #ffffff;
    padding: 100px 0;
}

@media (max-width: 768px) {
    .section-racing {
        padding: 60px 0;
    }
}

.racing-hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .racing-hero {
        flex-direction: row;
        align-items: center;
    }
}

.racing-photo-main {
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}

.racing-photo-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.racing-thumbs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.racing-thumb {
    border-radius: 0.85rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.racing-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.racing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    background-color: rgba(0,0,0,0.6);
    border: 1px solid rgba(245,237,225,0.4);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.racing-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.75rem;
}

@media (min-width: 768px) {
    .racing-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.racing-stat-card {
    border-radius: 0.9rem;
    padding: 0.75rem 0.9rem;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(245,237,225,0.18);
}

.racing-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--cream-vintage);
    margin-bottom: 0.2rem;
}

.racing-stat-value {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Carte horaires d'ouverture */
.opening-hours-card {
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.opening-hours-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

/* Cartes services premium */
.service-card-premium {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.service-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.service-card-premium:hover .bg-primary\/10 {
    background-color: rgba(44, 153, 198, 0.2);
}

/* Hero Services - Fond anthracite avec pattern */
.hero-services-anthracite {
    background: 
        linear-gradient(135deg, rgba(42, 42, 42, 0.95) 0%, rgba(26, 26, 26, 0.98) 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(193, 64, 61, 0.03) 2px,
            rgba(193, 64, 61, 0.03) 4px
        );
    position: relative;
}

.hero-services-anthracite::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(0,0,0,0.08) 1px, transparent 1px),
        linear-gradient(rgba(0,0,0,0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
}

/* Cartes services modernisées */
.service-card-modern {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.service-card-modern:hover {
    transform: translateY(-6px);
}

/* Section Pourquoi choisir - Fond anthracite/rouge */
.section-why-choose {
    background: 
        radial-gradient(circle at top left, rgba(193, 64, 61, 0.15), transparent 50%),
        radial-gradient(circle at bottom right, rgba(42, 42, 42, 0.3), transparent 50%),
        #2A2A2A;
    position: relative;
    padding: 100px 0;
}

.section-why-choose::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(193, 64, 61, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(193, 64, 61, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.4;
    pointer-events: none;
}

@media (max-width: 768px) {
    .section-why-choose {
        padding: 60px 0;
    }
}

/* Cadre image atelier premium */
.workshop-image-frame {
    position: relative;
    border: 2px solid rgba(42, 42, 42, 0.2);
}

.workshop-image-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.workshop-image-frame-premium {
    position: relative;
    border: 2px solid rgba(193, 64, 61, 0.3);
}

.workshop-image-frame-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* Pattern racing checkered pour CTA */
.racing-pattern {
    position: relative;
}

.racing-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    pointer-events: none;
}

/* Transitions de couleurs entre sections */
.section-transition-off-white-to-white {
    background: linear-gradient(180deg, #FAF8F5 0%, #FFFFFF 100%);
}

.section-transition-white-to-anthracite {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(42, 42, 42, 0.2) 100%);
}

.section-transition-anthracite-to-white {
    background: linear-gradient(180deg, transparent 0%, rgba(42, 42, 42, 0.1) 50%, rgba(255, 255, 255, 1) 100%);
}

.section-transition-white-to-black {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(42, 42, 42, 0.3) 50%, rgba(26, 26, 26, 1) 100%);
}

.section-transition-black-to-red {
    background: linear-gradient(180deg, rgba(26, 26, 26, 1) 0%, rgba(193, 64, 61, 0.4) 50%, rgba(193, 64, 61, 1) 100%);
}

.section-transition-black-to-white {
    background: linear-gradient(180deg, rgba(26, 26, 26, 1) 0%, rgba(42, 42, 42, 0.2) 50%, rgba(255, 255, 255, 1) 100%);
}

.section-transition-white-to-red {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(193, 64, 61, 0.2) 50%, rgba(193, 64, 61, 1) 100%);
}

.section-transition-anthracite-to-black {
    background: linear-gradient(180deg, rgba(24, 24, 24, 1) 0%, rgba(26, 26, 26, 1) 100%);
}

.section-transition-black-to-white {
    background: linear-gradient(180deg, rgba(26, 26, 26, 1) 0%, rgba(42, 42, 42, 0.2) 50%, rgba(255, 255, 255, 1) 100%);
}

/* Hero Contact */
.contact-hero {
    background: 
        linear-gradient(135deg, rgba(24, 24, 24, 0.95) 0%, rgba(26, 26, 26, 0.98) 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(193, 64, 61, 0.03) 2px,
            rgba(193, 64, 61, 0.03) 4px
        );
    position: relative;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(0,0,0,0.08) 1px, transparent 1px),
        linear-gradient(rgba(0,0,0,0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
}

/* Contact cards */
.contact-card {
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(193, 64, 61, 0.2);
}

.contact-team-card {
    transition: all 0.3s ease;
}

.contact-team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(44, 153, 198, 0.2);
}

/* Animations fade-in */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-200 {
    animation-delay: 0.2s;
}

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

/* Animation scroll fade-in */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Card hover lift */
.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
    transform: translateY(-8px);
}

/* Smooth scroll - déjà défini plus haut */

/* Amélioration des transitions de cartes */
.service-card-modern:hover .bg-blue-mechanic\/10 {
    background-color: rgba(44, 153, 198, 0.2);
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* CTA flottant */
.floating-cta {
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: calc(100vw - 2rem);
    right: 1rem;
}

.floating-cta:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .floating-cta {
        right: 1rem;
        bottom: 1rem;
        max-width: calc(100vw - 2rem);
    }
}

/* Barre de progression au scroll */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #C1403D 0%, #2C99C6 100%);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s ease-out;
    max-width: 100vw;
}

/* Amélioration responsive pour les animations */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up,
    .scroll-fade-in,
    .card-hover-lift,
    .service-card-modern {
        animation: none;
        transition: none;
    }
    
    .scroll-fade-in {
        opacity: 1;
        transform: none;
    }
    
    .scroll-progress-bar {
        transition: none;
    }
}

/* Amélioration accessibilité focus */
a:focus,
button:focus {
    outline: 3px solid #2C99C6;
    outline-offset: 2px;
}

/* Amélioration des liens CTA */
a[href^="#contact"],
a[href*="contact"] {
    position: relative;
}

a[href^="#contact"]:hover,
a[href*="contact"]:hover {
    filter: brightness(1.1);
}

/* Règles spécifiques pour iOS/iPhone - Empêcher le scroll horizontal */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
    
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* Empêcher le zoom et le scroll horizontal sur les éléments */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* S'assurer que les conteneurs ne dépassent pas */
    .container,
    section,
    div {
        max-width: 100vw;
        overflow-x: hidden;
    }
}
