/* =========================================================
   STYLE DU SITE - SNACK DU DAILY
   ========================================================= */

:root {
    --primary: #ff6b00;
    --primary-dark: #e85f00;
    --secondary: #222222;
    --dark: #222222;
    --dark-light: #333333;
    --white: #222222;
    --text: #e0dcdc;
    --text-muted: #e0dcdc;
    --border: #444444;
    --green: #ff6b00;
    --red: #ff6b00;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    background: var(--white);
    color: var(--text);
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

button,
input {
    font-family: inherit;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5%;
    background: var(--dark);
    color: var(--text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.nav-logo {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.hamburger {
    display: none;
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

/* =========================================================
   ACCUEIL
   ========================================================= */

.welcome-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background:
        linear-gradient(
            rgba(34, 34, 34, 0.55),
            rgba(34, 34, 34, 0.55)
        ),
        linear-gradient(
            135deg,
            #ff6b00,
            #ff9500
        );
    color: var(--text);
}

.logo {
    margin-bottom: 15px;
    color: var(--text);
    font-size: clamp(2.5rem, 7vw, 5rem);
    line-height: 1.1;
    font-weight: 700;
}

.slogan {
    max-width: 700px;
    margin-bottom: 30px;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text);
}

.cta-button {
    border: none;
    border-radius: 8px;
    padding: 13px 22px;
    background: var(--primary);
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        transform 0.2s ease;
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* =========================================================
   SECTIONS
   ========================================================= */

.section {
    width: 100%;
    padding: 70px 5%;
    background: var(--white);
}

.section-title {
    margin-bottom: 35px;
    color: var(--text);
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.2;
}

/* =========================================================
   MENU
   ========================================================= */

.menu-section {
    background: var(--white);
}

.menu-tabs {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
}

.menu-tab {
    padding: 10px 18px;
    border: 1px solid var(--primary);
    border-radius: 25px;
    background: var(--white);
    color: var(--primary);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

.menu-tab:hover,
.menu-tab.active {
    background: var(--primary);
    color: var(--text);
}

.menu-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.menu-item {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.menu-item img {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.menu-item h3 {
    padding: 18px 18px 5px;
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1.35;
}

.menu-item .price {
    padding: 0 18px;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
}

.menu-item p {
    padding: 10px 18px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.menu-item.hidden {
    display: none;
}

/* =========================================================
   HORAIRES
   ========================================================= */

.schedule-section {
    background: var(--white);
}

.schedule-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.current-time {
    margin-bottom: 20px;
    color: var(--primary);
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.schedule-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    background: var(--white);
}

.schedule-table th,
.schedule-table td {
    padding: 14px 12px;
    border: 1px solid var(--border);
    text-align: center;
    color: var(--text);
}

.schedule-table th {
    background: var(--dark);
    color: var(--text);
    font-weight: 600;
}

.schedule-table tr:nth-child(even) td {
    background: #333333;
}

.schedule-note {
    margin-top: 2rem;
    color: var(--text-muted);
    text-align: center;
}

/* =========================================================
   IMPORT DE PHOTOS
   ========================================================= */

.files-section {
    background: var(--white);
}

.files-container {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.upload-area {
    flex: 1;
    padding: 30px;
    border: 2px dashed #444;
    border-radius: 10px;
    background: #333;
    text-align: center;
    transition:
        border-color 0.3s ease,
        background-color 0.3s ease;
}

.upload-area.highlight {
    border-color: var(--green);
    background: #3a4a3a;
}

.upload-area h3 {
    margin-bottom: 10px;
    color: var(--text);
}

.upload-area p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.file-input {
    display: none;
}

.preview-container {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.file-preview {
    width: 120px;
    min-height: 150px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
    position: relative;
    background: var(--white);
}

.file-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.file-info {
    padding: 5px;
    font-size: 12px;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: var(--text);
}

.progress-bar {
    width: 100%;
    height: 5px;
    margin-top: 5px;
    overflow: hidden;
    border-radius: 2px;
    background: #444;
}

.progress {
    width: 0%;
    height: 100%;
    background: var(--green);
    transition: width 0.3s;
}

.status {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.status.error {
    color: var(--red);
    font-weight: bold;
}

.status.success {
    color: var(--green);
    font-weight: bold;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    width: 100%;
    padding: 50px 5% 25px;
    background: var(--dark);
    color: var(--text);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
}

.footer-section {
    min-width: 0;
}

.footer-section h4 {
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 1.1rem;
}

.footer-section p {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-section a {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.footer-section a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text);
    font-weight: 700;
    transition: transform 0.2s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 107, 0, 0.2);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* =========================================================
   ANIMATION
   ========================================================= */

.fade-in {
    animation: fadeIn 0.4s ease;
}

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

/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 1000px) {
    .menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .files-container {
        flex-direction: column;
    }
    .upload-area,
    .preview-container {
        width: 100%;
        flex: none;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
    body {
        font-size: 15px;
    }

    /* Navigation */
    .navbar {
        padding: 13px 15px;
    }
    .nav-logo {
        font-size: 1.2rem;
    }
    .hamburger {
        display: block;
    }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 10px 15px;
        background: var(--dark);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li {
        width: 100%;
        list-style: none;
    }
    .nav-links a {
        display: block;
        width: 100%;
        padding: 13px 10px;
        border-bottom: 1px solid rgba(255, 107, 0, 0.1);
        text-align: center;
        color: var(--text);
    }

    /* Accueil */
    .welcome-section {
        min-height: 75vh;
        padding: 70px 15px 50px;
    }
    .logo {
        font-size: clamp(2rem, 11vw, 3.2rem);
    }
    .slogan {
        font-size: 0.95rem;
        color: var(--text);
    }
    .cta-button {
        width: 100%;
        max-width: 320px;
        min-height: 46px;
        font-size: 15px;
    }

    /* Sections */
    .section {
        padding: 45px 12px;
    }
    .section-title {
        margin-bottom: 25px;
        font-size: clamp(1.7rem, 8vw, 2.3rem);
        color: var(--text);
    }

    /* Onglets */
    .menu-tabs {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .menu-tab {
        width: 100%;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 12px;
        border-radius: 10px;
        font-size: 14px;
    }

    /* Menu */
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .menu-item {
        width: 100%;
    }
    .menu-item img {
        width: 100%;
        height: 210px;
    }
    .menu-item h3 {
        padding: 15px 15px 5px;
        font-size: 1.05rem;
        color: var(--text);
    }
    .menu-item .price {
        padding: 0 15px;
        font-size: 1rem;
    }
    .menu-item p {
        padding: 8px 15px 18px;
        font-size: 0.88rem;
        color: var(--text-muted);
    }

    /* Horaires */
    .schedule-container {
        width: 100%;
    }
    .table-wrapper {
        width: 100%;
        overflow-x: auto;
    }
    .schedule-table {
        min-width: 620px;
    }
    .schedule-table th,
    .schedule-table td {
        padding: 10px 8px;
        font-size: 13px;
        color: var(--text);
    }

    /* Upload */
    .files-container {
        flex-direction: column;
        gap: 20px;
    }
    .upload-area {
        width: 100%;
        padding: 25px 15px;
    }
    .upload-area .cta-button {
        width: 100%;
    }
    .preview-container {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        max-height: none;
        overflow: visible;
    }
    .file-preview {
        width: 100%;
        min-height: 150px;
    }
    .file-preview img {
        width: 100%;
        height: 150px;
    }

    /* Footer */
    .footer {
        padding: 40px 15px 20px;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .footer-section {
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
}

/* =========================================================
   PETITS TELEPHONES
   ========================================================= */

@media (max-width: 380px) {
    .section {
        padding-left: 10px;
        padding-right: 10px;
    }
    .welcome-section {
        padding-left: 12px;
        padding-right: 12px;
    }
    .menu-item img {
        height: 180px;
    }
    .preview-container {
        grid-template-columns: 1fr;
    }
    .file-preview img {
        height: 180px;
    }
}