:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --header-bg: #1f2937;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --border-color: #30363d;
    --success-color: #2ea043;
    --error-color: #f85149;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- Navigation --- */
.lang-switch {
    text-align: end;
    padding: 10px 25px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.support-link { color: var(--text-secondary); text-decoration: none; font-weight: 500; }
.lang-switch a {
    color: var(--accent-color);
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

/* --- Header --- */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
}

.logo-main {
    max-width: 50%;
    margin: -25px auto 0px auto;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(88, 166, 255, 0.2));
}

.container {
    max-width: 1000px;
    margin-inline: auto;
    padding-inline: 15px;
}

.intro {
    text-align: center;
    color: var(--text-secondary);
    margin: -50px auto 30px auto;
    font-size: 1.05em;
}

/* --- Table Container & Scroll-Snap --- */
.table-container {
    width: 100%;
    max-height: 75vh;
    overflow: overlay;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--card-bg);
    scroll-snap-type: x mandatory;
    scroll-padding-inline-start: 45vw;
    -webkit-overflow-scrolling: auto;
    scroll-snap-stop: always;
    overscroll-behavior-x: contain;
}

table {
    width: max-content;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    min-width: 100%;
}

th, td {
    box-sizing: border-box;
}

/* --- Table Headers (Thead) --- */
thead th {
    position: sticky;
    top: 0;
    z-index: 110;
    background-color: var(--header-bg);
    color: var(--accent-color);
    padding: 15px 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9em;
}

/* --- Sticky First Column (Features) --- */
th:first-child,
td:first-child {
    position: sticky;
    left: 0;
    z-index: 100;
    border-inline-end: 1px solid var(--border-color);
    width: 45vw;
    min-width: 45vw;
    text-align: left;
    padding-inline-start: 15px;
    touch-action: pan-y;
}

/* Specific background for the sticky data cells */
tbody td:first-child {
    background-color: var(--card-bg);
}

/* Top-left corner cell must be above the row and the column */
thead th:first-child {
    z-index: 120;
    background-color: var(--header-bg);
}


/* --- App Columns --- */
th:not(:first-child),
td:not(:first-child) {
    width: 45vw;
    min-width: 45vw;
    scroll-snap-align: center;
}

/* --- Cell Styling --- */
td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-primary);
    font-size: 0.95em;
    background-color: var(--card-bg);

    position: relative;

}

/* --- Status Indicators (Check / Cross) --- */
.check {
    color: var(--success-color);
    font-size: 1.2em;
}

.cross {
    color: rgba(248, 81, 73, 0.25);
    font-size: 1.2em;
}

.note {
    font-size: 0.75em;
    color: var(--text-secondary);
    font-style: italic;
    vertical-align: super;

    position: absolute;
    top: 50%;
    transform: translateY(-60%);
}

.table-legend p {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-style: italic;
}

/* --- Desktop Adaptations --- */
@media (min-width: 768px) {

    .logo-main {
        max-width: 85%;
    }

    .table-container {
        scroll-snap-type: none;
        scroll-padding-inline-start: 0;
    }

    table {
        min-width: 100%;
        table-layout: auto;
    }

    th:first-child, td:first-child {
        width: 220px;
        min-width: 220px;
    }

    th:not(:first-child), td:not(:first-child) {
        width: auto;
        min-width: auto;
        scroll-snap-align: none;
    }

    .app-header .dot-indicator {
        display: none !important;
    }

}

/* --- UI Elements --- */
.app-header { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.app-icon { width: 32px; height: 32px; border-radius: 8px; }

.status-tag {
    font-size: 0.75em;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: 6px;
}

.store-windows-tag { max-width: 120px; width: 100%; height: auto; }
.policy-link { color: var(--accent-color); text-decoration: none; font-size: 0.85em; }

footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* --- Global Scrollbar Customization --- */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-color);
}

html::-webkit-scrollbar {
    width: 10px;
}

html::-webkit-scrollbar-track {
    background: var(--bg-color);
}

html::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
    border: 2px solid var(--bg-color);
}

html::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-color);
}


/* --- Table-Specific Scrollbar Customization --- */
.table-container {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-color);
}

.table-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
    border: 2px solid var(--bg-color);
}

.table-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-color);
}

/* --- Dot Indicators --- */
.dot-indicator {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: center;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
    background-color: transparent;
    transition: all 0.3s ease;
}

.dot.full {
    background-color: var(--accent-color);
}

.screenshot-section {
    padding: 40px 20px;
    text-align: center;
}

.screenshot-section h3 {
    color: #fff;
    margin-bottom: 20px;
    font-weight: 300;
}

.carousel-container {
    width: 100%;
    overflow-x: auto;
    /* Force l'aimantage sur mobile */
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1px;
    scrollbar-width: none; /* Cache la barre sur Firefox */
    -webkit-overflow-scrolling: touch;
}

.carousel-container::-webkit-scrollbar {
    display: none; /* Cache la barre sur Chrome/Safari */
}

.carousel-track {
    display: flex;
    gap: 20px;
    padding-bottom: 10px;
    padding-inline: 1px;
}

.carousel-item {
    flex: 0 0 85%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Aligne le haut des images */
}

.carousel-item img {
    /* On fixe une hauteur maximale identique pour toutes */
    height: 400px;
    width: 100%;

    /* Propriété magique : contient l'image sans la déformer */
    object-fit: contain;

    /* Un fond sombre pour les images qui ne remplissent pas toute la largeur */
    background-color: rgba(0, 0, 0, 0.3);

    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.carousel-item p {
    color: #aaa;
    margin-top: 10px;
    font-size: 0.9em;
}

/* Sur PC, on affiche les 3 côte à côte sans scroll */
@media (min-width: 768px) {
    .carousel-item {
        flex: 1;
    }
    .carousel-container {
        overflow: hidden;
    }
    .carousel-item img {
        height: 300px;
    }
}