/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
    /* Colors */
    --color-primary: #0ea5e9;
    --color-primary-dark: #0284c7;
    --color-primary-light: #38bdf8;
    --color-secondary: #8b5cf6;
    --color-accent: #06b6d4;

    --color-bg: #ffffff;
    --color-bg-secondary: #f8fafc;
    --color-bg-tertiary: #f1f5f9;
    --color-surface: #ffffff;

    --color-text: #0f172a;
    --color-text-secondary: #475569;
    --color-text-tertiary: #94a3b8;

    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;

    /* Typography */
    --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Borders */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ===================================
   Header
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-light);
    z-index: 1000;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-text);
    text-decoration: none;
}

.logo-symbol {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 600;
}
.logo-symbol img {
    margin-top: 9px;
    width: 30px;
    height: 30px;
}

.logo-text {
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color var(--transition-base);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link:hover::after {
    width: 100%;
}

.language-selector {
    display: flex;
    gap: var(--space-xs);
    padding: 4px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
}

.lang-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.lang-btn.active {
    background: var(--color-surface);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.lang-btn:hover:not(.active) {
    color: var(--color-text);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    padding-top: calc(72px + var(--space-4xl));
    padding-bottom: var(--space-4xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 680px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: var(--radius-full);
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-xl);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-xl);
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
    max-width: 560px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 16px 32px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    transition: all var(--transition-base);
}

.cta-button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

.cta-button:active {
    transform: translateY(0);
}

.arrow-icon {
    transition: transform var(--transition-base);
}

.cta-button:hover .arrow-icon {
    transform: translateX(4px);
}

.hero-visual {
    position: absolute;
    right: 10%;
    top: 40%;
    transform: translateY(-50%);
    display: none;
}

.floating-card {
    position: absolute;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

.floating-card.card-1 {
    top: 0;
    right: 0;
    animation-delay: 0s;
}

.floating-card.card-2 {
    top: 120px;
    right: 80px;
    animation-delay: 0.5s;
}

.floating-card.card-3 {
    top: 240px;
    right: 20px;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.card-icon {
    font-size: 2rem;
}

.card-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* ===================================
   Extensions Section
   =================================== */
.extensions {
    padding: var(--space-4xl) 0;
    background: var(--color-bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
    animation: fadeInUp 0.8s ease;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.extensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    /*grid-template-rows: 80px auto auto 66px 50px;*/
    gap: var(--space-xl);
}

/*.extension-card-container {*/
/*    display: grid;*/
/*}*/

.extension-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    animation: fadeInUp 0.8s ease both;

    /* Ajout d'une structure de grille interne pour aligner les éléments */
    display: grid;
    /*grid-template-rows: subgrid; !* Uses parent's grid *!*/
    /*grid-row: span 5; !* Uses the 5 lines *!*/
    grid-template-rows: 80px auto auto 66px 50px;
    gap: 0;
    min-width: 0; /* Permet au contenu de se rétrécir correctement */
}

.extension-card:nth-child(1) {
    animation-delay: 0.1s;
}

.extension-card:nth-child(2) {
    animation-delay: 0.2s;
}

.extension-card:nth-child(3) {
    animation-delay: 0.3s;
}

.extension-card:nth-child(4) {
    animation-delay: 0.4s;
}

.extension-card:nth-child(5) {
    animation-delay: 0.5s;
}

.extension-card:nth-child(6) {
    animation-delay: 0.6s;
}

.extension-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-light);
}

.extension-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    min-width: 0; /* Permet au contenu de se rétrécir */
}

.extension-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /*box-shadow: var(--shadow-md);*/
}

.extension-meta {
    flex: 1;
    min-width: 0; /* Permet au texte de se rétrécir */
}

.extension-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
    word-break: break-word;
    /*word-wrap: break-word; !* Permet au texte de passer à la ligne si nécessaire *!*/
    overflow-wrap: break-word;
}

.extension-version {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    font-weight: 600;
}

.extension-description {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

.extension-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    align-self: start; /* Pour que la zone features ne s'étire pas */
    min-width: 0; /* Permet au contenu de se rétrécir */
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    min-width: 0; /* Permet au texte de se rétrécir */
}

.feature-item span {
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    min-width: 0;
}

.check-icon {
    color: var(--color-primary);
    flex-shrink: 0;
}

.browser-selector {
    display: flex;
    flex-wrap: nowrap; /* Garde les boutons sur une seule ligne */
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    min-width: 0; /* Permet au contenu de se rétrécir */
}

