/* STYLES GLOBAUX TOM-TRAIN.COM */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #C4CEC1;
    color: var(--text-dark);
    line-height: 1.6;
}

/* POLICES SPÉCIFIQUES */
h1, h2, h3, h4 {
    font-family: 'Chalkboard SE', 'Comic Sans MS', cursive;
}

.subtitle {
    font-family: 'Chalkboard SE', 'Comic Sans MS', cursive;
}

/* === HEADER === */
header {
    background: var(--tom-blue);
    color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 12px;
}

nav a {
    color: var(--white);
    text-decoration: none;
    margin-left: 30px;
    font-size: 16px;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* === SECTIONS === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

section {
    margin-bottom: 80px;
}

h1 {
    font-size: var(--font-title);
    margin-bottom: 20px;
    color: var(--tom-blue);
}

h2 {
    font-size: var(--font-subtitle);
    margin-bottom: 16px;
    color: var(--tom-blue);
}

p {
    font-size: var(--font-text);
    margin-bottom: 16px;
    color: var(--text-dark);
}

/* === TRAIN BANNER === */
.train-banner {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.train-text {
    font-family: 'Chalkboard SE', 'Comic Sans MS', cursive;
    font-size: 42px;
    color: var(--orange);
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 100%;
}

.train-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-card);
    display: block;
}

/* === HERO === */
.hero {
    position: relative;
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--tom-blue) 0%, var(--tom-blue-light) 100%);
    color: var(--white);
    border-radius: var(--radius-card);
    margin-bottom: 60px;
}

.hero-robot {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    height: auto;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 128px;
    color: var(--yellow);
    margin-bottom: 5px;
    font-weight: normal;
    letter-spacing: 4px;
    line-height: 1;
}

.hero .subtitle {
    font-size: 36px;
    color: var(--yellow);
    margin-bottom: 15px;
    font-weight: normal;
}

.hero p {
    font-size: 18px;
    color: var(--white);
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* === CARDS === */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card h3 {
    color: var(--tom-blue);
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Cartes guides colorées */
.card.guide-card-green {
    background: linear-gradient(135deg, #D5E5C5 0%, #E8F0E0 100%);
}

.card.guide-card-yellow {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
}

.card.guide-card-orange {
    background: linear-gradient(135deg, #FFE0B2 0%, #FFCCBC 100%);
}

/* Cartes TOM-Tracks colorées bleu clair */
.card.tom-card-blue {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
}

.card-icon {
    font-size: 24px;
}

/* === FEATURE SHOWCASE === */
.feature-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
    margin: 60px 0;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

/* Feature cards colorées bleu clair */
.feature-card.tom-card-blue {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
}

.feature-card h3 {
    color: var(--tom-blue);
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.screenshot-container {
    background: var(--white);
    padding: 0;
    border-radius: var(--radius-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-card);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.screenshot:hover {
    transform: scale(1.05);
}

/* === BOUTONS TÉLÉCHARGEMENT === */
.download-section {
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 40px 0;
}

.download-section h2,
.download-section > p {
    text-align: center;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.download-grid-cross {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.download-item {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.download-item-center {
    grid-column: 1 / -1;
    max-width: 600px;
    justify-self: center;
    width: 100%;
}

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--tom-green);
    color: var(--text-dark);
    padding: 20px;
    border-radius: var(--radius-button);
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
    height: 160px;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn.macos {
    background: var(--tom-blue-light);
}

.download-btn.linux {
    background: var(--tom-orange);
}

/* === BOUTONS GUIDES === */
.guide-btn {
    width: 100%;
    margin-top: 15px;
    padding: 16px 24px;
    background: var(--tom-green);
    color: var(--text-dark);
    border: none;
    border-radius: var(--radius-button);
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.guide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.guide-btn:active {
    transform: translateY(0);
}

.guide-btn-yellow {
    background: var(--yellow);
}

.guide-btn-orange {
    background: var(--tom-orange);
}

.btn-icon {
    width: 96px;
    height: 96px;
    display: block;
    margin: 0 auto 12px;
}

/* === INSTRUCTIONS === */
.instructions-columns {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--radius-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.instructions-column ol {
    margin-left: 20px;
}

.instructions-column li {
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.5;
}

/* === FOOTER === */
footer {
    background: var(--tom-footer);
    color: var(--text-dark);
    text-align: center;
    padding: 30px 20px;
    margin-top: 80px;
}

footer a {
    color: var(--text-dark);
    text-decoration: underline;
}

/* === MODAL IMAGE === */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: var(--white);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}

.modal-close:hover {
    color: var(--tom-orange);
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius-card);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* === LANGUAGE SELECTOR === */
.language-selector {
    display: flex;
    gap: 8px;
    align-items: center;
}

.language-selector img {
    width: 32px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 1;
    border: 2px solid transparent;
}

.language-selector img:hover {
    opacity: 1;
    transform: scale(1.1);
}

.language-selector img.active {
    opacity: 1;
    border: 2px solid var(--yellow);
    box-shadow: 0 0 8px rgba(255, 215, 96, 0.5);
}

/* === MODAL INSTRUCTIONS MACOS === */
.macos-instructions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

.macos-instructions-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-card);
    max-width: 600px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

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

.macos-instructions-content h3 {
    color: var(--tom-blue);
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.macos-instructions-content .intro {
    font-size: 16px;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-dark);
}

.macos-instructions-content .steps {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.macos-instructions-content .steps p {
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.6;
}

.macos-instructions-content .warning {
    background: #fff3cd;
    border-left: 4px solid var(--yellow);
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 20px;
    color: #856404;
}

.macos-instructions-content .buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.macos-instructions-content .btn-download,
.macos-instructions-content .btn-cancel {
    padding: 12px 30px;
    border: none;
    border-radius: var(--radius-button);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.macos-instructions-content .btn-download {
    background: var(--tom-green);
    color: var(--text-dark);
}

.macos-instructions-content .btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.macos-instructions-content .btn-cancel {
    background: #e0e0e0;
    color: var(--text-dark);
}

.macos-instructions-content .btn-cancel:hover {
    background: #d0d0d0;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero-robot {
        position: static;
        transform: none;
        width: 120px;
        margin: 0 auto 20px;
        display: block;
    }
    
    .hero h1 {
        font-size: 72px;
    }
    
    .feature-showcase {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav {
        display: flex;
        gap: 20px;
    }
    
    nav a {
        margin-left: 0;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
    
    .instructions-columns {
        grid-template-columns: 1fr;
    }
    
    .language-selector {
        gap: 6px;
    }
    
    .language-selector img {
        width: 28px;
        height: 21px;
    }
}
