/* Charte graphique Midow : Poppins pour les titres (voir .section-title, h1-h3),
   Inter reste chargé séparément par chaque page pour le texte courant. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&display=swap');

/* ================================
   CSS VARIABLES - COULEURS
   ================================ */
:root {
    /* Couleurs principales — Charte graphique Midow (15/07/2026) */
    --color-primary-green: #004B40;
    --color-primary-green-dark: #003630;
    --color-primary-green-light: #006B5A;
    --color-accent-gold: #F4C430;
    --color-accent-gold-light: #F4C430;
    --color-accent-gold-alt: #F4C430;
    
    /* Couleurs de fond */
    --color-bg-white: #ffffff;
    --color-bg-light: #f8faf9;
    --color-bg-gradient-start: #f0f7f5;
    --color-bg-gradient-end: #e8f4f1;
    
    /* Couleurs de texte */
    --color-text-primary: #333333;
    --color-text-secondary: #444444;
    --color-text-tertiary: #555555;
    --color-text-gray: #666666;
    --color-text-light-gray: #888888;
    --color-text-black: #000000;
    
    /* Couleurs overlay et transparences */
    --color-overlay-dark: rgba(0, 0, 0, 0.15);
    --color-overlay-darker: rgba(0, 0, 0, 0.3);
    --color-green-overlay: rgba(0, 75, 64, 0.95);
    --color-white-transparent-90: rgba(255, 255, 255, 0.9);
    --color-white-transparent-80: rgba(255, 255, 255, 0.8);
    --color-white-transparent-60: rgba(255, 255, 255, 0.6);
    --color-white-transparent-10: rgba(255, 255, 255, 0.1);
    
    /* Couleurs d'ombre */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-green: rgba(0, 75, 64, 0.1);
}

/* ================================
   FONTS
   ================================ */
@font-face {
    font-family: 'Couture';
    src: url('fonts/Couture-Bold.otf') format('opentype'),
         url('fonts/Couture-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ================================
   RESET & BASE
   ================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    /* SF Pro / System Fonts stack */
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-bg-white);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ================================
   CONTAINER
   ================================ */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ================================
   HERO SECTION
   ================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: url('images/couverture.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--color-overlay-dark);
    pointer-events: none;
}

/* Navbar */
.navbar {
    position: relative;
    z-index: 100;
    padding: 1rem 2rem;
    background-color: var(--color-primary-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center; 
}

.nav-links a {
    color: var(--color-bg-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.nav-links .btn-portail {
    background-color: var(--color-accent-gold);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-links .btn-portail:hover {
    background-color: var(--color-accent-gold-light);
    opacity: 1;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-bg-white);
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.logo-text {
    font-family: 'Couture', sans-serif;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 2px;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    padding-bottom: 6rem;
}

/* Hero Screen Image - Superposition à droite */
.hero-screen-image {
    position: absolute;
    right: 100px;
    top: calc(50% + 40px);
    transform: translateY(-50%);
    max-width: 13%;
    height: auto;
    z-index: 5;
    opacity: 0.9;
}

@media (max-width: 1024px) {
    .hero-screen-image {
        display: none;
    }
}

/* Hero Box - Rectangle vert */
.hero-box {
    background-color: var(--color-green-overlay);
    padding: 2.5rem 3rem;
    border-radius: 20px;
    max-width: 680px;
    box-shadow: 0 20px 60px var(--color-overlay-darker);
}

.icon-hero {
    width:128px;
}

@media (max-width: 600px) {
    .hero-box {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
        border-radius: 16px;
    }
}

.hero-box .hero-title {
    color: var(--color-bg-white);
    font-family: 'Couture', sans-serif;
    text-transform: uppercase;
    font-size: clamp(0.6rem, 1.5vw, 1.2rem) !important; /* Réduit pour être plus petit */
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: 2px;
}

.strong-midow {
        color: var(--color-accent-gold);
    font-family: 'Couture', sans-serif;
    text-transform: uppercase;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: 2px;
}

.hero-subtitle {
    color: var(--color-white-transparent-90);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Hero Wave */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 80px;
}

/* ================================
   DOWNLOAD BUTTONS
   ================================ */
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 600px) {
    .download-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

.store-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--color-bg-white);
    color: var(--color-primary-green);
    text-decoration: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    box-shadow: 0 4px 15px var(--shadow-light);
    min-width: 200px;
}

.store-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-medium);
    background-color: var(--color-bg-light);
}

.store-button:active {
    transform: translateY(-1px);
}

.store-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.store-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.store-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary-green);
}

