/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #7c3aed 0%, #fbbf24 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    min-height: 100vh;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15) 0%, transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12) 0%, transparent 25%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.08) 0%, transparent 20%),
        radial-gradient(circle at 60% 70%, rgba(124, 58, 237, 0.05) 0%, transparent 15%),
        radial-gradient(circle at 30% 30%, rgba(251, 191, 36, 0.05) 0%, transparent 15%);
    pointer-events: none;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header et Navigation */
.header {
    background: rgba(250, 248, 235, 0.9);
    border: 2px solid rgba(230, 215, 185, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 20px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
}

.logo h1 {
    color: #7c3aed;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #7c3aed, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo h1:hover {
    transform: scale(1.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-tagline {
    font-size: 0.85rem;
    color: #000;
    font-weight: 600;
    margin: 0;
    opacity: 1;
    text-shadow: 0 1px 3px rgba(255,255,255,0.8);
    line-height: 1.2;
}

/* Réduire la taille des exposants © */
sup {
    font-size: 0.6em;
    vertical-align: super;
}

/* Alignement vertical du menu */
.navigation {
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(45deg, #7c3aed, #fbbf24);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #7c3aed;
    margin: 3px 0;
    transition: 0.3s;
}

/* Contenu principal */
.main-content {
    padding: 0 20px 2rem 20px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}

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

/* Section Hero */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    background: rgba(245, 245, 220, 0.85);
    border: 2px solid rgba(220, 220, 190, 0.8);
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 4rem;
    color: #7c3aed;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #7c3aed, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #666;
    font-style: italic;
}


/* Section À propos */
.about-section {
    background: rgba(245, 240, 215, 0.9);
    border: 2px solid rgba(220, 200, 170, 0.8);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #7c3aed;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #7c3aed, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    color: #555;
    text-align: justify;
}

.about-content p:last-of-type {
    font-size: 0.9rem;
    font-style: italic;
    color: #666;
}

.about-content strong {
    color: #7c3aed;
}

/* Section Contact */
.contact-section {
    background: rgba(245, 240, 215, 0.9);
    border: 2px solid rgba(220, 200, 170, 0.8);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.contact-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #7c3aed;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #7c3aed, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 2px solid rgba(200, 180, 140, 0.6);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(252, 250, 240, 0.9);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background: linear-gradient(45deg, #7c3aed, #fbbf24);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.3);
    align-self: center;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.btn-newsletter {
    background: linear-gradient(45deg, #7c3aed, #fbbf24);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.3);
}

.btn-newsletter:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

/* Section À propos - Lettres spiKto */
.spikto-letters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: nowrap;
    min-width: fit-content;
    overflow-x: auto;
}

.spikto-letter {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.spikto-letter:hover {
    transform: scale(1.2);
}

.spikto-k {
    width: 60px;
    height: 60px;
}

/* Image piKto intégrée au texte */
.inline-pikto {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin: 0 3px;
    object-fit: contain;
}

/* Encadré d'exemple spiKto */
.spikto-example-box {
    border: 2px solid #7c3aed;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem auto;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 600px;
    position: relative;
}

.spikto-example-box::before {
    content: "Exemple";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    padding: 0 10px;
    font-weight: bold;
    font-size: 0.9rem;
    color: #7c3aed;
    border-radius: 8px;
    border: 1px solid #7c3aed;
}

.spikto-example-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.spikto-example-pikto {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.spikto-example-pikto:hover {
    transform: scale(1.1);
}

.spikto-example-letter {
    font-weight: bold;
    font-size: 1.2rem;
    color: #1f2937;
}

.spikto-example-number {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* Bouton enKoder */
.enkoder-cta {
    text-align: center;
    margin: 1.5rem 0;
}

.btn-enkoder {
    background: linear-gradient(45deg, #7c3aed, #fbbf24);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.3);
}

.btn-enkoder:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

/* Contact alternative */
.contact-alternative {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.contact-alternative a {
    color: #7c3aed;
    text-decoration: none;
}

.contact-alternative a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* Styles pour la checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(200, 180, 140, 0.6);
    border-radius: 4px;
    background: rgba(252, 250, 240, 0.9);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    background: linear-gradient(45deg, #7c3aed, #fbbf24);
    border-color: #7c3aed;
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Style pour le menu dépliant piKto */
.pikto-definition {
    background: rgba(252, 250, 240, 0.9);
    border: 2px solid rgba(200, 180, 150, 0.8);
    border-radius: 8px;
    padding: 0.5rem;
    margin: 1rem 0;
}

.pikto-definition summary {
    cursor: pointer;
    font-weight: 600;
    color: #7c3aed;
    padding: 0.3rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.pikto-definition summary:hover {
    background: rgba(124, 58, 237, 0.1);
}

.pikto-definition p {
    margin: 0.5rem 0 0 0;
    padding: 0.5rem;
    font-style: italic;
    font-size: 16px !important;
    color: #654321;
    line-height: 1.6;
}

/* Style pour les liens dans les menus déroulants */
.pikto-definition p a {
    font-size: inherit !important;
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
}

.pikto-definition p a:hover {
    text-decoration: underline;
    background-color: rgba(124, 58, 237, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Style minimaliste pour le titre de l'explication algorithme */
.algorithme-explication summary {
    color: #666;
    font-size: 0.85rem;
    font-weight: normal;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        background-size: 200% 200%;
        animation: gradientShift 10s ease infinite;
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .header {
        margin: 15px;
        margin-bottom: 25px;
    }
    
    .main-content {
        padding: 0 15px 2rem 15px;
    }
    
    .about-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

.nav-menu {
        position: fixed;
        left: -120%;
        top: 70px;
        flex-direction: column;
        background: rgba(245, 240, 215, 0.9);
        width: calc(100% - 40px);
        margin: 0 20px;
        border-radius: 15px;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
        gap: 0;
        padding: 1.5rem 0;
        overflow: hidden;
    }

    .nav-menu.active {
        left: 20px;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .forecast-section,
    .about-section,
    .contact-section {
        padding: 2rem 1.5rem;
        margin: 1.5rem 10px;
    }

    .about-section h2,
    .contact-section h2 {
        font-size: 2rem;
    }
    
    /* Optimisation de l'exemple spiKto pour mobile */
    .spikto-example-box {
        padding: 1rem;
        margin: 1.5rem auto;
    }
    
    .spikto-example-item {
        gap: 0.3rem;
        min-width: 0;
        flex-shrink: 0;
    }
    
    .spikto-example-pikto {
        width: 35px;
        height: 35px;
    }
    
    .spikto-example-letter {
        font-size: 1rem;
    }
    
    .spikto-example-number {
        font-size: 0.8rem;
    }
    
}

@media (max-width: 480px) {
    body {
        background-size: 150% 150%;
        animation: gradientShift 8s ease infinite;
        font-size: 13px;
    }
    
    .header {
        margin: 10px;
        margin-bottom: 20px;
    }
    
    .navigation {
        padding: 0.8rem 1rem;
    }
    
    .main-content {
        padding: 0 10px 2rem 10px;
    }
    
    .about-content p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .inline-pikto {
        width: 24px;
        height: 24px;
        margin: 0 2px;
    }
    
    /* Optimisation agressive de l'exemple spiKto pour très petits écrans */
    .spikto-example-box {
        padding: 0.8rem;
        margin: 1rem auto;
        max-width: 100%;
        overflow-x: auto;
    }
    
    .spikto-example-item {
        gap: 0.2rem;
        min-width: 50px;
        flex-shrink: 0;
    }
    
    .spikto-example-pikto {
        width: 30px;
        height: 30px;
    }
    
    .spikto-example-letter {
        font-size: 0.9rem;
    }
    
    .spikto-example-number {
        font-size: 0.7rem;
    }
    
    
    .nav-menu {
        width: calc(100% - 20px);
        margin: 0 10px;
        top: 60px;
        left: -120%;
    }

    .nav-menu.active {
        left: 10px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .about-section,
    .contact-section {
        padding: 1.5rem 1rem;
        margin: 1rem 5px;
    }

    .btn-submit {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}