/* ========================================
   INFLEXIONS - Styles principaux
   ======================================== */

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

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --accent: #f093fb;
    --dark: #1a365d;
    --medium: #2d3748;
    --light: #718096;
    --lighter: #e2e8f0;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 10px 40px rgba(0,0,0,0.1);
}

html, body {
    min-height: 100vh;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
    color: var(--medium);
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.logo h1 {
    font-size: 1.8em;
    color: var(--dark);
    margin-bottom: 0;
}

.tagline {
    font-size: 0.9em;
    color: var(--light);
    font-style: italic;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--medium);
    font-weight: 500;
    transition: color 0.3s;
    font-family: 'Arial', sans-serif;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    background: var(--bg-gradient);
    color: white;
    padding: 100px 20px;
    text-align: center;
}

.hero-title {
    font-size: 4em;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.hero-subtitle {
    font-size: 1.5em;
    font-style: italic;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.2em;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Boutons
   ======================================== */

.btn {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Arial', sans-serif;
    cursor: pointer;
    border: none;
    font-size: 1em;
}

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

.btn-primary:hover {
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.btn-large {
    padding: 20px 50px;
    font-size: 1.1em;
}

/* ========================================
   Sections
   ======================================== */

section {
    padding: 80px 20px;
}

section h2 {
    font-size: 2.5em;
    color: var(--dark);
    text-align: center;
    margin-bottom: 50px;
}

.intro {
    background: white;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.intro-card {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    background: #f7fafc;
    transition: transform 0.3s;
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.card-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.intro-card h3 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 1.5em;
}

/* ========================================
   Usage / Steps
   ======================================== */

.usage {
    background: var(--bg-gradient);
    color: white;
}

.usage h2 {
    color: white;
}

.usage-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step h3 {
    margin-bottom: 15px;
    font-size: 1.4em;
}

.cta-center {
    text-align: center;
}

/* ========================================
   Exemples de sentences
   ======================================== */

.examples {
    background: white;
}

.sentence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.sentence-card {
    padding: 30px;
    background: #f7fafc;
    border-left: 4px solid var(--primary);
    border-radius: 5px;
    transition: all 0.3s;
}

.sentence-card:hover {
    background: white;
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.sentence-text {
    font-size: 1.3em;
    font-style: italic;
    color: var(--dark);
    margin-bottom: 15px;
    line-height: 1.5;
}

.sentence-category {
    font-size: 0.9em;
    color: var(--light);
    font-family: 'Arial', sans-serif;
}

/* ========================================
   Domaines
   ======================================== */

.domains {
    background: #f7fafc;
}

.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.domain-card {
    background: var(--bg-gradient);
    color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s;
}

.domain-card:hover {
    transform: scale(1.05);
}

.domain-card h4 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.domain-card p {
    font-size: 0.9em;
    opacity: 0.9;
}

/* ========================================
   Tirage Page
   ======================================== */

.tirage-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.tirage-selector {
    text-align: center;
    margin-bottom: 40px;
}

.tirage-selector h2 {
    margin-bottom: 30px;
}

.tirage-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.tirage-btn {
    padding: 20px 40px;
    background: var(--bg-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Georgia', serif;
}

.tirage-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.tirage-result {
    margin-top: 50px;
}

.card-result {
    background: #f7fafc;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 10px;
    border-left: 5px solid var(--primary);
}

.card-result h3 {
    color: var(--dark);
    font-size: 2em;
    font-style: italic;
    margin-bottom: 15px;
}

.card-category {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
    font-family: 'Arial', sans-serif;
}

.card-interpretation {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 5px;
}

.interpretation-general {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--lighter);
}

.interpretation-specific {
    margin-top: 15px;
}

.interpretation-specific h5 {
    color: var(--primary);
    margin-bottom: 10px;
    font-family: 'Arial', sans-serif;
}

.reset-btn {
    display: block;
    margin: 30px auto 0;
    padding: 15px 40px;
    background: var(--medium);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.reset-btn:hover {
    background: var(--dark);
}

/* ========================================
   Présentation Page
   ======================================== */

.presentation-content {
    max-width: 900px;
    margin: 40px auto;
    padding: 60px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.presentation-content h2 {
    text-align: left;
    font-size: 2em;
    color: var(--dark);
    margin-top: 50px;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 5px solid var(--primary);
}

.presentation-content h3 {
    color: var(--medium);
    margin-top: 30px;
    margin-bottom: 15px;
}

.presentation-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.presentation-content ul,
.presentation-content ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.category-list {
    background: #f7fafc;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.category-item {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-left: 3px solid var(--primary);
    border-radius: 5px;
}

.category-item strong {
    color: var(--dark);
    font-size: 1.1em;
}

/* ========================================
   Contact Page
   ======================================== */

.contact-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 50px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 600;
    font-family: 'Arial', sans-serif;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--lighter);
    border-radius: 5px;
    font-family: 'Georgia', serif;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--bg-gradient);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Arial', sans-serif;
    font-weight: 600;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* ========================================
   Legal Pages
   ======================================== */

.legal-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 60px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.legal-container h1 {
    color: var(--dark);
    font-size: 2.5em;
    margin-bottom: 30px;
}

.legal-container h2 {
    text-align: left;
    font-size: 1.8em;
    color: var(--dark);
    margin-top: 40px;
    margin-bottom: 15px;
}

.legal-container h3 {
    color: var(--medium);
    margin-top: 25px;
    margin-bottom: 10px;
}

.legal-container p {
    margin-bottom: 15px;
    text-align: justify;
}

.legal-container ul {
    margin-left: 30px;
    margin-bottom: 20px;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--medium);
    color: white;
    padding: 50px 20px 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-credit {
    font-style: italic;
    opacity: 0.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
    font-size: 0.9em;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .nav-menu {
        gap: 15px;
    }
    
    .hero-title {
        font-size: 2.5em;
    }
    
    .hero-subtitle {
        font-size: 1.2em;
    }
    
    section {
        padding: 50px 20px;
    }
    
    section h2 {
        font-size: 2em;
    }
    
    .presentation-content,
    .tirage-container,
    .contact-container,
    .legal-container {
        padding: 30px 20px;
    }
}

@media print {
    .navbar,
    .footer,
    .hero-buttons,
    .tirage-buttons,
    .reset-btn {
        display: none;
    }
}

/* ========================================
   PAGE TIRAGE - Cartes flip et layouts
   ======================================== */

/* ZONE 1 - Sélecteur fixe en haut */
.tirage-selector-fixed {
    position: sticky;
    top: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 20px;
    text-align: center;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.tirage-selector-fixed h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.tirage-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tirage-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tirage-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

/* ZONE 2 - Cartes */
.cards-zone {
    min-height: 500px;
    padding: 60px 20px;
    display: none;
}

.cards-zone.visible {
    display: block;
}

/* Carte 3D flip - TAILLE UNIQUE */
.card-3d {
    width: 250px;
    height: 350px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-3d.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-face, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.card-face {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    padding: 20px;
}

.card-back {
    background: white;
    transform: rotateY(180deg);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-back h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.1em;
    line-height: 1.4;
}

.card-back .arcane-info {
    color: #764ba2;
    font-size: 0.85em;
    margin-bottom: 10px;
}

/* Layout 1 carte */
.layout-one {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Layout 3 cartes */
.layout-three {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* Layout 5 cartes - croix */
.layout-five {
    display: grid;
    grid-template-columns: repeat(3, 250px);
    grid-template-rows: repeat(3, 350px);
    gap: 20px;
    justify-content: center;
}

.layout-five .card-3d:nth-child(1) { grid-column: 2; grid-row: 1; }
.layout-five .card-3d:nth-child(2) { grid-column: 1; grid-row: 2; }
.layout-five .card-3d:nth-child(3) { grid-column: 2; grid-row: 2; }
.layout-five .card-3d:nth-child(4) { grid-column: 3; grid-row: 2; }
.layout-five .card-3d:nth-child(5) { grid-column: 2; grid-row: 3; }

/* Layout 7 cartes - pyramide */
.layout-seven {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px 20px;
}

.pyramid-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pyramid-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.card-top {
    margin-bottom: 60px;
}

/* SVG connexions */
.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.connection-lines line {
    stroke: #667eea;
    stroke-width: 2;
    opacity: 0.3;
}

/* ZONE 3 - Explications */
.explanations-zone {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    display: none;
}

.explanations-zone.visible {
    display: block;
}

.explanation-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.explanation-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.explanation-header.general {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.explanation-header:hover {
    opacity: 0.9;
}

.explanation-content {
    padding: 20px;
    display: none;
    line-height: 1.6;
}

.explanation-content.open {
    display: block;
}

.toggle-icon {
    transition: transform 0.3s;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.reset-btn {
    display: block;
    margin: 40px auto;
    padding: 15px 40px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
}

.reset-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
}
