/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    /* Couleurs de la marque ShippyLog (Violet profond et Cyan) */
    --color-primary: #512B81;       /* Violet dominant de l'interface */
    --color-primary-hover: #3b1b63;
    --color-secondary: #35B5C4;     /* Cyan du logo (boîtes) */
    --color-secondary-hover: #2a94a1;
    
    /* Couleurs de fond et texte */
    --color-bg: #F8F9FA;
    --color-surface: #FFFFFF;
    --color-text-main: #333333;
    --color-text-muted: #666666;
    
    /* Couleurs de feedback (Alertes) */
    --color-error: #D32F2F;
    --color-error-bg: #FDECEA;
    --color-success: #2E7D32;
    --color-success-bg: #EDF7ED;
    
    /* Typographie & Espacements */
    --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --border-radius: 6px;
}

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

body {
    font-family: var(--font-family);
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================================
   2. STRUCTURE GLOBALE
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.main-content {
    flex: 1; /* Pousse le footer vers le bas */
}

/* ==========================================================================
   3. EN-TÊTE (HEADER & NAV)
   ========================================================================== */
.main-header {
    background-color: var(--color-surface);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-container img {
    display: block;
    max-height: 50px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   4. BOUTONS
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #FFF !important;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary) !important;
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: #FFF !important;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-full-width {
    width: 100%;
}

/* ==========================================================================
   5. SECTIONS (ACCUEIL & SOUSCRIPTION)
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2A1544 100%);
    color: #FFF;
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
    opacity: 0.9;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.cta-group .btn-outline {
    border-color: #FFF;
    color: #FFF !important;
}

.cta-group .btn-outline:hover {
    background-color: #FFF;
    color: var(--color-primary) !important;
}

/* Grille des fonctionnalités (CSS Grid) */
.features-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-surface);
}

.features-section h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 2rem;
    color: var(--color-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    padding: var(--spacing-lg);
    background-color: var(--color-bg);
    border-radius: var(--border-radius);
    text-align: center;
    border-top: 4px solid var(--color-secondary);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.feature-card h3 {
    margin-bottom: var(--spacing-sm);
}

/* ==========================================================================
   6. FORMULAIRES (SAAS)
   ========================================================================== */
.subscription-section {
    padding: var(--spacing-xl) 0;
}

.form-container {
    max-width: 500px;
    background: var(--color-surface);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-container h2 {
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.form-container p {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-muted);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #CCC;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(81, 43, 129, 0.1);
}

/* ==========================================================================
   7. ALERTES & NOTIFICATIONS
   ========================================================================== */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

.alert-error {
    background-color: var(--color-error-bg);
    color: var(--color-error);
    border-left: 4px solid var(--color-error);
}

.alert-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
    border-left: 4px solid var(--color-success);
}

/* ==========================================================================
   8. PIED DE PAGE (FOOTER)
   ========================================================================== */
.main-footer {
    background-color: #222;
    color: #FFF;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: auto;
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
    margin-bottom: var(--spacing-md);
    color: var(--color-secondary);
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: #CCC;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #FFF;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: #888;
}

/* ==========================================================================
   9. RESPONSIVE DESIGN (Mobiles & Tablettes)
   ========================================================================== */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        height: auto;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-md);
        margin-top: var(--spacing-sm);
    }
    
    .cta-group {
        flex-direction: column;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .footer-columns {
        flex-direction: column;
    }
}