/* 
   Tradiland - Design System Partagé v2.1
   Aesthetics: Premium, Modern, Dynamic, Glassmorphism
   Centralized for all landing pages.
*/

:root {
    --primary: #1EBCE1;
    --primary-dark: #15a9cb;
    --accent: #6d4aff;
    --accent-dark: #5a38e0;
    --text-dark: #0f172a;
    --text-muted: #475569;
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --card-bg: rgba(135, 206, 235, 0.9);
    --radius: 24px;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #1EBCE1 0%, #6d4aff 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.centered-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px 60px;
}

/* --- sections --- */
.hero, .content-card, .stats, .disclaimer, .download-section, .download, .requirements, .warning, .form-section, .feature-card, .info-box {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 60px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

.primary-card {
    background: var(--primary);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.primary-card h2, .primary-card h3, .primary-card p, .primary-card strong {
    color: white !important;
}
.primary-card .accent-link {
    color: white !important;
    text-decoration: underline;
}

.disclaimer { border-left: 6px solid #ffc107; text-align: left; }


/* --- Hero & Logo --- */
.hero {
    text-align: center;
    padding: 60px 24px 40px;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-weight: 900;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo .cross { font-size: clamp(2rem, 10vw, 3rem); }
.logo .title { font-size: clamp(2.5rem, 12vw, 4.5rem); letter-spacing: -0.04em; text-transform: uppercase; }

h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

h2 { font-size: 1.8rem; margin-bottom: 25px; font-weight: 800; }
h3 { font-size: 1.4rem; margin-bottom: 15px; font-weight: 700; }

.subtitle, .tagline {
    font-size: 1.3rem;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 700px;
    margin: 0 auto 10px;
}

.hero-note {
    margin: 20px auto;
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
}

/* --- Badges --- */
.alpha-badge, .version-badge {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.version-badge { background: #4caf50; box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3); }

/* --- Boutons Premium --- */
.btn {
    display: inline-block;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
    text-align: center;
    padding: 14px 30px;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 18px 45px;
    font-size: 1.15rem;
    box-shadow: 0 10px 25px rgba(30, 188, 225, 0.4);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 20px 40px rgba(30, 188, 225, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid rgba(30, 188, 225, 0.2);
}

.btn-secondary:hover { background: var(--primary); color: white; transform: translateY(-2px); }

/* --- Navigation --- */
.nav-back, .nav-secondary {
    text-align: center;
    margin: 20px 0 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 35px;
}

/* --- Stats --- */
.stats-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
}

.stat-item { flex: 0 1 200px; text-align: center; }

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1.1;
    margin-bottom: 8px;
    text-shadow: 0 4px 10px rgba(109, 74, 255, 0.15);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}

/* --- Features --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-bottom: 0; /* Override margin-bottom from glass sections */
}

.feature-card:hover { transform: translateY(-10px); background: var(--accent); border-color: var(--primary); color: white; }
.feature-card:hover .feature-desc, .feature-card:hover h3 { color: white; }

.feature-icon { font-size: 3.5rem; margin-bottom: 20px; }
.section-intro { text-align: center; margin-bottom: 20px; color: var(--text-muted); }

/* --- Forms --- */
.form-group { margin-bottom: 25px; text-align: left; }
label { display: block; font-weight: 700; margin-bottom: 15px; color: var(--text-dark); font-size: 0.95rem; }

input[type="text"], input[type="url"], input[type="email"], textarea, select {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 4px rgba(30, 188, 225, 0.1); }

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.4);
    padding: 18px;
    border-radius: 14px;
    margin: 20px 0;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s;
}

.checkbox-group:hover { background: rgba(255, 255, 255, 0.6); }
.checkbox-group input { margin-top: 4px; width: 22px; height: 22px; cursor: pointer; }
.checkbox-group label { margin-bottom: 0; font-weight: 600; cursor: pointer; }

/* --- 404 Specifics --- */
.error-code {
    font-size: clamp(6rem, 20vw, 10rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 15px rgba(30, 188, 225, 0.3));
    animation: glow 3s ease-in-out infinite alternate;
}

.gps-tip {
    display: inline-block;
    background: rgba(30, 188, 225, 0.1);
    color: var(--primary-dark);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 20px 0;
    border: 1px dashed var(--primary);
}

/* --- Downloads --- */
.download-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    transition: all 0.3s;
    text-align: left;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.download-card.recommended { border: 2px solid #4caf50; background: rgba(76, 175, 80, 0.02); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.card-title { font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.recommended-label { background: #4caf50; color: white; padding: 5px 14px; border-radius: 12px; font-size: 0.75rem; font-weight: 800; }

/* --- Gallery & Previews --- */
.preview-container { margin-top: 60px; text-align: center; opacity: 0; transition: opacity 1s ease; }
.preview-container.loaded { opacity: 1; }
.image-nav { position: relative; display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 30px; }

.preview-img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    border: 5px solid white;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.nav-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    z-index: 10;
}

.nav-btn:hover { background: white; color: var(--primary); transform: scale(1.1); }

.image-dots { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); cursor: pointer; transition: all 0.3s; }
.dot.active { background: white; width: 30px; border-radius: 10px; transform: scale(1.1); }

/* --- Legal / Markdown Content --- */
.md-content { text-align: left; line-height: 1.7; }
.md-content h1 { font-size: 1.6rem; color: var(--text-dark); border-bottom: 2px solid rgba(30, 188, 225, 0.3); padding-bottom: 15px; margin-bottom: 25px; }
.md-content h2 { font-size: 1.3rem; color: var(--primary-dark); margin: 35px 0 15px; }
.md-content p { margin-bottom: 15px; }
.md-content ul, .requirements ul, .installation-guide ol { margin-bottom: 20px; padding-left: 20px; }
.md-content li, .requirements li, .installation-guide li { margin-bottom: 8px; }

.table-wrapper { overflow-x: auto; margin: 25px 0; border-radius: 12px; border: 1px solid rgba(0, 0, 0, 0.1); }
table { width: 100%; border-collapse: collapse; background: white; font-size: 0.9rem; }
th, td { padding: 12px 15px; border-bottom: 1px solid rgba(0, 0, 0, 0.05); text-align: left; }
th { background: rgba(30, 188, 225, 0.05); font-weight: 800; color: var(--text-dark); }

/* --- Utilities --- */
.text-center { text-align: center !important; }
.text-sm { font-size: 0.9rem !important; }
.text-xs { font-size: 0.75rem !important; }
.mt-10 { margin-top: 10px !important; }
.mt-15 { margin-top: 15px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-30 { margin-top: 30px !important; }
.mt-40 { margin-top: 40px !important; }
.mt-60 { margin-top: 60px !important; }
.mt-80 { margin-top: 80px !important; }
.mb-0 { margin-bottom: 0 !important; }

.accent-link { color: var(--accent) !important; font-weight: 600; text-decoration: none; transition: opacity 0.3s; }
.accent-link:hover { opacity: 0.8; text-decoration: underline; }

.loading-state, .error-state, .loading { text-align: center; padding: 60px 20px; color: white; }
.spinner {
    display: inline-block;
    width: 40px; height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

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

@keyframes glow {
    from { filter: drop-shadow(0 0 10px rgba(30, 188, 225, 0.2)); }
    to { filter: drop-shadow(0 0 25px rgba(109, 74, 255, 0.4)); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.hero, .content-card, .stats, .feature-card, .form-section, .info-box, .stat-item {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* --- Layout Utils --- */
.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* --- Footer --- */
footer {
    text-align: center;
    padding: 60px 24px;
    color: white;
}

footer p { margin-bottom: 10px; opacity: 0.9; }

.pretty-list {
    list-style: none;
    padding: 0;
    display: table;
    text-align: left;
    margin-top: 15px;
}

.pretty-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 30px;
    font-size: 0.95rem;
}

.pretty-list li::before {
    content: "✟";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: bold;
}

footer a { color: white; text-decoration: underline; font-weight: 700; opacity: 1; transition: opacity 0.3s; }
footer a:hover { opacity: 0.8; }

/* Styles pour les liens standards (hors boutons) */
a:not(.btn):not(.nav-btn):not(.dot) {
    color: #1976d2; /* Bleu standard */
    text-decoration: underline;
    transition: color 0.3s;
}

a:not(.btn):not(.nav-btn):not(.dot):hover {
    color: #1565c0;
}

/* Cas particuliers pour les fonds colorés */
.primary-card a, footer a, .hero a:not(.btn) {
    color: white !important;
    text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 850px) {
    .nav-btn { position: absolute; }
    .nav-btn.prev { left: 10px; }
    .nav-btn.next { right: 10px; }
}

@media (max-width: 580px) {
    .logo { flex-direction: column; gap: 5px; }
    .hero { padding-top: 40px; }
    .container { padding: 15px; }
    .feature-card, .content-card, .hero, .form-section, .info-box { padding: 25px; }
    .stat-number { font-size: 2.5rem; }
}
