/* ===========================================
   STYLE.CSS COMPLET - L'ÉTOILE BERBÈRE 28
   Restaurant Couscous & Grillades
   COULEURS BLEUES
   =========================================== */

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

:root {
    --primary-color: #1a2332;
    --secondary-color: #2d3e50;
    --accent-color: #D4EDF9;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gold: #d4af37;
    --gradient: linear-gradient(135deg, #1a2332 0%, #2d3e50 100%);
    --dark: #3e2723;
    --light: #fff3e0;
    --gray: #757575;
    --light-gray: #f5f5f5;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

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

/* HEADER */
header {
    background: var(--gradient);
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 0.3rem;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

nav a:hover,
nav a.active {
    background: rgba(255,255,255,0.1);
    color: var(--accent-color);
}

/* PAGE HEADER */
.page-header {
    background: var(--gradient);
    color: var(--white);
    padding: 4rem 0 3rem;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* HERO SECTION */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('etoile-berbere.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 35, 50, 0.65);
    backdrop-filter: blur(5px);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

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

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

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

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

/* SECTION MENU */
.menu-section {
    padding: 4rem 0;
}

.menu-section.alternate,
.menu-section:nth-child(even) {
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.menu-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.subtitle,
.section-description {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.menu-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary-color);
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.menu-item.featured {
    border: 2px solid var(--gold);
    background: linear-gradient(to right, var(--light) 0%, var(--white) 100%);
}

/* Images des produits */
.item-image {
    width: calc(100% + 3rem);
    height: 200px;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-item:hover .item-image img {
    transform: scale(1.05);
}

.item-header,
.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.item-header h3,
.menu-item h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    flex: 1;
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
    margin-left: 1rem;
}

.description,
.menu-item p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--accent-color);
    color: var(--primary-color);
    font-size: 0.85rem;
    border-radius: 20px;
    font-weight: 600;
}

/* CTA SECTION */
.cta-section {
    background: var(--gradient);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* INFO CARDS */
.info-cards {
    padding: 4rem 0;
    background: var(--light-bg);
}

.info-cards .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    color: #666;
    line-height: 1.8;
}

.card a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

/* ORDER FORM */
.order-form {
    padding: 4rem 0;
}

.order-info {
    background: var(--light);
    padding: 2rem;
    border-radius: 10px;
    border-left: 5px solid var(--primary-color);
    margin-bottom: 3rem;
}

.order-info h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.order-info ul {
    list-style: none;
}

.order-info li {
    padding: 0.5rem 0;
}

.commande-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.commande-form h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.commande-form h2:first-of-type {
    margin-top: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label,
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

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

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

.menu-category {
    margin-bottom: 3rem;
}

.menu-category h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

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

.item-select {
    background: var(--light);
    padding: 1rem;
    border-radius: 8px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

.item-select:hover {
    background: #e3f2fd;
}

.item-select input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.item-select label {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    font-weight: 500;
}

.item-name {
    color: var(--dark);
}

.item-price {
    color: var(--secondary-color);
    font-weight: bold;
}

.item-select .quantity {
    width: 60px;
    padding: 0.4rem;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.cuisson-select {
    width: 110px;
    padding: 0.4rem;
    border: 2px solid var(--secondary-color);
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cuisson-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(26, 35, 50, 0.3);
}

.taille-select {
    width: 130px;
    padding: 0.4rem;
    border: 2px solid var(--secondary-color);
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.taille-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(45, 62, 80, 0.3);
}

.pizza-item {
    grid-template-columns: auto 1fr auto auto;
}

.form-submit {
    text-align: center;
    margin-top: 2rem;
}

.form-submit button {
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
}

.form-note {
    margin-top: 1rem;
    color: var(--gray);
    font-style: italic;
}

/* Messages */
.success-message,
.error-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-alternative {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: var(--light);
    border-radius: 10px;
}

.contact-alternative h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.phone-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.hours {
    margin-top: 0.5rem;
    color: var(--gray);
}

/* STRIPE PAYMENT */
#stripe-card-element {
    background: white !important;
    padding: 12px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    margin: 15px 0 !important;
    min-height: 45px !important;
    font-size: 16px !important;
    display: block !important;
    visibility: visible !important;
}

#stripe-card-element.StripeElement--focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(26, 35, 50, 0.1) !important;
}

#stripe-payment-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #f9f9f9 !important;
    padding: 20px !important;
    border-radius: 10px !important;
    margin: 20px 0 !important;
}

#stripe-card-errors {
    color: #e74c3c !important;
    font-size: 14px !important;
    margin-top: 10px !important;
    min-height: 20px !important;
}

#btn-payer-stripe {
    width: 100% !important;
    background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
    color: white !important;
    padding: 15px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    margin-top: 15px !important;
    display: block !important;
}

#btn-payer-stripe:hover {
    background: linear-gradient(135deg, #27ae60, #229954) !important;
}

#btn-payer-stripe:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed !important;
}

.total-section {
    display: block;
    visibility: visible;
    opacity: 1;
}

/* FOOTER */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    font-weight: 400;
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-section a {
    color: var(--accent-color);
    text-decoration: none;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header {
        position: relative !important;
        padding: 15px 0;
    }
    
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        margin-top: 1rem;
        padding: 10px 0;
    }
    
    nav ul li {
        width: 100%;
        text-align: center;
    }
    
    nav ul li a {
        display: block;
        padding: 12px;
        font-size: 16px;
    }

    main, section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 20px 15px;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 15px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .menu-section h2 {
        font-size: 1.8rem;
    }

    .menu-grid,
    .items-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select,
    .form-input,
    .form-textarea,
    .form-select {
        font-size: 16px;
        width: 100%;
    }
    
    .form-row,
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 2rem 1.5rem;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .item-select {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding: 15px !important;
    }
    
    .item-select input[type="checkbox"] {
        grid-column: 1;
        justify-self: start;
    }
    
    .item-select label {
        grid-column: 1;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px;
    }
    
    .item-name {
        font-size: 15px;
        display: block;
        margin-bottom: 5px;
    }
    
    .item-price {
        font-size: 16px;
        display: block;
    }
    
    .item-select .quantity,
    .cuisson-select,
    .taille-select {
        grid-column: 1;
        width: 100%;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-item,
.card,
.form-container {
    animation: fadeIn 0.6s ease-out;
}