/* ================================
   FEATURES SECTION
   ================================ */
.features {
    padding: 5rem 0;
    background-color: var(--color-bg-white);
}

.features-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .features-layout {
        flex-direction: row;
        align-items: center;
    }
}

.features-content {
    flex: 1;
}

.features-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.features-image {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 12px 30px var(--shadow-green);
}

.section-title {
    text-align: center;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--color-primary-green);
    margin-bottom: 3rem;
}

/* Charte graphique Midow : Poppins pour les titres de contenu.
   Ne s'applique pas au wordmark (.logo-text, .hero-title, .strong-midow,
   .footer-logo) qui garde volontairement la police de marque 'Couture'. */
h1, h2, h3 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: var(--color-bg-light);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px var(--shadow-green);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--color-primary-green), var(--color-primary-green-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-bg-white);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary-green);
    margin-bottom: 0.75rem;
}

.feature-text {
    font-size: 0.95rem;
    color: var(--color-text-gray);
    line-height: 1.7;
}

/* ================================
   REMUNERATION SECTION
   ================================ */
.remuneration {
    padding: 5rem 0;
    background-color: var(--color-bg-light);
    text-align: center;
}

.remuneration-intro {
    font-size: 1.1rem;
    color: var(--color-text-tertiary);
    max-width: 550px;
    margin: 0 auto 3rem;
}

.remuneration-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .remuneration-content {
        flex-direction: row;
        justify-content: center;
        gap: 4rem;
    }
}

/* Donut Chart SVG */
.chart-container {
    display: flex;
    justify-content: center;
}

.donut-chart-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: var(--color-accent-gold-alt);
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke: var(--color-primary-green);
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 1.5s ease-out;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.donut-percent {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary-green);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.donut-label {
    font-size: 0.9rem;
    color: var(--color-text-gray);
    font-weight: 500;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

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

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-item.producer .legend-color {
    background-color: var(--color-primary-green);
}

.legend-item.midow .legend-color {
    background-color: var(--color-accent-gold-alt);
}

.legend-text {
    display: flex;
    flex-direction: column;
}

.legend-percent {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary-green);
}

.legend-item.midow .legend-percent {
    color: var(--color-accent-gold-alt);
}

.legend-label {
    font-size: 0.95rem;
    color: var(--color-text-gray);
}

.legend-note {
    font-size: 0.8rem;
    color: var(--color-text-light-gray);
    margin-top: 0.25rem;
}

/* ================================
   STORYTELLING SECTION
   ================================ */
.storytelling {
    padding: 5rem 0;
    background-color: var(--color-bg-white);
    overflow: hidden; /* Pour l'illustration qui dépasse potentiellement */
}

.story-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

@media (min-width: 900px) {
    .story-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }
}

.story-text {
    flex: 1;
    max-width: 600px;
}

.story-title {
    text-align: left; /* Force left align inside this section */
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .story-title {
        text-align: center;
    }
}

.story-paragraph {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.story-paragraph strong {
    color: var(--color-primary-green);
    font-weight: 700;
}

.story-visual {
    flex: 1;
    position: relative;
    max-width: 500px;
    width: 100%;
}

.story-image-container {
    position: relative;
    z-index: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow-medium);
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.story-image-container:hover {
    transform: rotate(0deg);
}

.story-photo {
    width: 100%;
    height: auto;
    display: block;
}

.farmer-illustration {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    z-index: 2;
    background: var(--color-bg-white);
    border-radius: 50%;
    box-shadow: 0 10px 20px var(--shadow-light);
    padding: 5px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* ================================
   CTA SECTION
   ================================ */
.cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--color-bg-gradient-start) 0%, var(--color-bg-gradient-end) 100%);
    text-align: center;
}

