@import '../global/reset.css';
@import '../global/variables.css';
@import '../global/base.css';
@import '../global/nav.css';
@import '../global/footer.css';

/* surcharge pour gérer le placement du bouton */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
    padding: 1rem;
}

/* Boutons */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.button:not(:last-child) {
    margin-right: 1rem;
}

.button-small {
    padding: 0.5rem 1rem;
}

.button-primary {
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
    color: white !important;
    box-shadow: 0 4px 6px rgba(96, 89, 247, 0.2);
}

.button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(96, 89, 247, 0.3);
}

.button-secondary {
    background: var(--bg-blue-gray-100);
    color: var(--purple-primary);
    border: 1px solid var(--bg-blue-gray-200);
}

.button-secondary:hover {
    background: rgba(140, 97, 255, 0.1);
    border: 1px solid rgba(140, 97, 255, 0.2);
}

.button-group .button:not(:last-child) {
    margin-bottom: 0.5rem;
}

.button-footer-section {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.button-footer-section .button:not(:last-child) {
    margin-bottom: 0.5rem;
    align-items: center;
}

/* Hero Section */
.hero {
    padding: 8rem 0 5rem;
    background: linear-gradient(135deg, var(--bg-blue-gray-100) 0%, white 50%, var(--bg-blue-gray-100) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(96, 89, 247, 0.15) 0%,
        /* Plus opaque qu'avant */ rgba(54, 195, 254, 0.1) 35%,
        /* Ajout d'une couleur intermédiaire */ transparent 70%
    );
    animation: rotate 60s linear infinite;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-image {
    display: flex;
    justify-content: flex-end;
}

.mockup-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    z-index: 1;
}

/* Nouvelle classe pour les images pleine largeur */
.invoice-image:not(.hero-image) .mockup-image {
    max-width: 70%;
    margin: 0 auto;
    display: block;
}

/* Responsive design */
@media (max-width: 48rem) {
    .container {
        padding: 0 2rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Masque l'image sur mobile */
    .hero-image img[alt='ApiFirst Interface'] {
        display: none;
    }

    .hero-image {
        order: -1;
        justify-content: center;
    }

    .mockup-image {
        max-width: 100%;
    }

    .invoice-image:not(.hero-image) .mockup-image {
        max-width: 100%;
    }

    .button {
        width: 100%;
        /* Prend toute la largeur */
        text-align: center;
        /* Centre le texte */
        margin-right: 0;
        /* Supprime la marge droite */
    }

    .button-group {
        width: 100%;
        /* Prend toute la largeur */
        display: flex;
        flex-direction: column;
        gap: 1rem;
        /* Espace entre les boutons */
    }

    .hero-buttons {
        margin-left: 0;
        /* Supprime la marge gauche */
        width: 100%;
        /* Prend toute la largeur */
    }

    .button:not(:last-child) {
        margin-right: 0;
        /* Supprime la marge entre les boutons */
    }
}

/* Garde la réduction uniquement sur desktop */
@media (min-width: 48rem) {
    .invoice-image:not(.hero-image) .mockup-image {
        max-width: 70%;
        margin: 0 auto;
        display: block;
    }
}

.hero-content {
    position: relative;
    max-width: 600px;
    padding: 0 1.5rem;
}

.hero h1 {
    font-size: 2.3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--gray-dark) 0%, var(--purple-primary) 50%, var(--purple-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    /* Plus gras */
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 500;
}

/* Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hero-buttons {
    margin-bottom: 2rem;
    margin-left: -3px;
}

@media (max-width: 48rem) {
    .hero-buttons {
        margin-bottom: 0;
    }

    .hero-content {
        padding: 0 0.5rem;
    }
}

.hero-contact {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.hero-contact a {
    color: var(--purple-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.hero-contact a:hover {
    text-decoration: underline;
}

/* Trust badges */
.trust-badges {
    background: white;
    padding: 3rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.badge-item {
    flex: 0 0 calc(20% - 1.6rem); /* 5 items par ligne (100% / 5) */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.badge-item img {
    height: 100%;
}

@media (max-width: 48rem) {
    .trust-badges {
        padding: 1rem 0;
    }

    .badges-grid {
        gap: 16px;
    }

    .badge-item {
        flex: 0 0 calc(33.333% - 0.67rem); /* 3 items par ligne */
    }

    .badge-item img {
        height: auto;
        width: 15vw;
    }
}

/* Features Cards */
.features {
    padding: 5rem 0;
    background: var(--background);
}

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

.feature-card {
    padding: 2rem;
    background: var(--bg-blue-gray-50);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 0.75rem 1.5rem rgba(96, 89, 247, 0.1);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--purple-light), var(--blue-light));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
    stroke: white;
}

/* Code Demo Section */
.demo {
    background: var(--bg-blue-gray-50);
}

.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.demo-grid-asymmetric {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 6rem;
    align-items: center;
}

.demo-features {
    list-style: none;
    margin: 2rem 0;
}

.demo-features li {
    position: relative;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.demo-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--purple-primary);
    font-weight: bold;
}

.demo-features li strong {
    display: block;
    color: var(--text-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 48rem) {
    .demo-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .demo-grid-asymmetric {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

pre {
    line-height: 1.2;
}

.code-block {
    background: var(--gray-dark);
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    overflow: auto;
}

.code-block code {
    color: white;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.75rem;
    line-height: 1.2;
}

/* Syntax highlighting - Couleurs Monokai */
.code-block .string {
    color: #e6db74;
}

/* Jaune doux pour les strings */
.code-block .number {
    color: #ae81ff;
}

/* Violet pour les nombres */
.code-block .boolean {
    color: #f92672;
}

/* Rose pour les booléens */
.code-block .null {
    color: #f92672;
}

/* Rose pour null */
.code-block .key {
    color: #66d9ef;
}

/* Bleu clair pour les clés */
.code-block .header {
    color: #fd971f;
}

/* Orange pour les headers */
.code-block .url {
    color: #a6e22e;
}

/* Vert moins fluo pour les URLs */

section {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-heading);
}

.section-title-with-subtitle {
    margin-bottom: 1rem;
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-heading);
}

@media (max-width: 48rem) {
    .section-title-with-subtitle {
        font-size: 28px;
        /* Taille réduite sur mobile */
    }
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.2;
    margin-bottom: 2.5rem;
}

@media (max-width: 48rem) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}

/* Pricing Section */
.pricing {
    padding: 3rem 0;
    background: var(--bg-blue-gray-50);
    border-bottom: 1px solid var(--bg-blue-gray-200);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
    gap: 2rem;
}

.pricing-card {
    background: white;
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 0 0.5rem 1rem rgba(96, 89, 247, 0.1);
    border: 1px solid var(--bg-blue-gray-200);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    text-align: center;
}

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

.pricing-features li {
    margin: 1rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pricing-features li::before {
    content: '✓';
    color: var(--purple-primary);
}

.pricing-card .button {
    display: inline-block;
    margin: 0 auto;
}

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

.pricing-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.price .amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--purple-primary);
}

