/**
 * Patate.fr - Styles principaux
 * Version finale : Header Blanc, Hero Bleu, Accents Jaunes
 */

/* ============================================
   CSS Variables / Design Tokens
   ============================================ */
:root {
    /* Couleurs principales */
    --color-blue-dark: #2D3047;
    /* Hero & Text Primary */
    --color-yellow: #FFBF0A;
    /* Actions & Explanation BG */
    --color-yellow-dark: #E5AC00;
    /* Hover states */
    --color-yellow-light: #FFCF40;

    /* Couleurs de fond */
    --color-bg-body: #F9FAFB;
    /* Gris très clair global */
    --color-bg-white: #FFFFFF;
    /* Header & Cards */

    /* Texte */
    --color-text-main: #2D3047;
    /* Bleu foncé */
    --color-text-muted: #6B7280;
    /* Gris moyen */
    --color-text-white: #FFFFFF;

    /* Typographie */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Layout */
    --spacing-container: 2rem;
    --radius-card: 8px;
    --radius-btn: 6px;
    --radius-input: 6px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    /* 10px base */
    scroll-behavior: smooth;
}

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

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

/* ============================================
   Header (Blanc)
   ============================================ */
.site-header {
    background: var(--color-bg-white);
    height: 80px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 50;
}

.site-header .container {
    display: flex;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 48px;
    /* Ajusté selon demande utilisateur */
}

/* Bande jaune décorative sous le header (optionnel si vu sur original) */
/* .site-header::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 4px; background: var(--color-yellow); } */

/* ============================================
   Hero Section (Bleu Foncé)
   ============================================ */
.hero {
    background-color: var(--color-blue-dark);
    padding: 8rem 0 10rem;
    position: relative;
    /* overflow: hidden; Removed to allow autocomplete */
    color: var(--color-text-white);
}

.hero .container {
    position: relative;
    z-index: 10;
}

/* Décoration Patate Jaune (Image SVG officielle) */
.hero-decoration {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    /* Largeur conteneur max */
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    /* Pousse l'image vers la droite */
}

.hero-decoration img {
    height: auto;
    width: 600px;
    /* Taille approximative vue sur desktop */
    opacity: 0.8;
    /* Légère transparence si nécessaire */
    margin-right: -100px;
    /* Débordement à droite */
    margin-top: -50px;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    max-width: 700px;
    margin-bottom: 4rem;
    letter-spacing: -0.01em;
}

.hero h1 .highlight {
    color: var(--color-yellow);
}

/* ============================================
   Search Form
   ============================================ */
.search-form {
    background: var(--color-bg-white);
    padding: 6px;
    border-radius: var(--radius-input);
    max-width: 600px;
    display: flex;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.search-wrapper {
    display: flex;
    width: 100%;
    align-items: center;
}

.search-input {
    flex: 1;
    border: none;
    padding: 1.2rem 2rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-text-main);
    outline: none;
    background: transparent;
}

.search-input::placeholder {
    color: #9CA3AF;
}

.search-button {
    background: var(--color-yellow);
    color: var(--color-text-main);
    /* Texte sombre sur jaune */
    border: none;
    padding: 1rem 2.4rem;
    border-radius: var(--radius-btn);
    font-weight: 800;
    font-size: 1.6rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.search-button:hover {
    background: var(--color-yellow-dark);
}

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

/* ============================================
   Features Section (Gris clair)
   ============================================ */
.features {
    padding: 6rem 0;
    background: var(--color-bg-body);
}

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

.feature-card {
    background: var(--color-bg-white);
    padding: 3rem;
    border-radius: var(--radius-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 2rem;
    color: var(--color-blue-dark);
    /* Icones en bleu ? ou jaune ? Original semble avoir des SVGs spécifiques */
}

/* Si les SVG sont noirs/bleus par défaut */
.feature-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.feature-card h2 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--color-text-main);
    margin-bottom: 1.5rem;
    line-height: 1.25;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 1.6rem;
    line-height: 1.6;
}

/* ============================================
   Explanation Section (Jaune)
   ============================================ */
.explanation {
    background: var(--color-yellow);
    padding: 8rem 0;
    color: var(--color-text-main);
}

.explanation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.explanation h3 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.explanation p {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--color-bg-white);
    padding: 3rem 0;
    border-top: 1px solid #E5E7EB;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.footer-brand .logo-text {
    font-weight: 900;
    font-style: italic;
    font-size: 1.6rem;
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.footer-nav a:hover {
    color: var(--color-yellow-dark);
    text-decoration: underline;
}

.separator {
    color: var(--color-yellow);
    font-weight: 900;
}

/* ============================================
   Responsive
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .explanation-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 3.2rem;
    }

    /* Fix layout mobile pour le champ de recherche */
    /* Fix layout mobile pour le champ de recherche */
    .search-wrapper {
        /* On garde la ligne (row) */
        gap: 0.5rem;
    }

    .search-form {
        padding: 4px;
    }

    .search-input {
        width: auto;
        flex: 1;
        /* Prend l'espace restant */
        font-size: 1.4rem;
        padding: 1rem;
        border-bottom: none;
        text-align: left;
        /* Remet le texte à gauche */
    }

    .search-button {
        width: auto;
        margin-top: 0;
        padding: 1rem 1.5rem;
        justify-content: center;
    }

    /* Cacher le texte "Rechercher" sur mobile */
    .search-button-text {
        display: none;
    }
}

/* ============================================
   Autocomplete
   ============================================ */
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    padding: 0;
    list-style: none;
    z-index: 100;
    overflow: hidden;
    border: 1px solid #E5E7EB;
}

.autocomplete-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 1.5rem;
    color: var(--color-blue-dark);
    font-weight: 600;
}

.autocomplete-item:hover {
    background: #F3F4F6;
}

.autocomplete-favicon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}