.browser-btn {
    flex: 1;
    min-width: 0; /* Permet au flex item de rétrécir en dessous de sa taille de contenu */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.browser-btn span {
    min-width: 0;
}

.browser-btn img {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    flex-shrink: 0; /* Empêche l'icône de rétrécir */
}

.browser-btn.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.browser-btn.active img {
    opacity: 1;
}

.browser-btn:hover:not(.active) {
    border-color: var(--color-text-tertiary);
    background: var(--color-bg-secondary);
}

.install-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: 14px 24px;
    background: var(--color-text);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    min-width: 0; /* Permet au bouton de se rétrécir */
}

/*.install-button span {*/
/*    overflow: hidden;*/
/*    text-overflow: ellipsis;*/
/*    white-space: nowrap;*/
/*}*/

.install-button:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(14, 165, 233, 0.3);
}

.install-button:active {
    transform: translateY(0);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--color-text);
    color: var(--color-bg-secondary);
    padding: var(--space-2xl) 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-2xl);
    align-items: center;
}

.footer-brand .logo {
    color: white;
    margin-bottom: var(--space-sm);
}
.footer-brand .logo .logo-symbol {
    margin-top: -1px;
}

.footer-tagline {
    color: var(--color-text-tertiary);
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-contact {
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-top: var(--space-md);
}

.footer-email {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 500;
}

.footer-email:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-support {
    display: flex;
    justify-content: flex-end;
}

.kofi-section {
    text-align: center;
    max-width: 400px;
}

.kofi-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.kofi-text {
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.kofi-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    background: #FF5E5B;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(255, 94, 91, 0.3);
}

.kofi-button:hover {
    background: #FF4845;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 94, 91, 0.4);
}

.kofi-button:active {
    transform: translateY(0);
}

.kofi-button svg {
    width: 20px;
    height: 20px;
}



/* **********************************************
        CONTAINERS & SIZE MANAGEMENT
*********************************************** */

/* Global page size management */

@media (min-width: 900px) {
    .hero-visual {
        display: block;
    }
}

@media (max-width: 768px) {

    /* Header & Hero */
    .hero {
        padding-top: calc(72px + var(--space-2xl));
        padding-bottom: var(--space-2xl);
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-description {
        font-size: 1rem;
    }
    .section-header {
        margin-bottom: var(--space-xl);
    }
    .container {
        padding: 0 var(--space-lg);
    }
    .nav {
        gap: var(--space-lg);
    }
    .nav-link {
        font-size: 0.875rem;
    }

    /* Extensions div */
    .extensions {
        padding: var(--space-2xl) 0;
    }
    .extensions-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-support {
        justify-content: center;
    }
    .footer-tagline {
        max-width: 100%;
        text-align: center;
    }
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }
}

@media (max-width: 432px) {
    .logo {
        font-size: 1rem;
        white-space: nowrap;
    }

    .logo-symbol {
        font-size: 1.25rem;
    }

    .logo-symbol img {
        width: 24px;
        height: 24px;
    }

    .nav {
        gap: var(--space-md);
    }

    .nav-link {
        font-size: 0.8125rem;
    }

    .lang-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

}

/* Very small devices */
@media (max-width: 410px) {
    .container {
        padding: 0 var(--space-md);
    }

    .logo {
        font-size: 0.9375rem;
        gap: 6px;
    }

    .logo-symbol {
        font-size: 1.125rem;
    }

    .logo-symbol img {
        width: 20px;
        height: 20px;
    }

    .nav {
        gap: var(--space-sm);
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .language-selector {
        padding: 3px;
        gap: 2px;
    }

    .lang-btn {
        padding: 4px 8px;
        font-size: 0.6875rem;
    }
}

/* Define card as container */
.extension-card {
    container-type: inline-size;
    container-name: extension-card;
}

@container extension-card (max-width: 310px) {

    .extension-name {
        font-size: 1.125rem;
    }

    .browser-selector {
        gap: var(--space-xs); /* Réduit l'espace entre les boutons */
    }

    .browser-btn {
        font-size: 0.8125rem;
        padding: 8px 6px;
        gap: 4px;
    }

    .browser-btn img {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
}


/* ===================================
   Print Styles
   =================================== */
@media print {
    .header,
    .cta-button,
    .browser-selector,
    .install-button,
    .footer {
        display: none;
    }
}