.cta-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--color-primary-green);
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-tertiary);
    max-width: 500px;
    margin: 0 auto 2rem;
}

.cta .store-button {
    background-color: var(--color-primary-green);
    color: var(--color-bg-white);
}

.cta .store-button:hover {
    background-color: var(--color-primary-green-dark);
}

.cta .store-label {
    color: var(--color-white-transparent-80);
}

.cta .store-name {
    color: var(--color-bg-white);
}

.cta .store-icon {
    fill: var(--color-bg-white);
}

/* ================================
   FOOTER
   ================================ */
.footer {
    background-color: var(--color-primary-green);
    color: var(--color-bg-white);
    padding: 3rem 0 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 600px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-family: 'Couture', sans-serif;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

.footer-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--color-white-transparent-80);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--color-bg-white);
}

.footer-copyright {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-white-transparent-60);
    border-top: 1px solid var(--color-white-transparent-10);
    padding-top: 2rem;
    margin-top: 1rem;
    width: 100%;
}

/* ================================
   LEGAL PAGES
   ================================ */
.legal-page {
    background-color: var(--color-bg-white);
    color: var(--color-text-primary);
}

.legal-header {
    background-color: var(--color-primary-green);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-bg-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.8;
}

.legal-content {
    padding: 4rem 1.5rem;
    max-width: 800px; /* Lecture plus confortable */
}

.legal-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--color-primary-green);
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 800;
}

.legal-content section {
    margin-bottom: 2.5rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--color-primary-green);
    margin-bottom: 1rem;
    font-weight: 700;
}

.legal-content h3 {
    font-size: 1.2rem;
    color: var(--color-primary-green);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.legal-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.legal-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.legal-content strong {
    font-weight: 600;
    color: var(--color-text-black);
}

.legal-list {
    list-style: none;
    padding-left: 0;
}

.legal-list li {
    margin-bottom: 0.75rem;
    padding-left: 0;
}

.legal-content a {
    color: var(--color-primary-green);
    text-decoration: underline;
    transition: opacity 0.2s;
}

.legal-content a:hover {
    opacity: 0.7;
}

.legal-section {
    margin-bottom: 3rem;
}

/* ================================
   SECTION VIDÉO
   ================================ */
.video-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--color-bg-gradient-start) 0%, var(--color-bg-gradient-end) 100%);
}

.video-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.video-container {
    max-width: 900px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    background: var(--color-bg-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow-green);
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.02);
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    transition: background 0.3s ease;
}

.video-thumbnail:hover .video-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--color-primary-green);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(2, 75, 64, 0.4);
}

.play-button svg {
    width: 32px;
    height: 32px;
    fill: white;
    margin-left: 4px; /* Correction optique */
}

.play-button:hover {
    background: var(--color-primary-green-light);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 40px rgba(2, 75, 64, 0.5);
}

.youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: none;
}

.youtube-iframe.active {
    display: block;
}

.video-thumbnail.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .video-section {
        padding: 3rem 0;
    }

    .play-button {
        width: 60px;
        height: 60px;
    }

    .play-button svg {
        width: 24px;
        height: 24px;
    }
}

/* Tableau tarifaire des documents légaux. `overflow-x` sur le conteneur pour
   que le tableau défile seul sur mobile, sans décaler toute la page. */
.legal-content .legal-table {
    display: block;
    overflow-x: auto;
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}
.legal-content .legal-table th,
.legal-content .legal-table td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
}
.legal-content .legal-table th {
    background: #f7f9f8;
    font-weight: 600;
    white-space: nowrap;
}