.pricing-features li {
    margin: 1rem 0;
    color: var(--text-secondary);
}

.pricing-features li::before {
    content: '✓';
    color: var(--purple-primary);
    margin-right: 0.5rem;
}

/* CTA Section */
.cta-text {
    margin-bottom: 2rem;
}

.cta-buttons {
    margin-left: -3px;
}

.logo {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 48rem) {
    .logo {
        justify-content: center;
    }
}

/* Features Section */
.features {
    padding: 3rem 0;
    background: var(--background);
    border-bottom: 1px solid var(--bg-blue-gray-200);
}

/* Demo Section */
.demo {
    padding: 3rem 0;
    background: var(--bg-blue-gray-50);
    border-bottom: 1px solid var(--bg-blue-gray-200);
}

/* CTA Section */
.cta {
    padding: 3rem 0;
    background: var(--bg-blue-gray-50);
}

h2 {
    color: var(--text-heading);
    font-weight: 700;
}

/* PDP Status */
.pdp-status {
    background: var(--background);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--bg-blue-gray-200);
}

.pdp-content {
    max-width: 50rem;
    /* ~800px */
    margin: 0 auto;
}

.pdp-paragraph {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-align: justify;
}

.pdp-paragraph strong {
    color: var(--text-heading);
    font-weight: 600;
}

.pdp-paragraph a {
    color: var(--purple-primary);
    text-decoration: none;
    font-weight: 500;
}

.pdp-paragraph a:hover {
    text-decoration: underline;
}

.pdp-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 2rem;
}

.pdp-list li {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.pdp-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--purple-primary);
}

@media (max-width: 48rem) {
    .pdp-paragraph {
        font-size: 1rem;
    }

    .pdp-list li {
        font-size: 1rem;
    }
}

/* Logo styling */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    color: var(--text-heading);
    margin-left: 0.75rem;
    margin-right: 1rem;
    font-weight: 600;
    font-size: 1.5rem;
}

/* Invoice Management Section */
.invoice-management {
    background: var(--background);
    border-bottom: 1px solid var(--bg-blue-gray-200);
}

.invoice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.invoice-image {
    display: flex;
    justify-content: flex-end;
}

/* Responsive design */
@media (max-width: 48rem) {
    .invoice-grid {
        grid-template-columns: 1fr;
        /* Une seule colonne */
        gap: 2rem;
    }

    .invoice-image {
        order: 1;
        /* Place l'image après le contenu */
        justify-content: center;
        /* Centre l'image */
    }

    .invoice-content {
        order: 0;
        /* Place le contenu en premier */
    }

    .invoice-image .mockup-image {
        max-width: 100%;
        /* Utilise toute la largeur sur mobile */
        margin: 0 auto;
        /* Centre l'image */
    }

    .invoice-description {
        font-size: 1.1rem;
        /* Texte légèrement plus petit sur mobile */
    }
}

.invoice-content {
    position: relative;
    max-width: 600px;
}

.invoice-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 500;
}

.invoice-features {
    list-style: none;
    margin: 2rem 0;
}

.invoice-features li {
    margin: 1.5rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.invoice-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--purple-primary);
    font-weight: bold;
}

.invoice-features li strong {
    display: block;
    color: var(--text-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.invoice-image {
    display: flex;
    justify-content: flex-end;
}

/* Navigation responsive */
@media (max-width: 48rem) {
    /* 768px */
    .nav-links a:not(#start-nav-button) {
        display: none;
        /* Cache tous les liens sauf Commencer */
    }
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    color: var(--text-heading);
    margin-left: 0.75rem;
    font-weight: 600;
    font-size: 1.25rem;
}
