@import url('https://fonts.googleapis.com/css2?family=Barrio&display=swap');

:root {
    --primary: #000000;
    --secondary: #f5f5f7;
    --accent: #0071e3;
    --light: #f5f5f7;
    --dark: #1d1d1f;
    --border-radius: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --disabled: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    color: var(--dark);
    background-color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
}

header {
    padding: 1rem 0;
    background-color: white;
    border-bottom: 1px solid var(--light);
    position: sticky;
    top: 0;
    z-index: 10;
}

header h1 {
    font-weight: 600;
    font-family: "Barrio", system-ui;
    font-size: 2.5rem;
    letter-spacing: -0.5px;
    text-align: center;
    color: var(--dark);
}

#form-container {
    padding: 1.5rem 0;
}

.question {
    margin-bottom: 2.5rem;
    animation: fadeIn 0.4s ease;
}

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

.question h3 {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark);
    text-align: center;
    text-transform: uppercase;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.option-btn {
    padding: 14px 10px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 400;
    width: 100%;
}

.option-btn:hover {
    border-color: var(--accent);
}

.option-btn.selected {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 500;
}

.option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.controls-container {
    padding: 20px;
    background: white;
    border-top: 1px solid var(--light);
    position: sticky;
    bottom: 50px;
    left: 0;
    right: 0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.controls-container.disabled {
    pointer-events: none;
    opacity: 0.7;
}

.controls-container.hidden {
    display: none;
}

.mode-toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch.disabled {
    opacity: 0.7;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: var(--transition);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.mode-label {
    font-size: 0.9rem;
    color: var(--dark);
    transition: var(--transition);
}

.mode-label.left {
    margin-right: 10px;
}

.mode-label.right {
    margin-left: 10px;
}

.mode-label.disabled {
    color: #86868b;
}

input:checked ~ .mode-label.right {
    font-weight: 500;
}

input:not(:checked) ~ .mode-label.left {
    font-weight: 500;
}

.matches-counter {
    text-align: center;
    font-size: 0.85rem;
    color: #86868b;
}

.matches-counter span {
    color: var(--accent);
    font-weight: 500;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex-grow: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: var(--transition);
}

#reset-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent);
    font-size: 1.2rem;
    padding: 5px;
    transition: var(--transition);
    margin-left: auto;
}

#reset-btn:hover {
    transform: rotate(180deg);
    color: #0077ed;
}

#results-container {
    padding: 1.5rem 0 6rem;
    display: none;
}

#results-container.visible {
    display: block;
}

#results-container h2 {
    font-family: "Gill Sans", sans-serif;
	font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--dark);
    text-align: center;
    text-transform: uppercase;
}

.film-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.film-card {
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 1.2rem;
    transition: var(--transition);
    background: white;
}

.film-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.film-brand {
    font-weight: 600;
}

.film-description {
    margin: 0.8rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #515154;
}

.film-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
}

.meta-tag {
    background: var(--light);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #515154;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 1.5rem;
}

.no-results {
    text-align: center;
    color: #86868b;
    padding: 2rem 0;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

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

.primary-btn:hover:not(:disabled) {
    background: #0077ed;
}

.secondary-btn {
    background: white;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.secondary-btn:hover:not(:disabled) {
    background: #f0f7ff;
}

footer {
    padding: 1rem 0;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--light);
    z-index: 20;
}

.instagram-icon {
    color: var(--dark);
    font-size: 1.3rem;
    transition: var(--transition);
}

.instagram-icon:hover {
    color: var(--accent);
}


/* Media queries pour les écrans plus larges */
@media (min-width: 768px) {
    .options-grid {
        max-width: 500px;
    }
    
    .film-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}